//! ExternalLinkPage - Simple component for handling external links
//! This component can redirect users or show a placeholder for external links

use leptos::prelude::*;
use rustelo_core_lib::config::get_default_language;

/// Simple external link page component
/// This can be used for external routes that need a temporary landing page
#[component]
pub fn ExternalLinkPage(
    #[allow(unused_variables)]
    #[prop(default = get_default_language().to_string())]
    _language: String,
) -> impl IntoView {
    view! {
        <div class="container mx-auto px-4 py-8 text-center">
            <h1 class="text-2xl font-bold mb-4">"External Link"</h1>
            <p class="text-gray-600">"Redirecting to external resource..."</p>
        </div>
    }
}

/// Unified external link page component for route generator compatibility
#[component]
pub fn UnifiedExternalLinkPage(
    #[allow(unused_variables)]
    #[prop(default = get_default_language().to_string())]
    _language: String,
    #[allow(unused_variables)]
    #[prop(optional)]
    lang_content: Option<std::collections::HashMap<String, String>>,
) -> impl IntoView {
    view! {
        <div class="container mx-auto px-4 py-8 text-center">
            <h1 class="text-2xl font-bold mb-4">"External Link"</h1>
            <p class="text-gray-600">"Redirecting to external resource..."</p>
        </div>
    }
}
