//! Server-side logo components
//!
//! Static implementations of logo components optimized for SSR rendering.

use ::rustelo_core_lib::defs::LogoConfig;
use leptos::prelude::*;

/// Server-side static logo component
#[component]
pub fn LogoSSR(
    #[prop(optional)] config: Option<LogoConfig>,
    #[prop(default = "h-8 w-auto".to_string())] class: String,
    #[prop(default = false)] as_link: bool,
    #[prop(default = "en".to_string())] _lang: String,
) -> impl IntoView {
    let logo_config = config.unwrap_or_else(|| use_context::<LogoConfig>().unwrap_or_default());
    // Delegate to unified implementation
    view! {
        <crate::logo::unified::Logo
            config=logo_config
            class=class
            as_link=as_link
        />
    }
}

/// Server-side static logo link component
#[component]
pub fn LogoLinkSSR(
    #[prop(optional)] config: Option<LogoConfig>,
    #[prop(default = "h-8 w-auto".to_string())] class: String,
    #[prop(default = "en".to_string())] _lang: String,
) -> impl IntoView {
    let logo_config = config.unwrap_or_else(|| use_context::<LogoConfig>().unwrap_or_default());
    view! {
        <crate::logo::unified::LogoLink config=logo_config class=class />
    }
}

// Re-export as Logo and LogoLink for compatibility
pub use LogoLinkSSR as LogoLink;
pub use LogoSSR as Logo;
