{# @description The drawer shell: toggle, overlay, desktop open-state persistence, and the resolved layout it publishes to the browser. #} {# @prop id:text | description:"Element id, used to derive the toggle checkbox id and the persisted storage key." #} {# @prop :breakpoint:text | description:"Viewport width at which the sidebar becomes a persistent panel instead of an overlay drawer." #} {# @prop :collapse:text | description:"offcanvas or icons — how the sidebar behaves when collapsed at/above the breakpoint." #} {# @prop :sticky:boolean | description:"Whether the header pins to the top of the viewport." #} {# @prop :boost:boolean | description:"Adds hx-boost to the sidebar so its links navigate with htmx." #} {# @prop class:text | description:"Extra classes appended to the drawer root element." #} {# @slot:sidebar — The sidebar panel drawn in the drawer's side region. #} {# @slot The page content. — The drawer's main content region. #} {% load i18n mvp %} {% sidebar_has_breakpoint breakpoint as persistent %} {% resolve_layout_config breakpoint collapse sticky boost as layout %} {% comment %} The store only writes the remembered open state back at/above the breakpoint, so toggling the transient mobile overlay never clobbers the saved desktop state (docs/adr/0022-the-layout-store-mirrors-state-it-does-not-own.md). {% endcomment %}