//! # Utils Crate
//!
//! Core utilities and shared functionality for the Rustelo framework.
//! This crate provides a dependency-free foundation that can be used by any
//! other crate in the workspace without creating circular dependencies.
//!
//! ## Modules
//!
//! - **manifest**: PAP-compliant manifest-based path resolution (NEW)
//! - **text_utils**: String processing, slug generation, and text normalization
//! - **validation**: Security validation and sanitization functions
//! - **env_parsing**: Environment variable parsing and validation

#![allow(unused_imports)]
#![allow(dead_code)]

pub mod env_parsing;
pub mod text_utils;
pub mod validation;

// New PAP-compliant manifest system
#[cfg(feature = "manifest")]
pub mod manifest;

// Re-export commonly used items for convenience
pub use env_parsing::parse_env_file;
// Re-export compatibility versions (non-WASM only)
#[cfg(all(feature = "manifest", not(target_arch = "wasm32")))]
pub use manifest::{
    assets_path, build_output_path, cache_build_path, cache_client_path, cache_deployment_path,
    cache_server_path, config_path as manifest_config_path, content_path as manifest_content_path,
    i18n_path, manifest_root, routes_path, ui_path, wasm_output_path,
};
// Re-export safe versions (always available)
#[cfg(feature = "manifest")]
pub use manifest::{
    assets_path_safe, build_output_path_safe, cache_build_path_safe, cache_client_path_safe,
    cache_deployment_path_safe, cache_server_path_safe, config_path_safe, content_path_safe,
    i18n_path_safe, routes_path_safe, ui_path_safe, wasm_output_path_safe,
};
// Re-export manifest items when feature is enabled
#[cfg(feature = "manifest")]
pub use manifest::{
    get_debug_level, get_manifest, ManifestError, ManifestResolver, RusteloManifest,
};
pub use text_utils::{normalize_category, normalize_tag, title_to_slug, to_slug};
pub use validation::{
    sanitize_html, validate_email, validate_file_path, validate_url, RouteValidationError,
    RouteValidator,
};
