#![recursion_limit = "256"]

pub mod app;
pub mod i18n;
pub mod components;
pub mod page;
pub mod utils;
pub mod auth;
pub mod api;
pub mod config;

// Re-export logging macros for convenience
pub use crate::utils::logging::*;

#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
    use crate::app::*;
    
    console_error_panic_hook::set_once();
    
    // In production version we disable warnings, keep only errors
    #[cfg(debug_assertions)]
    {
        console_log::init_with_level(log::Level::Trace).expect("Failed to initialize logger");
    }
    #[cfg(not(debug_assertions))]
    {
        console_log::init_with_level(log::Level::Error).expect("Failed to initialize logger");
    }
    
    log::info!("Starting VProxy Web Client...");
    leptos::mount::hydrate_body(App);
}
