//! Unified PostViewer Page Component

use leptos::prelude::*;

#[component]
pub fn PostViewerPage(
    _language: String,
    #[prop(optional)] slug: Option<String>,
    #[prop(default = "content".to_string())] content_type: String,
) -> impl IntoView {
    #[cfg(not(target_arch = "wasm32"))]
    {
        view! { <crate::post_viewer::ssr::PostViewerPageSSR _language=_language.clone() slug=slug.unwrap_or_default() content_type=content_type /> }
    }
    #[cfg(target_arch = "wasm32")]
    {
        view! { <crate::post_viewer::client::PostViewerPageClient _language=_language.clone() slug=slug.unwrap_or_default() content_type=content_type /> }
    }
}
