"use client"

import type { ReactNode } from "react"
import { DriveAppShell } from "@/components/drive/drive-app-shell"
import { DemoChrome } from "@/components/demo/demo-chrome"
import { DemoDriveProvider } from "@/lib/demo/demo-drive-context"
import { DemoDriveBootstrap } from "@/lib/demo/demo-drive-bootstrap"
import { DEMO_DRIVE_ROUTE_ROOT } from "@/lib/demo/demo-drive-context"
import { useDemoDriveStore } from "@/lib/demo/demo-drive-store"

export function DemoDriveShell({ children }: { children: ReactNode }) {
  return (
    <DemoDriveProvider onReset={() => useDemoDriveStore.getState().reset()}>
      <DemoDriveBootstrap />
      <DemoChrome>
        <DriveAppShell routeRoot={DEMO_DRIVE_ROUTE_ROOT}>{children}</DriveAppShell>
      </DemoChrome>
    </DemoDriveProvider>
  )
}
