1import{j as e}from"./markdown-DtjUNGiI.js";import{d as E,r as c}from"./vendor-BwYRWotU.js";import{d as B,g as q,T as M,q as Q,r as K,u as Z}from"./index-DSU2RxiB.js";import{T as Y,I as J}from"./InviteStaffModal-CmrME0bL.js";import{P as G}from"./ProspectGeneratorModal-D2SuvuEH.js";import{Q as X,D as ee}from"./firebase-CwtiMJt_.js";import{V as se}from"./VPATAuditStudio-DGbPSHgV.js";import{n as te,aP as ae,aI as le,aQ as R,B as O,aa as P,S as C,Z as re,ab as _,p as ne,a as ie,x as ce,O as U,aC as oe,h as de,V as xe,a2 as pe,aM as me,ak as be,w as he,az as ue,aL as ge,aH as fe,a7 as je,m as we}from"./icons-Ck4WJybW.js";import"./geo-D5jDzFjM.js";import"./GovBadge-C6PcdeKU.js";import"./AuditReportViewer-D9qtnGQg.js";import"./agentEndpoint-CCEN-Ds7.js";const ve=()=>{const a=E(),[o,g]=c.useState([]),[A,f]=c.useState(!0),[N,T]=c.useState(""),[h,j]=c.useState("all"),[m,y]=c.useState(!1),[i,n]=c.useState(!1),[b,x]=c.useState(null),[u,I]=c.useState(!1),[k,$]=c.useState(null);c.useEffect(()=>{let s=!1;return X(ee(B,"sys_errors")).then(l=>{s||$(l.data().count)}).catch(()=>{s||$(null)}),()=>{s=!0}},[]);const w=async()=>{f(!0);try{const s=await q(),l=Object.entries(M).map(([t,p])=>({id:t,slug:t,...p})),r=new Map;l.forEach(t=>
1r.set(t.slug||t.id,t)),s.forEach(t=>{const p=t.slug||t.id;p&&r.set(p,{...r.get(p)||{},...t,modules:{...r.get(p)?.modules||{},...t.modules||{}}})});const d=Array.from(r.values()).filter(t=>(t.id||t.slug)!=="staxify");g(d)}catch(s){console.warn("Error loading fleet data:",s);const l=Object.entries(M).filter(([r])=>r!=="staxify").map(([r,d])=>({id:r,slug:r,...d}));g(l)}finally{f(!1)}};c.useEffect(()=>{w()},[]);const z=async()=>{if(window.confirm("Synchronize all system tenants from master configuration to Firestore?")){I(!0);try{await Q(),await w()}catch(s){console.error("Sync error:",s)}finally{I(!1)}}},V=async(s,l,r)=>{g(d=>d.map(t=>(t.slug||t.id)===s?{...t,modules:{...t.modules,[l]:!r}}:t));try{await K(s,{[`modules.${l}`]:!r})}catch(d){console.error("Failed to update module:",d),w()}},L=o.filter(s=>{const l=(s.slug||s.id||"").toLowerCase(),r=(s.name||"").toLowerCase(),d=(s.state||"AL").toLowerCase(),t=N.toLowerCase().trim();return!t||r.includes(t)||l.includes(t)||d.includes(t)?h==="municipality"?s.tenantType!=="k12_school"&&l!=="rhs":h==="k12_school"?s.tenantType==="k12_school"||l==="rhs":h==="prospect"?(s.lifecycle||"demo")!=="live":!0:!1}),D=o.length,H=o.filter(s=>s.modules?.public_website!==!1).length,F=o.filter(s=>s.tenantType==="k12_school"||(s.slug||s.id)==="rhs").length,W=D-F;return e.jsxs("div",{className:"space-y-8 font-sans max-w-7xl mx-auto pb-16",children:[e.jsx("div",{className:"bg-[#1b365d] text-white p-6 sm:p-8 rounded-none border-b-4 border-[#0284c7] shadow-sm relative overflow-hidden",children:e.jsxs("div",{className:"relative z-10 flex flex-col lg:flex-row lg:items-center justify-between gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"px-2.5 py-0.5 bg-sky-500/20 text-sky-300 border border-sky-400/40 text-[10px] font-black uppercase tracking-widest",children:"Staxify Platform Operations"}),e.jsx("span",{className:"text-slate-300 text-xs font-semibold",children:"⢠Master Fleet Control Center"})]}),e.jsx("h1",{className:"text-2xl sm:text-3xl font-black text-white tracking-tight",children:"Platform Operations & Tenant Control Center"}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-200 font-normal max-w-2xl leading-relaxed",children:"Master control hub to inspect customer workspaces, launch live public portals, toggle module subscriptions, and provision prospects across all municipalities and schools."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>y(!0),className:"px-4 py-2.5 bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 text-white text-xs font-black uppercase tracking-wider flex items-center gap-2 cursor-pointer shadow-md transition-all active:scale-95",children:[e.jsx(te,{className:"w-4 h-4 text-emerald-200"}),e.jsx("span",{children:"⡠Prospect Generator"})]}),e.jsxs("button",{type:"button",onClick:()=>n(!0),className:"px-4 py-2.5 bg-[#0284c7] hover:bg-[#0369a1] text-white text-xs font-black uppercase tracking-wider flex items-center gap-2 cursor-pointer shadow-sm transition-colors active:scale-95",children:[e.jsx(ae,{className:"w-4 h-4 text-white"}),e.jsx("span",{children:"Provision Client"})]}),e.jsxs("button",{type:"button",onClick:()=>a("/app/staxify/error-reports"),className:"px-4 py-2.5 bg-white/10 hover:bg-white/20 text-white text-xs font-black uppercase tracking-wider flex items-center gap-2 cursor-pointer border border-white/20 shadow-sm transition-colors active:scale-95",title:"Uncaught errors from every tenant portal and staff workspace",children:[e.jsx(le,{className:"w-4 h-4 text-amber-300"}),e.jsx("span",{children:"Error Reports"}),k!==null&&k>0&&e.jsx("span",{className:"ml-0.5 px-1.5 py-0.5 bg-amber-400 text-slate-950 text-[10px] font-black rounded-full leading-none",children:k>99?"99+":k})]}),e.jsxs("button",{type:"button",onClick:z,disabled:u,className:"px-3.5 py-2.5 bg-white/10 hover:bg-white/20 text-white text-xs font-bold uppercase tracking-wider flex items-center gap-1.5 cursor-pointer border border-white/20 shadow-sm transition-colors disabled:opacity-50",title:"Synchronize static tenants into Firestore",children:[e.jsx(R,{className:`w-3.5 h-3.5 ${u?"animate-spin":""}`}),e.jsx("span",{children:u?"Syncing...":"Sync Config"})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
15",children:[e.jsxs("div",{className:"bg-white border-2 border-slate-200 p-5 shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-wider block",children:"Managed Fleet"}),e.jsxs("div",{className:"text-3xl font-black text-slate-900 mt-1",children:[D," Accounts"]}),e.jsxs("span",{className:"text-xs text-slate-600 mt-0.5 block",children:[W," Municipalities ⢠",F," K-12 Campus"]})]}),e.jsx("div",{className:"p-3 bg-blue-50 text-[#1b365d] border border-blue-200",children:e.jsx(O,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"bg-white border-2 border-slate-200 p-5 shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-wider block",children:"Live Civic Portals"}),e.jsxs("div",{className:"text-3xl font-black text-emerald-700 mt-1",children:[H," Online"]}),e.jsx("span",{className:"text-xs text-emerald-600 font-semibold mt-0.5 block",children:"100% Uptime ⢠SSL Verified"})]}),e.jsx("div",{className:"p-3 bg-emerald-50 text-emerald-700 border border-emerald-200",children:e.jsx(P,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"bg-white border-2 border-slate-200 p-5 shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-wider block",children:"ADA Title II Compliance"}),e.jsx("div",{className:"text-3xl font-black text-[#1b365d] mt-1",children:"98.8% AA"}),e.jsx("span",{className:"text-xs text-sky-700 font-semibold mt-0.5 block",children:"Automated Shield Active"})]}),e.jsx("div",{className:"p-3 bg-sky-50 text-[#0284c7] border border-sky-200",children:e.jsx(C,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"bg-white border-2 border-slate-200 p-5 shadow-xs flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[11px] font-bold text-slate-500 uppercase tracking-wider block",children:"Demo Pipeline"}),e.jsx("div",{className:"text-3xl font-black text-amber-700 mt-1",children:"2 Ready"}),e.jsx("span",{className:"text-xs text-amber-600 font-semibold mt-0.5 block",children:"Slocomb & Headland Demo"})]}),e.jsx("div",{className:"p-3 bg-amber-50 text-amber-700 border border-amber-200",children:e.jsx(re,{className:"w-6 h-6"})})]})]}),e.jsxs("div",{className:"bg-white border-2 border-slate-200 shadow-xs",children:[e.jsxs("div",{className:"p-6 border-b border-slate-200 flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-base font-black text-slate-900 uppercase tracking-wider flex items-center gap-2",children:[e.jsx(_,{className:"w-5 h-5 text-[#0284c7]"}),e.jsx("span",{children:"Municipal & Educational Client Fleet"})]}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Direct access to launch each client's public website, enter staff support mode, or adjust subscribed software modules."})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"relative min-w-[220px]",children:[e.jsx(ne,{className:"w-4 h-4 text-slate-400 absolute left-3 top-2.5"}),e.jsx("input",{type:"text",placeholder:"Search fleet by name or slug...",value:N,onChange:s=>T(s.target.value),className:"w-full pl-9 pr-3 py-1.5 text-xs bg-slate-50 border-2 border-slate-300 rounded-none focus:bg-white focus:outline-none focus:border-[#1b365d] text-slate-900","aria-label":"Search fleet by name or slug"})]}),e.jsx("div",{className:"flex items-center gap-1 bg-slate-100 p-1 border border-slate-300 text-xs font-bold",children:[{id:"all",label:"All Fleet"},{id:"municipality",label:"ðï¸ Cities"},{id:"k12_school",label:"ð K-12"},{id:"prospect",label:"â¡ Demos"}].map(s=>e.jsx("button",{type:"button",onClick:()=>j(s.id),className:`px-3 py-1 text-xs font-bold transition-colors cursor-pointer ${h===s.id?"bg-[#1b365d] text-white shadow-2xs":"text-slate-600 hover:text-slate-900 hover:bg-slate-200"}`,children:s.label},s.id))})]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",role:"table","aria-label":"Tenant Fleet Directory",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-slate-100 text-slate-700 text-[11px] font-black uppercase tracking-wider border-b-2 border-slate-200",children:[e.jsx("th",{scope:"col",className:"py-2.5 px-3 pl-4",children:"Client Identity"}),e.jsx("th",{scope:"col",className:"py-2.5 px-2 text-center w-[120px]",children:"Classification"}),e.jsx("th",{scope:"col",className:"py-2.5 px-2 text-center w-[140px]",children:"Modules"}),e.jsx("th",{scope:"col",className:"py-2.5 px-2 text-center w-[100px]",children:"Audits"}),e.jsx("th",{scope:"col",className:"py-2.5 px-3 pr-4 text-right w-[190px]",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-200 text-xs",children:A?e.jsx("tr",{children:e.jsxs("td",{colSpan:"5",className:"p-8 text-center text-slate-500 font-bold",children:[e.jsx(R,{className:"w-5 h-5 animate-spin mx-auto text-[#0284c7] mb-2"}),"Loading platform fleet directory..."]})}):L.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:"5",className:"p-8 text-center text-slate-500",children:"No clients found matching the search criteria."})}):L.map(s=>
1{const l=s.slug||s.id,r=(s.lifecycle||"demo")==="live",d=s.tenantType==="k12_school"||l==="rhs",t=s.theme?.logo||s.homeContent?.logo||s.branding?.logo||"",p=s.modules||{};return e.jsxs("tr",{className:"hover:bg-slate-50/90 transition-colors",children:[e.jsx("td",{className:"py-2 px-3 pl-4",children:e.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t?e.jsx("img",{src:t,alt:"",className:"w-8 h-8 object-contain p-0.5 border border-slate-200 bg-white shrink-0"}):e.jsx("div",{className:"w-8 h-8 bg-[#1b365d] text-white flex items-center justify-center font-black text-xs shrink-0 border border-slate-300",children:s.name?.[0]||"M"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"font-bold text-slate-900 text-xs leading-tight truncate max-w-[200px]",title:s.name,children:s.name}),e.jsx("span",{className:"text-[10px] text-slate-500 font-mono bg-slate-100 px-1 py-0.2 border border-slate-200 shrink-0",children:l})]}),(s.contact?.phone||s.contact?.domain)&&e.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1.5 mt-0.5 truncate max-w-[260px]",children:[s.contact?.phone&&e.jsx("span",{className:"text-slate-500 font-medium",children:s.contact.phone}),s.contact?.domain&&e.jsxs("a",{href:s.contact.domain,target:"_blank",rel:"noreferrer",className:"text-sky-700 hover:text-sky-900 hover:underline flex items-center gap-0.5 shrink-0",title:s.contact.domain,children:[s.contact?.phone&&e.jsx("span",{className:"text-slate-300",children:"â¢"}),e.jsx("span",{children:s.contact.domain.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")})]})]})]})]})}),e.jsx("td",{className:"py-2 px-2 text-center whitespace-nowrap",children:r?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-emerald-50 text-emerald-800 border border-emerald-300 font-bold text-[10px] uppercase tracking-wider rounded-xs",children:[e.jsx(ie,{className:"w-3 h-3 text-emerald-600 shrink-0","aria-hidden":"true"}),"Live Tenant"]}):d?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-800 border border-blue-300 font-bold text-[10px] uppercase tracking-wider rounded-xs",children:[e.jsx(ce,{className:"w-3 h-3 text-blue-600 shrink-0","aria-hidden":"true"}),"Demo · K-12"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-slate-100 text-slate-700 border border-slate-300 font-bold text-[10px] uppercase tracking-wider rounded-xs",children:[e.jsx(O,{className:"w-3 h-3 text-slate-500 shrink-0"}),"Demo"]})}),e.jsx("td",{className:"py-2 px-2 whitespace-nowrap text-center",children:e.jsx("div",{className:"grid grid-cols-3 gap-1 w-fit mx-auto",children:[{key:"public_website",label:"CMS"},{key:"forms",label:"Forms"},{key:"compliance_audit",label:"Shield"},{key:"erp_core",label:"ERP"}
1,{key:"infrastructure",label:"GIS"},{key:"ai_concierge",label:"AI"}].map(v=>{const S=!!p[v.key];return e.jsxs("button",{type:"button",onClick:()=>V(l,v.key,S),className:`px-1.5 py-0.5 text-[9px] font-bold tracking-tight border transition-all cursor-pointer rounded-xs min-w-[38px] text-center ${S?"bg-[#1b365d] text-white border-[#10223d] hover:bg-[#152b4a]":"bg-slate-100 text-slate-400 border-slate-200 hover:bg-slate-200 hover:text-slate-600"}`,title:`${v.label}: ${S?"Subscribed (click to disable)":"Inactive (click to enable)"}`,children:[e.jsx("span",{children:v.label}),e.jsx("span",{className:"ml-0.5 opacity-80",children:S?"â":"â"})]},v.key)})})}),e.jsx("td",{className:"py-2 px-2 text-center whitespace-nowrap",children:e.jsxs("button",{type:"button",onClick:()=>x(s),className:"inline-flex items-center gap-1.5 px-2.5 py-1 bg-white hover:bg-slate-100 border border-slate-300 hover:border-[#112e51] font-bold text-slate-800 hover:text-[#112e51] cursor-pointer rounded-xs transition-all shadow-2xs group",title:`Manage & Run VPAT Audits for ${s.name}`,children:[e.jsx(C,{className:"w-3.5 h-3.5 text-emerald-600 shrink-0 group-hover:scale-110 transition-transform"}),e.jsx("span",{className:"text-xs font-black tracking-tight",children:"Audits"})]})}),e.jsx("td",{className:"py-2 px-3 pr-4 text-right whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[e.jsxs("a",{href:`/site/${l}`,target:"_blank",rel:"noreferrer",className:"px-2 py-1 bg-white hover:bg-slate-50 text-slate-800 font-bold text-xs border border-slate-300 transition-colors flex items-center gap-1 cursor-pointer rounded-xs",title:`Open public website for ${s.name} (/site/${l})`,children:[e.jsx(P,{className:"w-3 h-3 text-sky-600 shrink-0"}),e.jsx("span",{children:"Site"}),e.jsx(U,{className:"w-2.5 h-2.5 text-slate-400 shrink-0"})]}),e.jsxs("button",{type:"button",onClick:()=>a(`/app/${l}/dashboard`),className:"px-2.5 py-1 bg-[#0284c7] hover:bg-[#0369a1] text-white font-bold text-xs shadow-2xs transition-colors flex items-center gap-1 cursor-pointer rounded-xs",title:`Enter support mode for ${s.name} (/app/${l}/dashboard)`,children:[e.jsx(oe,{className:"w-3 h-3 text-white shrink-0"}),e.jsx("span",{children:"Manage"})]}),e.jsx("a",{href:`/audit-dossier/${l}`,target:"_blank",rel:"noreferrer",className:"p-1 bg-white hover:bg-slate-100 text-slate-700 border border-slate-300 transition-colors rounded-xs",title:"Open Executive Sales & Compliance Audit Dossier",children:e.jsx(de,{className:"w-3.5 h-3.5 text-slate-600 shrink-0"})}),e.jsx("a",{href:`/admin/invoice/${l}`,target:"_blank",rel:"noreferrer",className:"p-1 bg-white hover:bg-slate-100 text-slate-700 border border-slate-300 transition-colors rounded-xs",title:"Generate & Print Municipal Invoice",children:e.jsx(xe,{className:"w-3.5 h-3.5 text-slate-600 shrink-0"})})]})})]},l)})})]})})]}),e.jsx(G,{isOpen:m,onClose:()=>{y(!1),w()}}),e.jsx(Y,{isOpen:i,onClose:()=>{n(!1),w()},activeTenantId:"staxify",onTenantSwitch:s=>a(`/app/${s}/dashboard`)}),b&&e.jsx("div",{className:"fixed inset-0 bg-slate-950/80 backdrop-blur-xs z-50 flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-150",children:e.jsxs("div",{className:"bg-white border-2 border-slate-300 max-w-6xl w-full max-h-[94vh] overflow-y-auto shadow-2xl relative p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center justify-between pb-3 mb-4 border-b-2 border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"p-1.5 bg-[#112e51] text-white",children:e.jsx(C,{className:"w-5 h-5 text-[#fdb81e]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h3",{className:"text-sm sm:text-base font-black text-slate-900 uppercase tracking-tight",children:["Compliance & VPAT Audit Studio ⢠",b.name]}),e.jsx("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-900 border border-blue-300 text-[10px] font-mono font-bold uppercase",children:"Dev / Ops Console"})]}),e.jsxs("p",{className:"text-xs text-slate-500 font-medium",children:["Run autonomous headless quarterly audits, complete manual criteria verification, and publish official certificates to ",b.name,"'s GovStax Shield."]})]})]}),e.jsx("button",{type:"button",onClick:()=>x(null),className:"px-3 py-1.5 bg-slate-100 hover:bg-slate-200 text-slate-700 hover:text-slate-900 font-black text-xs uppercase tracking-wider border border-slate-300 transition-colors cursor-pointer",children:"â Close"})]}),e.jsx(se,{tenantId:b.slug||b.id,tenantName:b.name})]})})]})},Le=()=>{const{tenantId:a,tenantConfig:o}=Z(),g=E(),[A,f]=c.useState(!1),[N,T]=c.useState(!1);if(a==="staxify")return e.jsx(ve,{});const h=o||a&&M[a]||null,j=h?.name||(a?a.charAt(0).toUpperCase()+a.slice(1):"Municipality"),m=h?.modules||{},y=new Date().toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),i=[];return m.public_website&&i.push({id:"content",title:"Civic Content & CMS",badge:"GovStax Connect",badgeClass:"bg-sky-50 text-[#0369a1] border-sky-200",icon:ue,desc:"Manage public announcements, emergency alert banners, council meeting agendas & minutes, and GIS maps.",metrics:[{label:"Live Public Pages:",value:"6 Published",bold:!0}
1,{label:"Emergency Alerts:",value:"0 Active (Normal)",badge:"bg-emerald-50 text-emerald-800 border-emerald-200"},{label:"Next Council Meeting:",value:"Tuesday, Aug 18",bold:!0}],btnText:"Open CMS Studio",path:`/app/${a}/content`}),m.forms&&i.push({id:"forms",title:"Forms & Permitting",badge:"GovStax Forms",badgeClass:"bg-slate-100 text-[#1b365d] border-slate-200",icon:ge,desc:"Review building permit applications, citizen issue reports, public record requests, and digital form submissions.",metrics:[{label:"Inbound Submissions:",value:"24 Total Logged",bold:!0},{label:"Awaiting Review:",value:"3 Pending Action",badge:"bg-amber-50 text-amber-900 border-amber-200"},{label:"Avg. Processing Time:",value:"1.8 Business Days",bold:!0}],btnText:"Review Submissions",path:`/app/${a}/forms`}),m.compliance_audit&&i.push({id:"compliance",title:"Compliance & VPAT",badge:"GovStax Shield",badgeClass:"bg-blue-50 text-[#0284c7] border-blue-200",icon:C,desc:"Maintain continuous WCAG 2.2 AA and ADA Title II digital accessibility conformance across all resident services.",metrics:[{label:"Overall WCAG Score:",value:"98 / 100 (Level AA)",bold:!0},{label:"Automated Scan Status:",value:"Continuous Active",badge:"bg-emerald-50 text-emerald-800 border-emerald-200"},{label:"VPAT Certificate:",value:"Official ACR Ready",bold:!0}],btnText:"Audits & Certificates",path:`/app/${a}/compliance`}),m.erp_core&&i.push({id:"nexus",title:"Operations Console",badge:"GovStax Orbit ERP",badgeClass:"bg-indigo-50 text-indigo-900 border-indigo-200",icon:fe,desc:"Real-time municipal work orders, crew dispatch, maintenance routing, and field operations governance.",metrics:[{label:"Active Work Orders:",value:"12 In Progress",bold:!0},{label:"Field Technicians:",value:"6 Online",badge:"bg-emerald-50 text-emerald-800 border-emerald-200"},{label:"SLA Adherence:",value:"94.2%",bold:!0}],btnText:"Open Operations",path:`/app/${a}/nexus`}),m.infrastructure&&i.push({id:"assets",title:"Asset Atlas / GIS",badge:"Spatial Infrastructure",badgeClass:"bg-emerald-50 text-emerald-900 border-emerald-200",icon:je,desc:"Spatial geospatial inventory of municipal infrastructure, parcel boundaries, zoning layers, and utilities.",metrics:[{label:"Mapped Assets:",value:"342 Geo-tagged",bold:!0},{label:"Zoning Layers:",value:"4 Active Layers",bold:!0},{label:"Maintenance Due:",value:"2 Overdue",badge:"bg-amber-50 text-amber-900 border-amber-200"}],btnText:"Open Asset Atlas",path:`/app/${a}/assets`}),m.payments&&i.push({id:"ledger",title:"Finance & Ledger",badge:"Ledger Engine",badgeClass:"bg-slate-100 text-slate-900 border-slate-200",icon:we,desc:"Municipal fund accounting, revenue collection reconciliation, and council financial report exports.",metrics:[{label:"Monthly Inflows:",value:"$124,500.00",bold:!0},{label:"Reconciled Transactions:",value:"99.8%",badge:"bg-emerald-50 text-emerald-800 border-emerald-200"},{label:"Audit Log Status:",value:"Immutable & Sealed",bold:!0}],btnText:"Open Finance Ledger",path:`/app/${a}/ledger`}),e.jsxs("div",{className:"space-y-8 font-sans text-slate-900 pb-12",children:[e.jsx("div",{className:"bg-[#1b365d] text-white p-6 sm:p-8 border-b-4 border-[#0284c7] shadow-sm",children:e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold tracking-tight text-white font-sans",children:["Welcome to ",e.jsx("span",{className:"text-white",children:"Gov"}),e.jsx("span",{className:"text-[#38bdf8]",children:"Stax"}),", ",j,"!"]}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-200 font-normal max-w-2xl leading-relaxed",children:"Your centralized civic command center for public web publishing, digital permitting, resident engagement, and federal ADA Title II / Section 508 compliance."}),e.jsxs("div",{className:"text-[11px] font-medium text-slate-300 pt-1 flex items-center gap-2",children:[e.jsx(pe,{className:"w-3.5 h-3.5 text-[#38bdf8]"}),e.jsx("span",{children:y}),e.jsx("span",{className:"text-slate-400",children:"â¢"}),e.jsxs("span",{className:"text-emerald-300 font-bold flex items-center gap-1.5",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-emerald-400 animate-pulse inline-block"}
1),"System Operational & Live"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>f(!0),className:"px-4 py-2.5 bg-[#0284c7] hover:bg-[#0369a1] text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 cursor-pointer shadow-sm min-h-[40px] transition-colors focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:outline-none",children:[e.jsx(me,{className:"w-4 h-4 text-white"}),e.jsx("span",{children:"Invite Staff"})]}),e.jsxs("a",{href:`/site/${a}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2.5 bg-white/10 hover:bg-white/20 text-white text-xs font-bold uppercase tracking-wider flex items-center gap-2 cursor-pointer border border-white/20 shadow-sm min-h-[40px] transition-colors focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:outline-none",children:[e.jsx(P,{className:"w-4 h-4 text-[#38bdf8]"}),e.jsx("span",{children:"View Public Site"}),e.jsx(U,{className:"w-3 h-3 text-slate-300"})]})]})]})}),i.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"border-b border-slate-200 pb-2 flex items-center justify-between",children:[e.jsxs("h2",{className:"text-sm font-bold uppercase tracking-wider text-[#1b365d] flex items-center gap-2",children:[e.jsx(_,{className:"w-4 h-4 text-[#0284c7]"}),e.jsx("span",{children:"Active Workspaces & Live Metrics"})]}),e.jsxs("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:[i.length," Subscribed ",i.length===1?"Service":"Services"]})]}),e.jsx("div",{className:`grid gap-6 ${i.length===1?"grid-cols-1 max-w-md":i.length===2?"grid-cols-1 md:grid-cols-2":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:i.map(n=>{const b=n.icon;return e.jsxs("div",{className:"bg-white border border-slate-200 p-6 flex flex-col justify-between shadow-xs hover:border-[#0284c7]/50 hover:shadow-sm transition-all",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"w-10 h-10 bg-[#1b365d] text-[#38bdf8] flex items-center justify-center border border-[#1b365d]/20 shadow-xs",children:e.jsx(b,{className:"w-5 h-5 text-white"})}),e.jsx("span",{className:`px-2.5 py-0.5 border text-[10px] font-bold uppercase tracking-wider ${n.badgeClass}`,children:n.badge})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-bold uppercase text-[#1b365d]",children:n.title}),e.jsx("p",{className:"text-xs text-slate-600 font-normal mt-1 leading-relaxed",children:n.desc})]}),e.jsx("div",{className:"bg-slate-50/80 border border-slate-200/80 p-3.5 space-y-2 text-xs",children:n.metrics.map((x,u)=>e.jsxs("div",{className:`flex items-center justify-between ${u<n.metrics.length-1?"border-b border-slate-200/60 pb-1.5":"pt-0.5"}`,children:[e.jsx("span",{className:"text-slate-600",children:x.label}),x.badge?e.jsx("span",{className:`font-bold px-2 py-0.5 border text-[10px] uppercase ${x.badge}`,children:x.value}):e.jsx("strong",{className:`text-[#1b365d] ${x.bold?"font-bold":""}`,children:x.value})]},u))})]}),e.jsx("div",{className:"pt-5 mt-4 border-t border-slate-100",children:e.jsxs("button",{type:"button",onClick:()=>n.onClick?n.onClick():g(n.path),className:"w-full px-4 py-2.5 bg-[#1b365d] hover:bg-[#152b4a] text-white text-xs font-bold uppercase tracking-wider flex items-center justify-center gap-2 cursor-pointer transition-colors min-h-[40px] focus-visible:ring-2 focus-visible:ring-[#0284c7] focus-visible:outline-none",children:[e.jsx("span",{children:n.btnText}),e.jsx(be,{className:"w-4 h-4 text-[#38bdf8]"})]})})]},n.id)})})]}),e.jsxs("div",{className:"bg-white border border-slate-200 p-6 sm:p-8 shadow-xs space-y-6",children:[e.jsxs("div",{className:"border-b border-slate-200 pb-3 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs font-bold text-[#0284c7] uppercase tracking-wider mb-1",children:[e.jsx(he,{className:"w-4 h-4 text-[#0284c7]"}),e.jsx("span",{children:"MUNICIPAL ONBOARDING & OPERATION GUIDE"})]}),e.jsx("h2",{className:"text-lg font-bold uppercase text-[#1b365d]",children:"How to Use Your GovStax Platform"})]}),e.jsx("span",{className:"hidden sm:inline-block text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"4-Step Operational Flow"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 text-xs",children:[e.jsxs("div",{className:"bg-slate-50/70 border border-slate-200 p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 bg-[#1b365d] text-white font-bold text-xs flex items-center justify-center",children:"1"}),e.jsx("h3",{className:"font-bold uppercase text-[#1b365d]",children:"Configure Web Content"})]}),e.jsxs("p",{className:"text-slate-600 font-normal leading-relaxed",children:["Navigate to ",e.jsx("strong",{children:"Civic Content"})," to customize your town's headline, hero imagery, quick action links, upcoming council meetings, and official notices."]})]}),e.jsxs("div",{className:"bg-slate-50/70 border border-slate-200 p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 bg-[#1b365d] text-white font-bold text-xs flex items-center justify-center",children:"2"}),e.jsx("h3",{className:"font-bold uppercase text-[#1b365d]",children:"Deploy Digital Forms"})]}),e.jsxs("p",{className:"text-slate-600 font-normal leading-relaxed",children:["Use ",e.jsx("strong",{children:"GovStax Forms"})," to provide residents with online building permits and concern reporting, eliminating paper backlogs with instant clerk alerts."]})]}),e.jsxs("div",{className:"bg-slate-50/70 border border-slate-200 p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 bg-[#1b365d] text-white font-bold text-xs flex items-center justify-center",children:"3"}),e.jsx("h3",{className:"font-bold uppercase text-[#1b365d]",children:"Invite Town Staff"})]}),e.jsxs("p",{className:"text-slate-600 font-normal leading-relaxed",children:["Click ",e.jsx("strong",{children:"Invite Staff"})," to add municipal clerks, building inspectors, and department leads with role-based access control and isolated tenant security."]})]}),e.jsxs("div",{className:"bg-slate-50/70 border border-slate-200 p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-6 h-6 bg-[#1b365d] text-white font-bold text-xs flex items-center justify-center",children:"4"}),e.jsx("h3",{className:"font-bold uppercase text-[#1b365d]",children:"Review Compliance"})]}),e.jsxs("p",{className:"text-slate-600 font-normal leading-relaxed",children:["Check ",e.jsx("strong",{children:"GovStax Shield"})," quarterly to view official VPAT conformance records and download certificates guaranteeing Section 508 & ADA Title II compliance."]})]})]})]}),e.jsxs("div",{className:"bg-white border border-slate-200 p-6 sm:p-8 space-y-4 shadow-xs text-xs",children:[e.jsxs("div",{className:"border-b border-slate-200 pb-3 flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[e.jsxs("h3",{className:"font-bold uppercase text-[#1b365d] text-sm flex items-center gap-2",children:[e.jsx(O,{className:"w-4 h-4 text-[#0284c7]"}
1),e.jsx("span",{children:"Municipal Profile & Tenant Workspace"})]}),e.jsxs("span",{className:"font-mono text-slate-600 font-medium bg-slate-100 px-2.5 py-1 border border-slate-200 self-start sm:self-auto",children:["Workspace ID: ",a]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 pt-1",children:[e.jsxs("div",{className:"p-4 bg-slate-50/70 border border-slate-200 space-y-1",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider block",children:"Official Municipality Name"}),e.jsx("div",{className:"font-bold text-[#1b365d] text-sm",children:j})]}),e.jsxs("div",{className:"p-4 bg-slate-50/70 border border-slate-200 space-y-1",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider block",children:"Official Town Hall Email"}),e.jsx("div",{className:"font-mono font-medium text-slate-900 truncate",title:a==="rehobeth"?"[email protected]":o?.contact?.email||`townhall@${a}al.com`,children:a==="rehobeth"?"[email protected]":o?.contact?.email||`townhall@${a}al.com`})]}),e.jsxs("div",{className:"p-4 bg-slate-50/70 border border-slate-200 space-y-1",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider block",children:"Town Hall Physical Address"}),e.jsx("div",{className:"font-medium text-slate-800 truncate",title:a==="rehobeth"?"221 Malvern Road Rehobeth, Al 36301":o?.contact?.address||"Municipal Town Hall",children:a==="rehobeth"?"221 Malvern Road Rehobeth, Al 36301":o?.contact?.address||"Municipal Town Hall"})]}),e.jsxs("div",{className:"p-4 bg-slate-50/70 border border-slate-200 space-y-1",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider block",children:"Town Hall Phone Number"}),e.jsx("div",{className:"font-medium text-slate-800",children:a==="rehobeth"?"334-671-5829":o?.contact?.phone||"(334) 555-0100"})]})]})]}),e.jsx(J,{isOpen:A,onClose:()=>f(!1),tenantId:a,tenantName:j}),e.jsx(G,{isOpen:N,onClose:()=>T(!1)})]})};export{Le as GovStaxDashboard};
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.