1import{a as R}from"./chunk-VTIF6GGI.js";import"./chunk-JCLIVLFI.js";import"./chunk-KGVH7VIN.js";import"./chunk-DSIDUYXM.js";import"./chunk-UDKRQ2FU.js";import{a as I}from"./chunk-C6JOS4CG.js";import"./chunk-DA6X5B4D.js";import"./chunk-YPIHMCBJ.js";import{e as T,g as z}from"./chunk-5DGPUUKX.js";import{Eb as u,Fb as c,Oa as o,Qb as k,Sb as E,Tb as a,Ub as m,Vb as w,Y as M,Za as P,ba as s,bc as N,ca as g,dc as x,ec as C,fc as S,jb as b,kb as f,mb as _,pb as O,qb as v,vb as i,wb as e,xb as y,zb as h}from"./chunk-FEHQSQD2.js";var V=(n,d)=>d.id;function D(n,d){if(n&1&&(i(0,"span",4),a(1),e()),n&2){let t=c();o(),w("",t.unreadCount()," unread")}}function F(n,d){if(n&1){let t=h();i(0,"button",8),u("click",function(){s(t);let l=c();return g(l.markAllRead())}),i(1,"span",9),a(2,"done_all"),e(),a(3," Mark all read "),e()}}function A(n,d){n&1&&(i(0,"div",6)(1,"span",10),a(2,"notifications_none"),e(),i(3,"p",11),a(4),x(5,"t"),e(),i(6,"p",12),a(7),x(8,"t"),e()()),n&2&&(o(4),m(C(5,2,"notification.empty")),o(3),m(C(8,4,"notification.empty_sub")))}function $(n,d){n&1&&y(0,"span",19)}function j(n,d){if(n&1){let t=h();i(0,"div",14),u("click",function(){let l=s(t).$implicit,p=c(2);return g(p.markRead(l))})("keydown.enter",function(){let l=s(t).$implicit,p=c(2);return g(p.markRead(l))})("keydown.space",function(l){let p=s(t).$implicit;return c(2).markRead(p),g(l.preventDefault())}),i(1,"div")(2,"span",9),a(3),e()(),i(4,"div",15)(5,"div",16),a(6),e(),i(7,"div",17),a(8),e(),i(9,"div",18),a(10),x(11,"date"),e()(),f(12,$,1,0,"span",19),e()}if(n&2){let t=d.$implicit,r=c(2);k("unread",!t.read),b("aria-label",t.title),o(),E(N("notif-icon type-",t.type.toLowerCase())),o(2),m(r.typeIcon(t.type)),o(3),m(t.title),o(2),m(t.message),o(2),m(S(11,11,t.createdAt,"medium")),o(2),_(t.read?-1:12)}}function B(n,d){if(n&1&&(i(0,"div",7),O(1,j,13,14,"div",13,V),e()),n&2){let t=c();o(),v(t.notifications())}}var Y=(()=>{class n{constructor(){this.svc=M(R),this.notifications=this.svc.notifications,this.unreadCount=this.svc.unreadCount}markRead(t){t.read||this.svc.markRead(t.id)}markAllRead(){this.svc.markAllRead()}typeIcon(t){return{INFO:"info",WARNING:"warning",PROMO:"sell",UPDATE:"system_update"}[t]??"notifications"}static{this.\u0275fac=function(r){return new(r||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-notification"]],decls:10,vars:6,consts:[[1,"page"],[1,"page-header"],[1,"header-left"],[1,"page-title"],[1,"unread-badge"],[1,"btn-mark-all"],[1,"empty-state"],[1,"notif-list"],[1,"btn-mark-all",3,"click"],[1,"material-symbols-rounded"],[1,"material-symbols-rounded","empty-icon"],[1,"empty-title"],[1,"empty-sub"],["role","button","tabindex","0",1,"notif-item",3,"unread"],["role","button","tabindex","0",1,"notif-item",3,"click","keydown.enter","keydown.space"],[1,"notif-body"],[1,"notif-title"],[1,"notif-message"],[1,"notif-date"],[1,"unread-dot"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),a(4),x(5,"t"),e(),f(6,D,2,1,"span",4),e(),f(7,F,4,0,"button",5),e(),f(8,A,9,6,"div",6)(9,B,3,0,"div",7),e()),r&2&&(o(4),m(C(5,4,"page.notification")),o(2),_(l.unreadCount()>0?6:-1),o(),_(l.unreadCount()>0?7:-1),o(),_(l.notifications().length===0?8:9))},dependencies:[z,T,I],styles:["[_nghost-%COMP%]{display:flex;flex:1;overflow:hidden}.page[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:32px 32px 48px;background:#f4f6fb;display:flex;flex-direction:column;gap:0}.page-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;flex-wrap:wrap;gap:12px}.header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.page-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700;color:var(--d-navy);margin:0}.unread-badge[_ngcontent-%COMP%]{padding:2px 10px;border-radius:20px;background:var(--d-primary);color:#fff;font-size:.72rem;font-weight:700}.btn-mark-all[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:7px 14px;background:transparent;border:1.5px solid #d1d5db;border-radius:8px;font-size:.8rem;font-weight:500;color:#374151;cursor:pointer;transition:border-color .15s,color .15s}.btn-mark-all[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{font-size:16px}.btn-mark-all[_ngcontent-%COMP%]:hover{border-color:var(--d-primary);color:var(--d-primary)}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:80px 20px;text-align:center}.empty-icon[_ngcontent-%COMP%]{font-size:52px;color:#d1d5db}.empty-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:600;color:#374151;margin:0}.empty-sub[_ngcontent-%COMP%]{font-size:.875rem;color:#9ca3af;margin:0}.notif-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.notif-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:14px;background:#fff;border:1px solid #e8eaf0;border-radius:12px;padding:16px 18px;
1cursor:pointer;transition:border-color .15s,box-shadow .15s;position:relative}.notif-item[_ngcontent-%COMP%]:hover{border-color:var(--d-primary-soft);box-shadow:0 2px 10px color-mix(in oklch,var(--d-primary) 6%,transparent)}.notif-item.unread[_ngcontent-%COMP%]{background:#faf8ff;border-color:#e0d7ff}.notif-icon[_ngcontent-%COMP%]{flex-shrink:0;width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center}.notif-icon[_ngcontent-%COMP%] .material-symbols-rounded[_ngcontent-%COMP%]{font-size:20px}.notif-icon.type-info[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--d-primary) 10%,transparent);color:var(--d-primary)}.notif-icon.type-warning[_ngcontent-%COMP%]{background:#f59e0b1a;color:#f59e0b}.notif-icon.type-promo[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--d-primary) 10%,transparent);color:var(--d-primary)}.notif-icon.type-update[_ngcontent-%COMP%]{background:#10b9811a;color:#10b981}.notif-body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.notif-title[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--d-navy)}.notif-message[_ngcontent-%COMP%]{font-size:.85rem;color:#6b7280;line-height:1.5}.notif-date[_ngcontent-%COMP%]{font-size:.75rem;color:#9ca3af;margin-top:2px}.unread-dot[_ngcontent-%COMP%]{flex-shrink:0;width:8px;height:8px;border-radius:50%;background:var(--d-primary);margin-top:4px}html:not(.light)[_nghost-%COMP%] .page[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .page[_ngcontent-%COMP%]{background:transparent}html:not(.light)[_nghost-%COMP%] .page-title[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .page-title[_ngcontent-%COMP%]{color:#e2e2f0}html:not(.light)[_nghost-%COMP%] .notif-item[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .notif-item[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--d-card) 55%,transparent);border-color:var(--d-border)}html:not(.light)[_nghost-%COMP%] .notif-item.unread[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .notif-item.unread[_ngcontent-%COMP%]{background:color-mix(in oklch,var(--d-primary) 12%,transparent);border-color:color-mix(in oklch,var(--d-primary) 30%,transparent)}html:not(.light)[_nghost-%COMP%] .notif-item[_ngcontent-%COMP%]:hover, html:not(.light) [_nghost-%COMP%] .notif-item[_ngcontent-%COMP%]:hover{border-color:var(--d-primary-bright)}html:not(.light)[_nghost-%COMP%] .notif-title[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .notif-title[_ngcontent-%COMP%]{color:#e2e2f0}html:not(.light)[_nghost-%COMP%] .notif-message[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .notif-message[_ngcontent-%COMP%]{color:#9ca3af}html:not(.light)[_nghost-%COMP%] .empty-title[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .empty-title[_ngcontent-%COMP%]{color:#c4c4d4}html:not(.light)[_nghost-%COMP%] .btn-mark-all[_ngcontent-%COMP%], html:not(.light) [_nghost-%COMP%] .btn-mark-all[_ngcontent-%COMP%]{border-color:#1e2a44;color:#9ca3af}html:not(.light)[_nghost-%COMP%] .btn-mark-all[_ngcontent-%COMP%]:hover, html:not(.light) [_nghost-%COMP%] .btn-mark-all[_ngcontent-%COMP%]:hover{border-color:var(--d-primary-bright);color:var(--d-primary-bright)}@media(max-width:768px){.page[_ngcontent-%COMP%]{padding:20px 16px 40px}.page-title[_ngcontent-%COMP%]{font-size:1.2rem}}"],changeDetection:0})}}return n})();export{Y as NotificationComponent};
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.