---
/**
 * PageLayout
 * Layout wrapper for standard content pages (non-landing)
 * Uses Header + Footer with content page configuration
 */
import BaseLayout from './BaseLayout.astro';
import Header from '@/components/layout/Header.astro';
import AppFooter from '@/components/layout/AppFooter.astro';
import { useTranslations } from '@/i18n/utils';
import type { Locale } from '@/i18n/ui';

interface Props {
  title?: string;
  description?: string;
  image?: string;
  imageAlt?: string;
  noindex?: boolean;
  nofollow?: boolean;
  showScrollProgress?: boolean;
  locale?: Locale;
}

const {
  title,
  description,
  image,
  imageAlt,
  noindex,
  nofollow,
  showScrollProgress = false,
  locale = (Astro.currentLocale ?? 'de') as Locale,
} = Astro.props;

const t = useTranslations(locale);
---

<BaseLayout
  title={title}
  description={description}
  image={image}
  imageAlt={imageAlt}
  noindex={noindex}
  nofollow={nofollow}
>
  <Header
    slot="header"
    position="fixed"
    shape="bar"
    variant="solid"
    size="lg"
    showActiveState
    showCta
    cta={{ label: t('hero.login'), href: 'https://app.armarium.ch/login' }}
    showScrollProgress={showScrollProgress}
    showLanguageSwitcher
    currentLocale={locale}
    nav={[
      { label: t('nav.blog'),     href: t('nav.blog.href') },
      { label: t('nav.features'), href: t('nav.features.href') },
      { label: t('nav.about'),    href: t('nav.about.href') },
      { label: t('nav.contact'),  href: t('nav.contact.href') },
    ]}
  />

  <main class="min-h-screen pt-16">
    <slot />
  </main>

  <AppFooter slot="footer" locale={locale} />
</BaseLayout>
