//! Unified AdminDashboard Page Component

use leptos::prelude::*;

#[component]
pub fn UnifiedAdminDashboardPage(
    #[prop(default = rustelo_core_lib::config::get_default_language().to_string())]
    _language: String,
    #[prop(optional)] lang_content: Option<std::collections::HashMap<String, String>>,
) -> impl IntoView {
    use rustelo_core_lib::i18n::content_helper::create_content_provider_reactive;
    let content = create_content_provider_reactive(lang_content);

    view! {
      <div class="ds-bg-page">
        <section class="relative py-ds-4 ds-container ds-rounded-lg ds-shadow-lg">
          <div class="mx-auto max-w-4xl text-center">
            <h1 class="text-balance text-4xl font-bold tracking-tight ds-text sm:text-6xl mb-ds-4">
              {content.t("admin-dashboard-hero-title")}
            </h1>
            <rustelo_components_leptos::HtmlContent
              content={content.t("admin-dashboard-hero-subtitle")}
              class="mt-ds-6 ds-body ds-text-secondary max-w-2xl mx-auto".to_string()
            />
          </div>
        </section>

        <section class="py-ds-6 ds-bg ds-rounded-lg">
          <div class="ds-container-lg ds-container">
            <div class="max-w-4xl mx-auto">
              <h2 class="text-3xl font-bold ds-text mb-ds-6">{content.t("admin-dashboard-content-title")}</h2>
              <rustelo_components_leptos::HtmlContent
                content={content.t("admin-dashboard-content-description")}
                class="ds-text-secondary space-y-4".to_string()
              />
            </div>
          </div>
        </section>
      </div>
    }
}
