---
import EditionLayout from "../../layouts/EditionLayout.astro";
import { getCollection } from "astro:content";

export async function getStaticPaths() {
  const entries = await getCollection("atlas");
  return entries.map((entry) => ({
    params: { slug: entry.slug },
    props: { entry },
  }));
}

const { entry } = Astro.props;
const { Content } = await entry.render();
---

<EditionLayout
  title={entry.data.title}
  editionLabel="Atlas"
  editionKey="atlas"
  statusLabel="cartographie"
  statusKey="cartographie"
  level={entry.data.level}
  version={entry.data.version}
>
  <h1>{entry.data.title}</h1>
  <Content />
</EditionLayout>
