"use client"

import type { ReactNode } from "react"
import { AgendaAppShell } from "@/components/agenda/agenda-app-shell"
import { DemoChrome } from "@/components/demo/demo-chrome"
import { DemoAgendaProvider } from "@/lib/demo/demo-agenda-context"
import { DEMO_AGENDA_ROUTE_ROOT } from "@/lib/demo/demo-agenda-context"
import { DemoAgendaBootstrap } from "@/lib/demo/demo-agenda-bootstrap"
import { useDemoAgendaStore } from "@/lib/demo/demo-agenda-store"

export function DemoAgendaShell({ children }: { children: ReactNode }) {
  return (
    <DemoAgendaProvider onReset={() => useDemoAgendaStore.getState().reset()}>
      <DemoAgendaBootstrap />
      <DemoChrome>
        <AgendaAppShell routeRoot={DEMO_AGENDA_ROUTE_ROOT}>{children}</AgendaAppShell>
      </DemoChrome>
    </DemoAgendaProvider>
  )
}
