//! Page provider and initialization for the client
//!
//! This module handles the initialization of the page provider at WASM startup.
//! The actual PageProvider implementation is generated by build.rs in page_provider_impl.rs

// Include the generated PageProvider implementation
include!(concat!(env!("OUT_DIR"), "/page_provider_impl.rs"));

/// Initialize page provider and register with the framework
///
/// This function is called at WASM startup to ensure the PageProvider is available.
/// In the current architecture (Level 5), pages are provided directly by WebsitePageProvider.
/// Future versions could use PAGE_REGISTRY for more advanced plugin support (Level 8).
///
/// # Returns
///
/// Always returns Ok(()) as there's nothing to fail in the current implementation
pub fn initialize() -> Result<(), Box<dyn std::error::Error>> {
    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_page_provider_exists() {
        let _provider = WebsitePageProvider;
        // Just verify it can be instantiated
    }
}
