import{inject as c,signal as o}from"@angular/core";import{HttpClient as d}from"@angular/common/http";import*as g from"@angular/core";var a=class s{http=c(d);searchQuery=o("");hideDone=o(!0);collapsed=o(!0);tagFilter=o([]);getAll(){return this.http.get("/api/contexts")}get(t){return this.http.get(`/api/contexts/${encodeURIComponent(t)}`)}getScratchDir(t){return this.http.get(`/api/contexts/meta/scratch-dir/${encodeURIComponent(t)}`)}add(t){return this.http.post("/api/contexts",{name:t})}remove(t,e=!1){return this.http.delete(`/api/contexts/${encodeURIComponent(t)}`,{params:e?{force:"true"}:{}})}clone(t,e){return this.http.post(`/api/contexts/${encodeURIComponent(t)}/clone`,{name:e})}updateTags(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/tags`,{tags:e})}updateDescription(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/description`,{description:e})}updateChildDescription(t,e,n){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/description`,{description:n})}setDone(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/done`,{done:e})}setChildDone(t,e,n){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/done`,{done:n})}rename(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/rename`,{new_name:e})}addItem(t,e,n,r,i,p){return this.http.post(`/api/contexts/${encodeURIComponent(t)}/items`,{type:e,id:n,label:r,text:i,path:p})}updateItem(t,e,n,r){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/items/${e}/${encodeURIComponent(n)}`,r)}removeItem(t,e,n){return this.http.delete(`/api/contexts/${encodeURIComponent(t)}/items/${e}/${encodeURIComponent(n)}`)}moveItem(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/items/move`,e)}reorderItems(t,e){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/items/reorder`,{items:e})}addChild(t,e){return this.http.post(`/api/contexts/${encodeURIComponent(t)}/children`,{name:e})}cloneChild(t,e,n){return this.http.post(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/clone`,{name:n})}renameChild(t,e,n){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/rename`,{new_name:n})}removeChild(t,e,n=!1){return this.http.delete(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}`,{params:n?{force:"true"}:{}})}addChildItem(t,e,n,r,i,p,m){return this.http.post(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/items`,{type:n,id:r,label:i,text:p,path:m})}updateChildItem(t,e,n,r,i){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/items/${n}/${encodeURIComponent(r)}`,i)}removeChildItem(t,e,n,r){return this.http.delete(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/items/${n}/${encodeURIComponent(r)}`)}reorderChildItems(t,e,n){return this.http.put(`/api/contexts/${encodeURIComponent(t)}/children/${encodeURIComponent(e)}/items/reorder`,{items:n})}getChildPreview(t,e){return this.http.get(`/api/contexts/meta/preview/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)}importBitbucketPr(t,e,n){return this.http.post("/api/contexts/bitbucket-pr/import",{url:t,pr_json:e,comments_json:n})}getRepositories(){return this.http.get("/api/contexts/meta/repositories")}getBranches(t){return this.http.get(`/api/contexts/meta/repo-branches/${encodeURIComponent(t)}`)}getPreview(t){return this.http.get(`/api/contexts/meta/preview/${encodeURIComponent(t)}`)}getRepoTree(t,e=""){return this.http.get(`/api/contexts/meta/repo-tree/${encodeURIComponent(t)}`,{params:e?{path:e}:{}})}getAllPaths(){return this.http.get("/api/contexts/meta/all-paths")}getContributing(t){return this.http.get(`/api/contexts/meta/contributing/${encodeURIComponent(t)}`)}getContributingChild(t,e){return this.http.get(`/api/contexts/meta/contributing/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=g.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"})};export{a};
