---
import type { Locale } from '@anglefeint/site-i18n/config';
import ThemeFrame from '../../components/shared/ThemeFrame.astro';
import themeCyberCssUrl from '../../styles/theme-cyber.css?url';
import blogListCssUrl from '../../styles/blog-list.css?url';
import CyberSpotlight from '../../effects/cyber-spotlight/CyberSpotlight.astro';
import CyberEnvironment from '../../effects/cyber-environment/CyberEnvironment.astro';

interface Props {
  locale?: Locale;
  title: string;
  description: string;
  includeAlternateLinks?: boolean;
  localeHrefs?: Partial<Record<Locale, string>>;
}

const {
  locale,
  title,
  description,
  localeHrefs,
  includeAlternateLinks = true,
} = Astro.props as Props;
---

<ThemeFrame
  includeAlternateLinks={includeAlternateLinks}
  locale={locale}
  title={title}
  description={description}
  bodyClass="cyber-page"
  mainClass="page-main cyber-content"
  localeHrefs={localeHrefs}
>
  <link slot="head" rel="stylesheet" href={themeCyberCssUrl} />
  <link slot="head" rel="stylesheet" href={blogListCssUrl} />
  <Fragment slot="body-start">
    <CyberEnvironment sizing="viewport" />
    <CyberSpotlight sizing="viewport" />
    <slot name="body-start" />
  </Fragment>
  <slot name="head" slot="head" />
  <slot />
  <slot name="body-end" slot="body-end" />
</ThemeFrame>
