---
import type { CollectionEntry } from 'astro:content';
import Base from './Base.astro';
import BreadCrumbs from '../components/BreadCrumbs.astro';
import BackRefs from '../components/BackRefs.astro';

type Props = CollectionEntry<'entries'>['data'];

const { title, frontmatter } = Astro.props;
---

<Base title={title}>
  <article class="max-w-3xl mx-auto">
    <div class="mb-6 pb-4 border-b" style="border-color: var(--border)">
      <h1 class="text-3xl font-bold mb-2" style="color: var(--text-primary)">{title}</h1>
      <BreadCrumbs current={frontmatter.fname} />
    </div>
    <div class="prose-wiki">
      <slot />
    </div>
    <div class="mt-8 pt-6 border-t" style="border-color: var(--border)">
      <BackRefs frontmatter={frontmatter} />
    </div>
  </article>
</Base>
