---
/**
 * LandingLayout
 * Layout wrapper for landing-style pages (marketing, demo, showcase)
 * Uses Header + Footer with landing-specific 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;
  includeOrgSchema?: boolean;
  includePersonSchema?: boolean;
  includeProfessionalServiceSchema?: boolean;
  locale?: Locale;
}

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

const t = useTranslations(locale);
const isHomePage = Astro.url.pathname === '/' || Astro.url.pathname === `/${locale}/`;
---

<BaseLayout
  title={title}
  description={description}
  image={image}
  imageAlt={imageAlt}
  noindex={noindex}
  nofollow={nofollow}
  includeOrgSchema={includeOrgSchema}
  includePersonSchema={includePersonSchema}
  includeProfessionalServiceSchema={includeProfessionalServiceSchema}
>
  <Header
    slot="header"
    position="fixed"
    shape="floating"
    variant="default"
    colorScheme="default"
    size="lg"
    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') },
    ]}
    showCta
    cta={{ label: t('hero.login'), href: 'https://app.armarium.ch/login' }}
    showLanguageSwitcher
    currentLocale={locale}
    showScrollProgress={isHomePage}
    scrollProgressPosition="top"
  />

  <slot />

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