1import{g as k,u as S,t as u,j as t,C as i,a as e,b as c,c as o,d as n,f as x,B as j,e as y}from"./index-CMjSxCKv.js";import{D}from"./DashboardLayout-DRtOb4Ng.js";import{T as I,a as M,b as r,c as d}from"./tabs-BAbhX8zb.js";import{B as v}from"./bell-DHiSgnhn.js";import{C as b}from"./circle-check-big-DUFZDawz.js";import"./dialog-DBoB1lEi.js";import"./shield-check-DD5U_9mZ.js";/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const P=k("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const w=k("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);function F(){const{user:C}=S(),{data:a,isLoading:A}=u.notifications.list.useQuery(void 0,{enabled:!!C}),p=u.notifications.markAsRead.useMutation(),T=async s=>{try{await p.mutateAsync({notificationId:s}),y.success("Notification marked as read")}catch{y.error("Failed to update notification")}},f=a?.filter(s=>!s.read).length||0,N=a?.filter(s=>s.type==="transaction")||[],g=a?.filter(s=>s.type==="alert")||[],m=a?.filter(s=>s.type==="promotion")||[],h=a?.filter(s=>s.type==="security")||[],L=s=>{switch(s){case"transaction":return t.jsx(b,{"data-loc":"client/src/pages/Notifications.tsx:42",className:"h-5 w-5 text-blue-600"});case"alert":return t.jsx(x,{"data-loc":"client/src/pages/Notifications.tsx:44",className:"h-5 w-5 text-red-600"});case"promotion":return t.jsx(w,{"data-loc":"client/src/pages/Notifications.tsx:46",className:"h-5 w-5 text-green-600"});case"security":return t.jsx(x,{"data-loc":"client/src/pages/Notifications.tsx:48",className:"h-5 w-5 text-orange-600"});default:return t.jsx(v,{"data-loc":"client/src/pages/Notifications.tsx:50",className:"h-5 w-5 text-gray-600"})}},l=({notification:s})=>t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:55",className:`p-4 border rounded-lg flex items-start gap-4 ${s.read?"":"bg-blue-50"}`,children:[t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:56",className:"mt-1",children:L(s.type)}),t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:57",className:"flex-1 min-w-0",children:[t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:58",className:`font-medium ${s.read?"":"font-semibold"}`,children:s.title}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:59",className:"text-sm text-muted-foreground mt-1",children:s.message}),t.jsxs("p",{"data-loc":"client/src/pages/Notifications.tsx:60",className:"text-xs text-muted-foreground mt-2",children:[new Date(s.createdAt).toLocaleDateString()," at"," ",new Date(s.createdAt).toLocaleTimeString()]})]}),t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:65",className:"flex gap-2",children:!s.read&&t.jsx(j,{"data-loc":"client/src/pages/Notifications.tsx:67",size:"sm",variant:"ghost",onClick:()=>T(s.id),disabled:p.isPending,children:t.jsx(P,{"data-loc":"client/src/pages/Notifications.tsx:73",className:"h-4 w-4"})})})]});return t.jsx(D,{"data-loc":"client/src/pages/Notifications.tsx:81",children:t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:82",className:"space-y-8",children:[t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:83",children:t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:84",className:"flex items-center justify-between",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:85",children:[t.jsx("h1",{"data-loc":"client/src/pages/Notifications.tsx:86",className:"text-3xl font-bold tracking-tight",children:"Notifications"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:87",className:"text-muted-foreground mt-2",children:"Stay updated with your account activity"})]}),f>0&&t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:90",className:"bg-red-100 text-red-800 px-3 py-1 rounded-full text-sm font-medium",children:[f," unread"]})]})}),t.jsxs(I,{"data-loc":"client/src/pages/Notifications.tsx:97",defaultValue:"all",className:"w-full",children:[t.jsxs(M,{"data-loc":"client/src/pages/Notifications.tsx:98",className:"grid w-full grid-cols-5",children:[t.jsx(r,{"data-loc":"client/src/pages/Notifications.tsx:99",value:"all",children:"All"}),t.jsx(r,{"data-loc":"client/src/pages/Notifications.tsx:100",value:"transaction",children:"Transactions"}),t.jsx(r,{"data-loc":"client/src/pages/Notifications.tsx:101",value:"alert",children:"Alerts"}),t.jsx(r,{"data-loc":"client/src/pages/Notifications.tsx:102",value:"promotion",children:"Promotions"}),t.jsx(r,{"data-loc":"client/src/pages/Notifications.tsx:103",value:"security",children:"Security"})]}),t.jsx(d,{"data-loc":"client/src/pages/Notifications.tsx:107",value:"all",children:t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:108",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:109",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:110",children:"All Notifications"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:111",children:"Your complete notification history"})]}),t.jsx(n,{"data-loc":"client/src/pages/Notifications.tsx:113",children:A?t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:115",children:"Loading notifications..."}):a&&a.length>0?t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:117",className:"space-y-3",children:a.map(s=>t.jsx(l,{"data-loc":"client/src/pages/Notifications.tsx:119",notification:s},s.id))}):t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:123",className:"text-center py-12",children:[t.jsx(v,{"data-loc":"client/src/pages/Notifications.tsx:124",className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-50"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:125",className:"text-muted-foreground",children:"No notifications yet"})]})})]})}),t.jsx(d,{"data-loc":"client/src/pages/Notifications.tsx:133",value:"transaction",children:t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:134",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:135",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:136",children:"Transaction Notifications"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:137",children:"Updates on your transfers and payments"})]}),t.jsx(n,{"data-loc":"client/src/pages/Notifications.tsx:139",children:N.length>0?t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:141",className:"space-y-3",children:N.map(s=>t.jsx(l,{"data-loc":"client/src/pages/Notifications.tsx:143",notification:s},s.id))}):t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:147",className:"text-center py-12",children:[t.jsx(b,{"data-loc":"client/src/pages/Notifications.tsx:148",className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-50"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:149",className:"text-muted-foreground",children:"No transaction notifications"})]})})]})}),t.jsx(d,{"data-loc":"client/src/pages/Notifications.tsx:157",value:"alert",children:t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:158",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:159",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:160",children:"Alerts"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:161",children:"Important account alerts and warnings"})]}),t.jsx(n,{"data-loc":"client/src/pages/Notifications.tsx:163",children:g.length>0?t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:165",className:"space-y-3",children:g.map(s=>t.jsx(l,{"data-loc":"client/src/pages/Notifications.tsx:167",notification:s},s.id))}):t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:171",className:"text-center py-12",children:[t.jsx(x,{"data-loc":"client/src/pages/Notifications.tsx:172",className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-50"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:173",className:"text-muted-foreground",children:"No alerts"})]})})]})}),t.jsx(d,{"data-loc":"client/src/pages/Notifications.tsx:181",value:"promotion",children:t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:182",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:183",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:184",children:"Promotions & Offers"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:185",children:"Special offers and promotions for you"})]}),t.jsx(n,{"data-loc":"client/src/pages/Notifications.tsx:187",children:m.length>0?t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:189",className:"space-y-3",children:m.map(s=>t.jsx(l,{"data-loc":"client/src/pages/Notifications.tsx:191",notification:s},s.id))}):t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:195",className:"text-center py-12",children:[t.jsx(w,{"data-loc":"client/src/pages/Notifications.tsx:196",className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-50"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:197",className:"text-muted-foreground",children:"No promotions at this time"})]})})]})}),t.jsx(d,{"data-loc":"client/src/pages/Notifications.tsx:205",value:"security",children:t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:206",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:207",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:208",children:"Security Notifications"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:209",children:"Account security and login alerts"})]}),t.jsx(n,{"data-loc":"client/src/pages/Notifications.tsx:211",children:h.length>0?t.jsx("div",{"data-loc":"client/src/pages/Notifications.tsx:213",className:"space-y-3",children:h.map(s=>t.jsx(l,{"data-loc":"client/src/pages/Notifications.tsx:215",notification:s},s.id))}):t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:219",className:"text-center py-12",children:[t.jsx(x,{"data-loc":"client/src/pages/Notifications.tsx:220",className:"h-12 w-12 text-muted-foreground mx-auto mb-4 opacity-50"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:221",className:"text-muted-foreground",children:"No security alerts"})]})})]})})]}),t.jsxs(i,{"data-loc":"client/src/pages/Notifications.tsx:230",children:[t.jsxs(e,{"data-loc":"client/src/pages/Notifications.tsx:231",children:[t.jsx(c,{"data-loc":"client/src/pages/Notifications.tsx:232",children:"Notification Preferences"}),t.jsx(o,{"data-loc":"client/src/pages/Notifications.tsx:233",children:"Manage how you receive notifications"})]}),t.jsxs(n,{"data-loc":"client/src/pages/Notifications.tsx:235",className:"space-y-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:236",className:"flex items-center justify-between p-4 border rounded-lg",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:237",children:[t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:238",className:"font-medium",children:"Transaction Alerts"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:239",className:"text-sm text-muted-foreground",children:"Get notified when transfers complete"})]}),t.jsx("input",{"data-loc":"client/src/pages/Notifications.tsx:241",type:"checkbox",defaultChecked:!0,className:"w-5 h-5"})]}),t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:243",className:"flex items-center justify-between p-4 border rounded-lg",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:244",children:[t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:245",className:"font-medium",children:"Security Alerts"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:246",className:"text-sm text-muted-foreground",children:"Get notified of login attempts and changes"})]}),t.jsx("input",{"data-loc":"client/src/pages/Notifications.tsx:248",type:"checkbox",defaultChecked:!0,className:"w-5 h-5"})]}),t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:250",className:"flex items-center justify-between p-4 border rounded-lg",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:251",children:[t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:252",className:"font-medium",children:"Promotional Offers"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:253",className:"text-sm text-muted-foreground",children:"Receive special offers and promotions"})]}),t.jsx("input",{"data-loc":"client/src/pages/Notifications.tsx:255",type:"checkbox",className:"w-5 h-5"})]}),t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:257",className:"flex items-center justify-between p-4 border rounded-lg",children:[t.jsxs("div",{"data-loc":"client/src/pages/Notifications.tsx:258",children:[t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:259",className:"font-medium",children:"Email Notifications"}),t.jsx("p",{"data-loc":"client/src/pages/Notifications.tsx:260",className:"text-sm text-muted-foreground",children:"Receive notifications via email"})]}),t.jsx("input",{"data-loc":"client/src/pages/Notifications.tsx:262",type:"checkbox",defaultChecked:!0,className:"w-5 h-5"})]}),t.jsx(j,{"data-loc":"client/src/pages/Notifications.tsx:264",children:"Save Preferences"})]})]})]})})}export{F as default};
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.