import { useState } from 'react'
import { Outlet } from 'react-router-dom'
import TopBar from '@/components/TopBar'
import NavOverlay from '@/components/NavOverlay'

export default function AppShell() {
  const [navOpen, setNavOpen] = useState(false)

  return (
    <div className="app">
      <TopBar navOpen={navOpen} onToggleNav={() => setNavOpen(o => !o)} />
      <div className="stage">
        {navOpen && <NavOverlay onClose={() => setNavOpen(false)} />}
        <Outlet />
      </div>
    </div>
  )
}
