---
import type { ImageMetadata } from 'astro';
import BaseHead from '../components/BaseHead.astro';
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';

interface Props {
  title?: string;
  description?: string;
  image?: ImageMetadata;
  type?: 'website' | 'article';
  publishedTime?: Date;
  modifiedTime?: Date;
}

const {
  title = SITE_TITLE,
  description = SITE_DESCRIPTION,
  image,
  type = 'website',
  publishedTime,
  modifiedTime,
} = Astro.props;
---

<!DOCTYPE html>
<html lang="en">
  <head>
    <BaseHead
      title={title}
      description={description}
      image={image}
      type={type}
      publishedTime={publishedTime}
      modifiedTime={modifiedTime}
    />
  </head>

  <body>
    <slot />
  </body>
</html>
