1import{H as it}from"./chunk-ZZTIN4GI.js";import"./chunk-INHJHDBO.js";import"./chunk-5N7FOXNQ.js";import"./chunk-BYMAUBGM.js";import"./chunk-MMIGDUWD.js";import"./chunk-CJRK3T4L.js";import"./chunk-OXQUHS3H.js";import"./chunk-P5KFRL6V.js";import"./chunk-A26O3FGY.js";import"./chunk-MFRGMXK5.js";import"./chunk-7GEZUKAP.js";import"./chunk-BY25MCOB.js";import"./chunk-4ELR7O6R.js";import"./chunk-EQUWEW4E.js";import{C as tt,G as et}from"./chunk-XH2FTEW6.js";import{d as q}from"./chunk-UZCIA3XM.js";import{k as $}from"./chunk-JAHL4O5B.js";import{e as U}from"./chunk-S6YIDZD3.js";import"./chunk-ETOOYZXZ.js";import"./chunk-2NPAOGKL.js";import"./chunk-VIMXTOPS.js";import"./chunk-LW3GYOL2.js";import"./chunk-UV65SGCM.js";import"./chunk-WV5NZCWG.js";import"./chunk-XP7IAX7E.js";import"./chunk-7M7WYRAY.js";import"./chunk-GZTFORZ5.js";import"./chunk-TNAQQULJ.js";import{a as J,b as K,d as Q,e as W,g as X,i as Y,j as Z}from"./chunk-3PRTE4PN.js";import"./chunk-NKUYZACS.js";import"./chunk-GZCRLJZM.js";import"./chunk-RCJTMARP.js";import{c as V,d as L}from"./chunk-53DOX2OC.js";import{c as z,e as H}from"./chunk-GL5VAVUH.js";import{I as F,K as G}from"./chunk-OWD7JG7T.js";import{Fa as B,Ka as O,m as D,p as R}from"./chunk-7LUFMYSS.js";import"./chunk-U4TFHOKU.js";import{$a as o,Cc as j,Dc as k,Ec as w,Jb as p,Lb as s,M as y,Qb as l,Rb as a,Sb as r,Tb as _,Tc as f,Uc as g,Vc as E,Yc as A,_b as T,cc as v,e as x,ec as u,fa as d,jd as P,ka as M,la as h,ob as S,qc as I,tc as m,ub as N,uc as b,vc as C}from"./chunk-2HTR7ORR.js";import"./chunk-YDOPGCYI.js";import"./chunk-VTHXE323.js";function ot(e,t){e&1&&_(0,"catman-loader",16),e&2&&l("size",24)}function at(e,t){e&1&&(a(0,"mat-icon"),m(1,"done_all"),r())}function rt(e,t){e&1&&(a(0,"mat-icon"),m(1,"done_all"),r())}function mt(e,t){if(e&1){let i=T();a(0,"button",15),f(1,"translate"),v("click",function(){M(i);let n=u();return h(n._onMarkAsReadClick())}),p(2,ot,1,1,"catman-loader",16)(3,at,2,0,"mat-icon"),N(4,rt,2,0,"ng-template",null,0,A),r()}if(e&2){let i=u();l("disabled",i._updating)("matTooltip",g(1,3,"general.notificaciones.card.button.mark")),o(2),s(i._updating?2:3)}}function ct(e,t){e&1&&(a(0,"div",12)(1,"mat-icon",17),m(2,"done_all"),r()())}function dt(e,t){if(e&1&&(a(0,"div",14),m(1),r()),e&2){u();let i=w(0);o(),C(" ",i.productName," ")}}var nt=class e{comment=P(void 0);_showAvatar;_updating=!1;_dialogsService=d($);_projectApiService=d(it);_readSubject=new x;_router=d(U);constructor(){d(q).allowedFunctionality.subscribe({next:t=>{this._showAvatar=t["user.perfil-image"]}})}ngOnDestroy(){this._readSubject.complete()}_onGoToProjectClick(){let t=this.comment();t.read?this._router.navigateByUrl(`/my-projects/${t.projectCode}`):this._onCommentRead().subscribe({next:i=>{if(i){let c=this.comment();c.read=!0,this._router.navigateByUrl(`/my-projects/${c.projectCode}`)}},error:i=>this._dialogsService.showErrorSnackbar(i)})}_onMarkAsReadClick(){this._onCommentRead().subscribe({next:t=>{t&&(this.comment().read=!0)},error:t=>this._dialogsService.showErrorSnackbar(t)})}_onCommentRead(){let t=this.comment();return this._updating=!0,this._projectApiService.commentRead(t.projectCode,t.id).pipe(y(()=>this._updating=!1))}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=S({type:e,selectors:[["catman-notification-card"]],inputs:{comment:[1,"comment"]},decls:23,vars:19,consts:[["icon",""],["appearance","outlined",1,"shadow-md!"],["matCardAvatar",""],[3,"showImage","userImage","userName","userNameInitials"],["matCardTitle",""],["role","button","tabindex","0",3,"click","matTooltip"],["matCardSubtitle",""],[1,"flex","flex-col"],[1,"text-xs","text-gray-500"],[1,"absolute","top-3.25","right-3.75","flex","items-center"],[1,"shrink-0","grow-0"],["mat-icon-button","",1,"icon-button-small",3,"disabled","matTooltip"],[1,"flex","w-9","justify-center"],[1,"mt-3","mat-body-2"],[1,"product","mat-caption"],["mat-icon-button","",1,"icon-button-small",3,"click","disabled","matTooltip"],[3,"size"],[1,"read"]],template:function(i,c){if(i&1&&(j(0),a(1,"mat-card",1)(2,"mat-card-header")(3,"div",2),_(4,"catman-avatar-image",3),r(),a(5,"div",4)(6,"a",5),f(7,"translate"),v("click",function(){return c._onGoToProjectClick()}),m(8),r()(),a(9,"div",6)(10,"div",7)(11,"span",8),m(12),f(13,"date"),r(),a(14,"span",8),m(15),r()()(),a(16,"div",9)(17,"div",10),p(18,mt,6,5,"button",11)(19,ct,3,0,"div",12),r()()(),a(20,"mat-card-content",13),p(21,dt,2,1,"div",14),m(22),r()()),i&2){let n=k(c.comment());o(),I("notification-not-read",!n.read),o(3),l("showImage",c._showAvatar)("userImage",n.profileImage)("userName",n.userName)("userNameInitials",n.userNameInitials
1),o(2),l("matTooltip",g(7,14,"general.notificaciones.card.button.project")),o(2),C(" ",n.projectName," "),o(4),b(E(13,16,n.lastUpdate,"dd/MM/yy HH:mm")),o(3),b(n.userName),o(3),s(n.read?19:18),o(3),s(n.productCode?21:-1),o(),C(" ",n.comment," ")}},dependencies:[tt,et,R,O,B,Z,J,Y,Q,X,W,K,L,V,H,z,G,D,F],styles:[".notification-not-read[_ngcontent-%COMP%]{background-color:#0080ff1a!important}.read[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.product[_ngcontent-%COMP%]{color:#b31620}.mat-mdc-card-actions[_ngcontent-%COMP%]{min-height:0}"]})};export{nt as CatmanNotificationCardComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.