const { useState, useEffect, useMemo, useRef } = React; const NAV = [ { section: "Analyze" }, { id: "exec", label: "Executive", icon: "dashboard" }, { id: "copilot", label: "AI Copilot", icon: "sparkles", badge: "AI" }, { id: "nlq", label: "Ask VyaparBI", icon: "search" }, { id: "mlstudio", label: "ML Studio", icon: "brain", badge: "ML" }, { id: "industry", label: "Industry Analytics", icon: "factory" }, { id: "builder", label: "Dashboard Builder", icon: "layers" }, { section: "Data" }, { id: "sources", label: "Data Sources", icon: "plug" }, { id: "pipelines", label: "Pipelines & ETL", icon: "workflow" }, { id: "semantic", label: "Semantic Layer", icon: "scale" }, { id: "catalog", label: "Data Catalog", icon: "book" }, { section: "Operate" }, { id: "geo", label: "Geospatial", icon: "map" }, { id: "iot", label: "IoT & Real-time", icon: "activity", badge: "LIVE" }, { id: "twin", label: "Digital Twin", icon: "box" }, { id: "reports", label: "Reports & Alerts", icon: "bell" }, { id: "collab", label: "Collaboration", icon: "message" }, { section: "Govern" }, { id: "governance", label: "Governance", icon: "shield" }, { id: "admin", label: "Users & Roles", icon: "users" }, { section: "Platform" }, { id: "developer", label: "Developer & APIs", icon: "code" }, { id: "mobile", label: "Mobile App", icon: "smartphone" }, ]; const CRUMBS = { exec: ["Analyze", "Executive Dashboard"], copilot: ["Analyze", "AI Copilot"], nlq: ["Analyze", "Ask VyaparBI"], mlstudio: ["Analyze", "ML Studio & Forecasting"], industry: ["Analyze", "Industry Analytics"], builder: ["Analyze", "Dashboard Builder", "GeM Quarterly Review"], sources: ["Data", "Sources"], pipelines: ["Data", "Pipelines & ETL"], semantic: ["Data", "Semantic Layer"], catalog: ["Data", "Catalog & Governance"], geo: ["Operate", "Geospatial Analytics"], iot: ["Operate", "IoT & Real-time"], twin: ["Operate", "Digital Twin"], reports: ["Operate", "Reports & Alerts"], collab: ["Operate", "Collaboration & Workflow"], governance: ["Govern", "Governance & Compliance"], admin: ["Govern", "Users & Roles"], developer: ["Platform", "Developer & APIs"], mobile: ["Platform", "Mobile App"], }; const DEFAULTS = /*EDITMODE-BEGIN*/{ "theme": "light", "collapsed": false, "showCopilot": false, "density": "comfortable", "accent": "navy-saffron" }/*EDITMODE-END*/; function App() { const [t, setTweak] = useTweaks(DEFAULTS); const [route, setRoute] = useState(() => localStorage.getItem("vbi.route") || "exec"); const [drawer, setDrawer] = useState(false); useEffect(() => { document.documentElement.setAttribute("data-theme", t.theme); }, [t.theme]); useEffect(() => { localStorage.setItem("vbi.route", route); }, [route]); const Screen = { exec: ExecutiveScreen, copilot: CopilotScreen, nlq: NLQScreen, mlstudio: MLStudioScreen, industry: IndustryScreen, builder: BuilderScreen, sources: SourcesScreen, pipelines: PipelinesScreen, semantic: SemanticScreen, catalog: CatalogScreen, geo: GeoScreen, iot: IoTScreen, twin: TwinScreen, reports: ReportsScreen, collab: CollabScreen, governance: GovernanceScreen, admin: AdminScreen, developer: DeveloperScreen, mobile: MobileScreen, }[route] || ExecutiveScreen; return (