use rustelo_web::rustelo_core_lib::defs::LogoConfig;

// Constants generated at build time from site/config.ncl [logo]
// Mirrors the pattern used by the client crate (theme_constants.rs)
include!(concat!(env!("OUT_DIR"), "/server_theme_constants.rs"));

/// Build logo config from compile-time constants embedded by server/build.rs from site/config.ncl.
/// `href` is language-dependent; resolved at render time via `localize_url`.
pub fn load_logo_config() -> LogoConfig {
    LogoConfig {
        light_src: theme::logo::LIGHT_SRC.to_string(),
        dark_src: theme::logo::DARK_SRC.to_string(),
        alt: theme::logo::ALT.to_string(),
        href: String::new(),
        show_in_nav: theme::logo::SHOW_IN_NAV,
        show_in_footer: theme::logo::SHOW_IN_FOOTER,
        width: theme::logo::WIDTH.map(|s| s.to_string()),
        height: theme::logo::HEIGHT.map(|s| s.to_string()),
    }
}
