import{a as f}from"./chunk-ZGI4QLIP.js";import{e as u}from"./chunk-PT4FR6A3.js";import{l as o,m}from"./chunk-7UXAANIN.js";import{r as l}from"./chunk-ZA2L7UBA.js";import{d as h}from"./chunk-H7XPW5ER.js";import{ea as r,ia as c,na as a,r as n}from"./chunk-RG67NTNC.js";var $=(()=>{class t extends f{get model$(){return this._model$}get attachments$(){return this._attachments$}get connections$(){return this._connections$}get chatLog$(){return this._chatLog$}get isEditMode(){return l.isSet(this.model?.id)}constructor(s,e){super(),this.http=s,this.apiService=e,this.model=null,this.modelS=new n(1),this._model$=this.modelS.asObservable(),this.attachmentsS=new n(1),this._attachments$=this.attachmentsS.asObservable(),this.connectionsS=new n(1),this._connections$=this.connectionsS.asObservable(),this.chatLogS=new n(1),this._chatLog$=this.chatLogS.asObservable(),this.selectedDocuments=[]}unset(){this.formGroup=void 0}unsetModel(){this.model=null,this.modelS.next(null),this.attachmentsS.next(null),this.connectionsS.next(null),this.chatLogS.next(null)}fetch(s){this.apiService.get(o.tasks.fetch(s)).subscribe(e=>{this.formGroup=new u([]),this.model=e,this.modelS.next(e)})}fetchChatLogList(s){return this.apiService.post(o.tasks.fetchChatLogList,{DocumentQid:s,TaskQid:this.model?.id,TakeAll:!0}).pipe(r(e=>{this.chatLogS.next(e)}))}fetchAttachmentsList(s){this.apiService.get(o.attachments.fetchAttachmentsList(s)).subscribe(e=>{this.attachmentsS.next(e)})}fetchConnectionsList(s){return this.apiService.get(o.documents.fetchConnectionsList(s)).pipe(r(e=>{this.connectionsS.next(e)}))}static{this.\u0275fac=function(e){return new(e||t)(a(h),a(m))}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var i=function(t){return t[t.AllTasks=1]="AllTasks",t[t.AllUnfinishedTasks=2]="AllUnfinishedTasks",t[t.UserTasks=3]="UserTasks",t[t.UnfinishedUserTasks=4]="UnfinishedUserTasks",t}(i||{});var d=function(t){return t.DocType="epDocType",t.FormClassName="epFormClassName",t.WorkFlowControlId="epWorkFlowControlId",t}(d||{}),p=function(t){return t.Documents="TMNDocuments",t.CreateDocument="THECreateDocument",t.dlWF_60="dlWF_60",t.NewVacation="TSifForm_NoviDopust",t}(p||{}),S=function(t){return t.Classification="ltMNClassification",t}(S||{}),D=[{value:i.UnfinishedUserTasks,label:"MyUnfinishedTasks"},{value:i.UserTasks,label:"AllMyTasks"},{value:i.AllUnfinishedTasks,label:"AllUnfinishedTasks"},{value:i.AllTasks,label:"AllTasks"}];export{$ as a,i as b,d as c,p as d,S as e,D as f};
