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

import A from "@components/MDX/A.astro";

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

const { award } = Astro.props as Props;

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

<div class="col-span-1">
  <div class="bg-primary rounded text-white shadow">
    <div class="p-2">
      <div class="text-l font-bold">{award.data.title}</div>
      <div class="text-sm italic">
        {award.data.giver} ({award.data.date.getFullYear()})
      </div>
    </div>
    <div class="bg-white p-2 text-left">
      <div class="text-sm text-gray-600">
        <Content components={{ a: A }} />
      </div>
    </div>
  </div>
</div>
