//! Themelio facade — curated, feature-gated re-exports.
//!
//! Downstream users can depend on this facade and enable features, or depend
//! on member crates directly. The spine (`foundation`) is always re-exported;
//! runtime-tier modules appear behind their feature flags. See
//! `docs/architecture.md`.

#![deny(missing_docs)]

/// The Themelio spine: the shared compliance vocabulary.
pub use themelio_foundation as foundation;

/// EU regulatory taxonomy (enable the `compliance` feature).
#[cfg(feature = "compliance")]
pub use themelio_foundation::compliance;

/// Numeric primitives — `Decimal`, `Money`, `Currency` (enable the `primitives`
/// feature).
#[cfg(feature = "primitives")]
pub use themelio_foundation::primitives;

/// Runtime-tier audit sinks: BLAKE3 `Hasher` + file-backed `AuditLogger`
/// (enable the `audit` feature).
#[cfg(feature = "audit")]
pub use themelio_runtime::audit;

/// Runtime-tier hosted `SystemClock`, deriving its trusted-time bound from the
/// kernel NTP discipline (enable the `clock` feature).
#[cfg(feature = "clock")]
pub use themelio_runtime::clock;

/// Runtime-tier dispatch & composition: `Module`/`DispatchAsync`, `Context`,
/// `RuntimeBuilder`/`Runtime`, `Hooks` (enable the `runtime` feature).
#[cfg(feature = "runtime")]
pub use themelio_runtime as runtime;

/// Runtime-tier storage: the CRUDP `Backend` trait + backends (enable the
/// `storage` feature; backends via `storage-memory` / `storage-postgres`).
#[cfg(feature = "storage")]
pub use themelio_storages as storage;

/// The in-memory CRUDP `Backend` (enable the `storage-memory` feature).
#[cfg(feature = "storage-memory")]
pub use themelio_storages::memory as storage_memory;

/// The PostgreSQL CRUDP `Backend` (`sqlx`) — durable CRUDP, erasure, retention
/// (enable the `storage-postgres` feature).
#[cfg(feature = "storage-postgres")]
pub use themelio_storages::postgres as storage_postgres;

/// Runtime-tier password hashing: Argon2id v19 (`Argon2Password`) over the spine
/// `Secret<T>` (enable the `password` feature).
#[cfg(feature = "password")]
pub use themelio_runtime::password;

/// Runtime-tier MFA possession factor: `MfaMechanism` + `EmailCodeMechanism`
/// (enable the `mfa` feature).
#[cfg(feature = "mfa")]
pub use themelio_runtime::mfa;

/// Runtime-tier PSD2 SCA login flow: `Auth` composes the password + MFA factors
/// (enable the `auth` feature).
#[cfg(feature = "auth")]
pub use themelio_runtime::auth;

/// Runtime-tier W3C trace context: `TraceContext` + the `traceparent`
/// parser/formatter (enable the `tracing` feature).
#[cfg(feature = "tracing")]
pub use themelio_runtime::tracing;

/// HTTP/JSON adapter: a typed dispatch router exposing a runtime over `axum`
/// (enable the `api-axum` feature).
#[cfg(feature = "api-axum")]
pub use themelio_apis as api_axum;
