(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[4594],{94594:function(t,e,n){"use strict";n.d(e,{j:function(){return g}});var i=n(64762),a=n(37716),o=n(20985),s=n(53760),c=n(35957),r=n(38583);function h(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"ion-item",4),a.NdJ("click",function(){const e=a.CHM(t).$implicit;return a.oxw(2).viewDocument(e.Link)}),a._UZ(1,"ion-icon",5),a.TgZ(2,"ion-label",6),a.TgZ(3,"h3",7),a._uU(4),a.qZA(),a.TgZ(5,"p"),a._uU(6),a.qZA(),a.TgZ(7,"p"),a._uU(8),a.qZA(),a.TgZ(9,"p",8),a._uU(10),a.qZA(),a.qZA(),a.qZA()}if(2&t){const t=e.$implicit;a.xp6(4),a.Oqu(t.SourceName),a.xp6(2),a.Oqu(t.Description),a.xp6(2),a.Oqu(t.CreateDate),a.xp6(2),a.Oqu(t.Stakeholders)}}function d(t,e){if(1&t&&(a.TgZ(0,"div"),a.TgZ(1,"ion-list"),a.TgZ(2,"ion-item-sliding"),a.YNc(3,h,11,4,"ion-item",3),a.qZA(),a.qZA(),a.qZA()),2&t){const t=a.oxw();a.xp6(3),a.Q6J("ngForOf",t.loadedEventAttachments)}}function l(t,e){1&t&&(a.TgZ(0,"div"),a.TgZ(1,"ion-list"),a.TgZ(2,"ion-item"),a.TgZ(3,"ion-avatar",0),a._UZ(4,"ion-skeleton-text",9),a.qZA(),a.TgZ(5,"ion-label"),a.TgZ(6,"h3"),a._UZ(7,"ion-skeleton-text",10),a.qZA(),a.TgZ(8,"p"),a._UZ(9,"ion-skeleton-text",11),a.qZA(),a.TgZ(10,"p"),a._UZ(11,"ion-skeleton-text",12),a.qZA(),a.qZA(),a.qZA(),a.TgZ(12,"ion-item"),a.TgZ(13,"ion-avatar",0),a._UZ(14,"ion-skeleton-text",9),a.qZA(),a.TgZ(15,"ion-label"),a.TgZ(16,"h3"),a._UZ(17,"ion-skeleton-text",10),a.qZA(),a.TgZ(18,"p"),a._UZ(19,"ion-skeleton-text",11),a.qZA(),a.TgZ(20,"p"),a._UZ(21,"ion-skeleton-text",12),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA())}let g=(()=>{class t{constructor(t,e,n,i){this.attachamentsService=t,this.iab=e,this.modalCtrl=n,this.navParams=i}ngOnInit(){this.loadAttachments(this.navParams.get("eventId"))}loadAttachments(t){this.attachamentsService.getAttachmentsById(t).subscribe(e=>{this.loadedEventAttachments=e,this.pageId=t})}viewDocument(t){return(0,i.mG)(this,void 0,void 0,function*(){const e=t.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");this.iab.create(e,"_blank").show()})}close(){this.modalCtrl.dismiss(null)}}return t.\u0275fac=function(e){return new(e||t)(a.Y36(o.o),a.Y36(s.i),a.Y36(c.IN),a.Y36(c.X1))},t.\u0275cmp=a.Xpm({type:t,selectors:[["app-attachments"]],decls:9,vars:2,consts:[["slot","start"],["defaultHref","","icon","chevron-back",3,"click"],[4,"ngIf"],["class","main-item","lines","none",3,"click",4,"ngFor","ngForOf"],["lines","none",1,"main-item",3,"click"],["name","attach",1,"ion-icon-attach",2,"zoom","1.5"],[1,"div-content-attachment"],[1,"h3"],[1,"item-list-small"],["animated",""],["animated","",2,"width","50%"],["animated","",2,"width","80%"],["animated","",2,"width","60%"]],template:function(t,e){1&t&&(a.TgZ(0,"ion-header"),a.TgZ(1,"ion-toolbar"),a.TgZ(2,"ion-buttons",0),a.TgZ(3,"ion-back-button",1),a.NdJ("click",function(){return e.close()}),a.qZA(),a.qZA(),a.TgZ(4,"ion-title"),a._uU(5,"Anexos do evento"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(6,"ion-content"),a.YNc(7,d,4,1,"div",2),a.YNc(8,l,22,0,"div",2),a.qZA()),2&t&&(a.xp6(7),a.Q6J("ngIf",e.loadedEventAttachments),a.xp6(1),a.Q6J("ngIf",!e.loadedEventAttachments))},directives:[c.Gu,c.sr,c.Sm,c.oU,c.cs,c.wd,c.W2,r.O5,c.q_,c.td,r.sg,c.Ie,c.gu,c.Q$,c.BJ,c.CK],styles:["ion-back-button[_ngcontent-%COMP%]{display:block}ion-content[_ngcontent-%COMP%]{--background:#f2f2f2}.div-attach-results[_ngcontent-%COMP%], ion-item-sliding[_ngcontent-%COMP%], ion-list[_ngcontent-%COMP%]{background:none}.item-list-small[_ngcontent-%COMP%]{font-size:14px;overflow:auto}.ion-item-class[_ngcontent-%COMP%]{padding:0}.label-text[_ngcontent-%COMP%]{width:100%;padding:0;margin:0}.main-item[_ngcontent-%COMP%]{margin:15px;border-radius:5px;box-shadow:0 4px 8px 0 #ccc,0 6px 20px 0 #f2f2f2}.div-content-attachment[_ngcontent-%COMP%]{margin:0;padding:10px}.div-content-attachment[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;font-weight:700;padding-bottom:5px}ion-item[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{--border-color:red}.custom-skeleton[_ngcontent-%COMP%] ion-skeleton-text[_ngcontent-%COMP%]{line-height:13px}.custom-skeleton[_ngcontent-%COMP%] ion-skeleton-text[_ngcontent-%COMP%]:last-child{margin-bottom:5px}"]}),t})()},20985:function(t,e,n){"use strict";n.d(e,{o:function(){return c}});var i=n(91841),a=n(92340),o=n(37716),s=n(37556);let c=(()=>{class t{constructor(t,e){this.http=t,this.loggeduser=e.ValidatedUser,this.headers=new i.WM,this.headers=this.headers.set("Authorization",this.loggeduser.BasicAuthKey)}getAttachmentsBySerial(t){let e=a.N.apiURL+"attachments/GetAttachments",n=new i.LE;return n=n.set("SerialNumber",t),this.http.get(`${e}`,{headers:this.headers,params:n})}getAttachments(t,e){let n=a.N.apiURL+"attachments/GetSourceName",o=new i.LE;return o=o.set("Source",t.toString()),this.http.get(`${n}`,{headers:this.headers,params:o})}getAttachmentsById(t){let e=a.N.apiURL+"attachments/GetAttachmentsByEventId",n=new i.LE;return n=n.set("ParentId",t),this.http.get(`${e}`,{headers:this.headers,params:n})}setEventAttachmentById(t){return this.http.post(a.N.apiURL+"Attachments/Create",t,{headers:this.headers})}deleteEventAttachmentById(t){let e=a.N.apiURL+`Attachments/Delete?attachmentId=${t}`,n=new i.LE;return n=n.set("attachmentId",t),this.http.delete(`${e}`,{headers:this.headers,params:n})}AddAttachment(t){return this.http.post(a.N.apiURL+"Attachments/CreateAttachmentProcess",t,{headers:this.headers})}}return t.\u0275fac=function(e){return new(e||t)(o.LFG(i.eN),o.LFG(s.e))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()}}]);