{% load i18n mvp %}
{% sidebar_has_breakpoint breakpoint as persistent %}
{% comment %}
Open-state persistence is desktop-only: the persistent sidebar remembers
open/collapsed across reloads (desktopOpen), while the overlay drawer
(below the breakpoint, or breakpoint="never") is transient and always
starts closed. $watch only writes back at/above the breakpoint, so
toggling the mobile overlay never clobbers the saved desktop state.
{% endcomment %}
{% if persistent %}
{% comment %}
Alpine's persist scripts are deferred, so x-init only corrects the
checkbox after the browser's first paint — by then the sidebar's width
transition has already been active for a frame, and the correction
plays as a visible animation (#178). This blocking script runs
immediately, mid-parse, before that first paint, and sets the same
checked state x-init would derive, so there is nothing left to correct
once Alpine hydrates.
{% endcomment %}
{% endif %}
{{ sidebar }}
{% comment %}
Laid out as a flex column only on a page carrying ; see the
.mvp-page-fill rule in mvp/tailwind/base.css. Every other page renders
byte-identically to before (issue #247).
{% endcomment %}