//! lcdm/src/lib.rs
//!
//! ΛCDM-Rust Main Facade
//!
//! # ΛCDM-Rust
//!
//! A high-precision, high-performance cosmology engine written in Rust.
//! This crate (`lcdm`) acts as a single entry point (facade) that re-exports the
//! most commonly used components and provides a convenient `prelude`.
//!
//! ## Usage
//!
//! ```rust
//! use lcdm::prelude::*;
//!
//! // 1) Build a cosmology using the builder API.
//! let cosmo = CosmoBuilder::new()
//!     .flat()
//!     .h(0.7)
//!     .Omega_m(0.3)
//!     .neutrino_effective(3.046, vec![0.0])
//!     .build()
//!     .unwrap();
//!
//! // Create the background cosmology model from the built parameter set.
//! let model = Cosmology::new(cosmo);
//!
//! // 2) Compute a distance observable (luminosity distance) at z = 1.
//! let d_L = model.luminosity_distance(Redshift(1.0)).unwrap();
//! println!("Luminosity Distance at z=1: {} Mpc", d_L.0);
//! ```

// Re-export sub-crates as public modules for ergonomic access.
pub use lcdm_core as core;
pub use lcdm_background as background;
pub use lcdm_lss as lss;
pub use lcdm_boltzmann as boltzmann;
// Neutrino functionality is hosted in core
pub use lcdm_core::neutrino;

/// Commonly used types and traits for typical crate usage.
///
/// Importing `lcdm::prelude::*` provides the main builder/model types,
/// common units/newtypes, LSS helpers, and selected physical constants.
pub mod prelude {
    // --- Core (building, parameter sets, and specifications) ---
    pub use lcdm_core::{
        CanonicalParams,
        CosmoBuilder,
        DerivedParams,
        ScientificParams,
        spec::{AccuracyPreset, NeutrinoSpec},
        units::{KmPerSecMpc, Mpc, Redshift},
    };

    // --- Background (expansion and distance calculations) ---
    pub use lcdm_background::Cosmology;

    // --- LSS (growth and power spectrum utilities) ---
    pub use lcdm_lss::{
        growth::Growth,
        power::{sigma_r, PkProvider},
    };

    // --- Physical constants (convenience re-exports) ---
    pub use lcdm_core::constants::{C, EV, G, H0_UNITS_TO_INV_SEC, SIGMA_SB};
}
