---
import type { CollectionEntry } from "astro:content";
import { render } from "astro:content";

import TextLink from "@components/TextLink.astro";

interface Props {
  award: CollectionEntry<"awards">;
}

const { award } = Astro.props as Props;

const { Content } = await render(award);
---

<div>
  <dl>
    <dt>
      <h2 class="-mb-1 pb-0 text-base font-bold">{award.data.title}</h2>
      <span class="text-sm italic">
        {award.data.giver} ({award.data.date.getFullYear()})
      </span>
      <dd class="pt-2">
        <Content components={{ a: TextLink }} />
      </dd>
    </dt>
  </dl>
</div>
