1import{j as e}from"./index-BzykBEZi.js";import{r as s}from"./react-vendor-MSAyDDoi.js";import{$ as t,p as r,C as a,a2 as i,U as n,a1 as l,y as c,aO as o,S as d,l as m}from"./icons-vendor-DZcQ4_Wo.js";import"./auth-vendor-p9lNoiyd.js";import"./stripe-vendor-D4jxSIHn.js";function x(){const[x,h]=s.useState("alerts"),[p,y]=s.useState("weekly"),[b,g]=s.useState({metricChanges:!0,milestones:!0,weeklyDigest:!0,monthlyBriefing:!0,peerActivity:!1,playbookUpdates:!0,boardReports:!0}),u=[{id:1,type:"metric-change",severity:"success",icon:t,title:"NRR Improved to 108%",message:"Net Revenue Retention increased by 5 percentage points this month. Expansion revenue is accelerating.",timestamp:"2 hours ago",metric:"NRR",change:"+5%",actionable:!0,action:"View Details"},{id:2,type:"warning",severity:"warning",icon:r,title:"Churn Rate Above Target",message:"Monthly churn rate is 3.2%, still above your target of 2.0%. Consider implementing retention playbook.",timestamp:"5 hours ago",metric:"Churn",change:"+0.3%",actionable:!0,action:"View Playbook"},{id:3,type:"milestone",severity:"success",icon:a,title:"Milestone Achieved: CAC Reduced by 40%",message:"You've successfully reduced Customer Acquisition Cost from $5,200 to $4,800. Congratulations!",timestamp:"1 day ago",metric:"CAC",change:"-40%",actionable:!1},{id:4,type:"metric-change",severity:"info",icon:i,title:"Gross Margin Trending Up",message:"Gross margin increased from 55% to 58% over the past quarter. On track to hit 65% target.",timestamp:"2 days ago",metric:"Gross Margin",change:"+3%",actionable:!1},{id:5,type:"peer-activity",severity:"info",icon:n,title:"New Discussion in Your Archetype",message:'A CEO in the "Struggling Middle" group shared a success story about reducing CAC by 45%.',timestamp:"3 days ago",actionable:!0,action:"Read Discussion"},{id:6,type:"metric-change",severity:"critical",icon:l,title:"CAC Payback Period Increased",message:"CAC Payback period increased from 12 to 14 months. This may impact cash flow projections.",timestamp:"4 days ago",metric:"CAC Payback",change:"+2 months",actionable:!0,action:"Analyze Cause"},{id:7,type:"board-report",severity:"info",icon:c,title:"Monthly Board Report Ready",message:"Your automated monthly board report has been generated and is ready for review.",timestamp:"5 days ago",actionable:!0,action:"View Report"}],j=[{id:1,title:"Weekly Executive Briefing",date:"2025-10-08",time:"9:00 AM",content:"Summary of key metrics, alerts, and recommended actions for the week",recipients:["[email protected]"]},{id:2,title:"Monthly Transformation Update",date:"2025-10-15",time:"8:00 AM",content:"Comprehensive progress report on your transformation journey with benchmarks",recipients:["[email protected]","[email protected]"]},{id:3,title:"Quarterly Business Review",date:"2025-10-30",time:"10:00 AM",content:"In-depth analysis of Q4 performance with forward-looking projections",recipients:["[email protected]","[email protected]"]}],f=e=>{switch(e){case"success":return"bg-green-50 border-green-300 text-green-800";case"warning":return"bg-yellow-50 border-yellow-300 text-yellow-800";case"critical":return"bg-red-50 border-red-300 text-red-800";default:return"bg-primary-50 border-primary-300 text-primary-800"}},N=e=>{switch(e){case"success":return"text-green-600";case"warning":return"text-yellow-600";case"critical":return"text-red-600";default:return"text-primary-600"}},v=u.filter(e=>!e.read).length;return e.jsxs("div",{className:"max-w-7xl mx-auto py-12 px-4",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-primary-600 to-secondary-700 bg-clip-text text-transparent mb-4",children:"Alerts & Notifications"}),e.jsx("p",{className:"text-lg text-secondary-800",children:"Stay informed about important changes and milestones"})]}),e.jsx("div",{className:"bg-gradient-to-r from-primary-50 to-accent-50 rounded-lg shadow-md p-6 mb-8 border-2 border-primary-300",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-2",children:[e.jsx(o,{className:"text-primary-600 mr-2",size:20}),e.jsx("p",{className:"text-sm font-semibold text-secondary-700",children:"Unread Alerts"})]}),e.jsx("p",{className:"text-3xl font-bold text-primary-900",children:v})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-2",children:[e.jsx(t,{className:"text-green-600 mr-2",size:20}),e.jsx("p",{className:"text-sm font-semibold text-secondary-700",children:"Positive Changes"})]}),e.jsx("p",{className:"text-3xl font-bold text-green-900",children:"3"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-2",children:[e.jsx(r,{className:"text-yellow-600 mr-2",size:20}),e.jsx("p",{className:"text-sm font-semibold text-secondary-700",children:"Need Attention"})]}),e.jsx("p",{className:"text-3xl font-bold text-yellow-900",children:"2"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-2",children:[e.jsx(c,{className:"text-primary-600 mr-2",size:20}),e.jsx("p",{className:"text-sm font-semibold text-secondary-700",children:"Upcoming Briefings"})]}),e.jsx("p",{className:"text-3xl font-bold text-primary-900",children:j.length})]})]})}),e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"flex space-x-2 border-b border-gray-200",children:[{id:"alerts",name:"Recent Alerts",icon:o},{id:"briefings",name:"Upcoming Briefings",icon:c},{id:"settings",name:"Notification Settings",icon:d}].map(s=>{const t=s.icon;return e.jsxs("button",{onClick:()=>h(s.id),className:"flex items-center space-x-2 px-6 py-3 font-semibold border-b-2 transition-colors "+(x===s.id?"border-primary-600 text-primary-600":"border-transparent text-secondary-600 hover:text-secondary-900"),children:[e.jsx(t,{size:20}),e.jsx("span",{children:s.name}),"alerts"===s.id&&v>0&&e.jsx("span",{className:"bg-red-600 text-white text-xs font-bold px-2 py-0.5 rounded-full",children:v})]},s.id)})})}),"alerts"===x&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-bold text-secondary-900",children:"Recent Alerts"}),e.jsx("button",{className:"text-primary-600 hover:text-primary-700 font-semibold text-sm",children:"Mark All as Read"})]}),u.map(s=>{const t=s.icon;return e.jsx("div",{className:`bg-white rounded-lg shadow-md p-6 border-l-4 ${f(s.severity)} hover:shadow-lg transition-shadow`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start space-x-4 flex-1",children:[e.jsx("div",{className:`p-3 rounded-full bg-white ${N(s.severity)}`,children:e.jsx(t,{size:24})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-bold text-secondary-900 mb-1",children:s.title}),e.jsx("p",{className:"text-sm text-secondary-700 mb-2",children:s.message}),e.jsxs("div",{className:"flex items-center space-x-4 text-xs text-secondary-600",children:[e.jsx("span",{children:s.timestamp}),s.metric&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"â¢"}),e.jsx("span",{className:"font-semibold",children:s.metric})]}),s.change&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"â¢"}),e.jsx("span",{className:"font-semibold "+(s.change.startsWith("+")&&"success"===s.severity||s.change.startsWith("-")&&"success"===s.severity?"text-green-600":"warning"===s.severity||"critical"===s.severity?"text-red-600":"text-secondary-600"),children:s.change})]})]})]})]}),s.actionable&&e.jsx("button",{className:"ml-4 bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg font-semibold text-sm transition-colors whitespace-nowrap",children:s.action})]})},s.id)})]}),"briefings"===x&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[e.jsx("h2",{className:"text-xl font-bold text-secondary-900 mb-4",children:"Automated Briefing Schedule"}),e.jsx("p",{className:"text-sm text-secondary-700 mb-4",children:"Snapshot9 automatically generates executive briefings and delivers them to your inbox. Customize your schedule below."}),e.jsx("div",{className:"space-y-4",children:j.map(s=>e.jsx("div",{className:"border-2 border-primary-200 rounded-lg p-6 bg-primary-50",children:e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-bold text-secondary-900 mb-2",children:s.title}),e.jsxs("div",{className:"flex items-center space-x-3 text-sm text-secondary-700 mb-3",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(c,{size:16,className:"mr-1"}),s.date]}),e.jsx("span",{children:"â¢"}),e.jsx("span",{children:s.time})]}),e.jsx("p",{className:"text-sm text-secondary-700 mb-3",children:s.content}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(m,{size:16,className:"text-primary-600"}),e.jsxs("span",{className:"text-xs text-secondary-600",children:["Recipients: ",s.recipients.join(", ")
1]})]})]}),e.jsx("button",{className:"ml-4 text-primary-600 hover:text-primary-700 font-semibold text-sm",children:"Edit"})]})},s.id))}),e.jsxs("div",{className:"mt-6 pt-6 border-t border-secondary-200",children:[e.jsx("h3",{className:"font-bold text-secondary-900 mb-3",children:"Email Frequency"}),e.jsx("div",{className:"flex space-x-4",children:["daily","weekly","monthly"].map(s=>e.jsx("button",{onClick:()=>y(s),className:"px-4 py-2 rounded-lg font-semibold transition-colors "+(p===s?"bg-primary-600 text-white":"bg-secondary-100 text-secondary-700 hover:bg-secondary-200"),children:s.charAt(0).toUpperCase()+s.slice(1)},s))})]})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[e.jsx("h2",{className:"text-xl font-bold text-secondary-900 mb-4",children:"Preview: This Week's Briefing"}),e.jsxs("div",{className:"bg-secondary-50 rounded-lg p-6 border border-secondary-200",children:[e.jsx("h3",{className:"text-lg font-bold text-secondary-900 mb-4",children:"Executive Briefing - Week of Oct 8, 2025"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-secondary-900 mb-2",children:"Key Highlights"}),e.jsxs("ul",{className:"space-y-1 text-sm text-secondary-700",children:[e.jsxs("li",{className:"flex items-start",children:[e.jsx(t,{className:"text-green-600 mr-2 mt-0.5 flex-shrink-0",size:16}),e.jsx("span",{children:"NRR improved to 108% (+5% vs last month)"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx(a,{className:"text-green-600 mr-2 mt-0.5 flex-shrink-0",size:16}),e.jsx("span",{children:"CAC reduced by 40% - milestone achieved"})]}),e.jsxs("li",{className:"flex items-start",children:[e.jsx(r,{className:"text-yellow-600 mr-2 mt-0.5 flex-shrink-0",size:16}),e.jsx("span",{children:"Churn rate still above target at 3.2%"})]})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-secondary-900 mb-2",children:"Recommended Actions"}),e.jsxs("ul",{className:"space-y-1 text-sm text-secondary-700",children:[e.jsx("li",{children:"⢠Review and implement retention playbook to address churn"}),e.jsx("li",{children:"⢠Analyze NRR improvement drivers for replication"}),e.jsx("li",{children:"⢠Schedule team celebration for CAC milestone"})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-secondary-900 mb-2",children:"Upcoming Milestones"}),e.jsxs("ul",{className:"space-y-1 text-sm text-secondary-700",children:[e.jsx("li",{children:"⢠On track to hit 65% gross margin target by Q4"}),e.jsx("li",{children:"⢠Self-service platform launch scheduled for next month"})]})]})]}),e.jsx("button",{className:"mt-4 bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-lg font-semibold text-sm transition-colors",children:"View Full Briefing"})]})]})]}),"settings"===x&&e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[e.jsx("h2",{className:"text-xl font-bold text-secondary-900 mb-6",children:"Notification Preferences"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-secondary-900 mb-4",children:"Email Notifications"}),e.jsx("div",{className:"space-y-3",children:Object.entries({metricChanges:{label:"Metric Changes",description:"Alert when key metrics change significantly"},milestones:{label:"Milestones Achieved",description:"Celebrate when you hit transformation milestones"},weeklyDigest:{label:"Weekly Executive Digest",description:"Summary of the week's key insights and actions"},monthlyBriefing:{label:"Monthly Briefing",description:"Comprehensive monthly performance report"},peerActivity:{label:"Peer Network Activity",description:"Updates from CEO discussions and learning sessions"},playbookUpdates:{label:"Playbook Updates",description:"New playbooks and best practices"},boardReports:{label:"Board Report Ready",description:"When automated board reports are generated"}}).map(([s,{label:t,description:r}])=>e.jsxs("div",{className:"flex items-center justify-between p-4 bg-secondary-50 rounded-lg",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-semibold text-secondary-900",children:t}),e.jsx("p",{className:"text-sm text-secondary-600",children:r})]}),e.jsx("button",{onClick:()=>{return e=s,void g(s=>({...s,[e]:!s[e]}));var e},className:"ml-4 relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(b[s]?"bg-primary-600":"bg-secondary-300"),children:e.jsx("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white transition-transform "+(b[s]?"translate-x-6":"translate-x-1")})})]},s))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-secondary-900 mb-4",children:"Alert Thresholds"}),e.jsx("p",{className:"text-sm text-secondary-700 mb-4",children:"Set custom thresholds for when you want to be notified about metric changes"}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-secondary-900 mb-2",children:"CAC Change Alert (%)"}),e.jsx("input",{type:"number",defaultValue:"10",className:"w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-2 focus:ring-primary-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-secondary-900 mb-2",children:"Churn Rate Alert (%)"}),e.jsx("input",{type:"number",defaultValue:"0.5",step:"0.1",className:"w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-2 focus:ring-primary-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-secondary-900 mb-2",children:"NRR Change Alert (%)"}),e.jsx("input",{type:"number",defaultValue:"5",className:"w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-2 focus:ring-primary-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-secondary-900 mb-2",children:"Margin Change Alert (%)"}),e.jsx("input",{type:"number",defaultValue:"3",className:"w-full px-4 py-2 border border-secondary-300 rounded-lg focus:ring-2 focus:ring-primary-500"})]})]})})]}),e.jsx("div",{className:"pt-6 border-t border-secondary-200",children:e.jsx("button",{className:"bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-semibold transition-colors",children:"Save Notification Settings"})})]})]})]})}export{x 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.