/* legal-shell.jsx — minimal shell for subpages with nav + footer */

const { useState: useStateLegal } = React;

function LegalShell({ children }) {
  const [drawer, setDrawer] = useStateLegal(false);
  return (
    <React.Fragment>
      <window.Nav onOpenDrawer={() => setDrawer(true)}/>
      <window.Drawer open={drawer} onClose={() => setDrawer(false)}/>
      <main className="legal">
        <div className="container container--narrow">
          {children}
        </div>
      </main>
      <window.Footer/>
      <window.WhatsAppFloat/>
      <window.CtaBar/>
      <window.CookieNotice/>
    </React.Fragment>
  );
}

Object.assign(window, { LegalShell });
