//! Cookie-based theme detection on the server side.
use HeaderMap;
/// Cookie name used to persist the theme between requests.
pub const THEME_COOKIE_KEY: &str = "impulse_theme";
/// Initial theme resolved from the request, mirrored from
/// `impulse-ui-kit::ssr::InitialTheme`. The value is provided as a Leptos
/// context so user components can read the current theme during SSR.
;
/// Parse the `impulse_theme` cookie out of a request's header map.
///
/// Returns `None` when the cookie is absent or the header is malformed. The
/// caller decides what default to apply.