//! # rustelo_auth
//!
//! Hexagonal port over `rustelo_core_lib` for authentication and authorization.
//! Exposes a stable API surface for auth types, RBAC, sessions, and i18n —
//! delegating all cryptographic implementation to the foundation.
//!
//! ## Features
//! - `ssr`     — re-exports `rustelo_pages_leptos` auth page components for
//!   server-side use
//! - `hydrate` — re-exports `rustelo_pages_leptos` auth page components for
//!   WASM

pub mod contributor;
pub mod jwt;
pub mod password;

// Foundation auth types — the complete type model
// Public re-export of foundation crates for advanced consumers
pub use rustelo_core_lib;
pub use rustelo_core_lib::auth::{
    AccessContext, AccessResult, AccessRule, AuthError, AuthResponse, BackupCodesResponse,
    ChangePasswordRequest, Claims, Disable2FARequest, EmailVerificationRequest,
    GenerateBackupCodesRequest, HasPermissions, Login2FARequest, LoginCredentials,
    OAuthProvider as OAuthProviderKind, OAuthUserInfo, PasswordResetConfirm, PasswordResetRequest,
    Permission, RBACConfig, RefreshTokenRequest, RegisterUserData, ResourceType, Role, SessionInfo,
    Setup2FARequest, Setup2FAResponse, TwoFactorStatus, UpdateUserData, User, UserProfile,
    Verify2FARequest,
};
// Registration — so callers can contribute auth FTL without depending on
// rustelo_core_lib directly
pub use rustelo_core_lib::registration::{register_contributor, ResourceContributor};
pub use rustelo_core_types;
// Page component re-exports — only meaningful when Leptos compilation is active
#[cfg(any(feature = "leptos-hydration", feature = "hydrate"))]
pub use rustelo_pages_leptos::{SignoutPage, UserPage};

pub const AUTH_VERSION: &str = env!("CARGO_PKG_VERSION");

// Include build-generated FTL embedding function:
//   pub fn get_auth_ftl() -> HashMap<&'static str, &'static str>
include!(concat!(env!("OUT_DIR"), "/auth_ftl.rs"));
