//! Rustelo UI components for the HTMX-SSR rendering profile.
//!
//! This crate is the HTMX peer of [`rustelo_components_leptos`]. Both render
//! the same visual UI but target different runtimes:
//!
//! - `rustelo_components_leptos` emits Leptos components with `on:click`
//!   handlers that only become interactive after WASM hydrates the SSR markup.
//! - `rustelo_components_htmx` emits server-rendered HTML with `hx-*`
//!   attributes that drive every interaction through `/api/htmx/*` endpoints.
//!   No WASM, no signals — interactivity lives on the server.
//!
//! ## Why two crates
//!
//! The two trees are physically separated to prevent drift and to let the
//! workspace build either one without dragging the other's dependencies (or
//! its WASM target) into the binary. The active profile is selected per route
//! in `site/config/rendering.ncl` (ADR-006).
//!
//! ## Conventions
//!
//! - Components are **functions** returning `impl IntoView`, not
//!   `#[component]`. This keeps the API explicit about its statelessness.
//! - No `on:click`, no `signal()`, no `Resource::new`. If interactivity is
//!   needed, the function emits `hx-*` attributes pointing at an endpoint under
//!   `/api/htmx/`.
//! - Translations and content are pre-resolved by the caller and passed in as
//!   strings or slices. The components themselves do not read from any context
//!   — making them trivially testable.
//!
//! ## Module layout
//!
//! Mirrors `rustelo_components_leptos` so finding the HTMX peer for a Leptos
//! component is a one-to-one path translation:
//!
//! - [`navigation`] — nav menu, footer, theme toggle, language selector
//! - [`auth`]       — login form/modal, logout button
//! - [`content`]    — grids, cards, paginators
//! - [`forms`]      — generic field, validation feedback, common forms
//! - [`overlays`]   — modals, toasts, cookie banner
//! - [`primitives`] — internal helpers for building hx-* attribute strings

#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod auth;
pub mod content;
pub mod forms;
pub mod navigation;
pub mod overlays;
pub mod primitives;

/// Endpoint root for all HTMX server endpoints exposed by this component set.
pub const HTMX_API_ROOT: &str = "/api/htmx";
