<template>
  <div class="flex flex-col h-fit w-full border border-primary rounded-md">
    <RouterLink
      :to="{ name: 'admin-club-protocol-overview', params: { protocolId: protocol.id } }"
      class="bg-primary p-2 text-white flex flex-row justify-between items-center"
    >
      <p>{{ protocol.title }} - {{ protocol.date }}</p>
    </RouterLink>
    <div class="p-2 max-h-48 overflow-y-auto">
      <p v-html="protocol.summary"></p>
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineComponent, type PropType } from "vue";
import { mapState, mapActions } from "pinia";
import type { ProtocolViewModel } from "@/viewmodels/admin/club/protocol/protocol.models";
</script>

<script lang="ts">
export default defineComponent({
  props: {
    protocol: { type: Object as PropType<ProtocolViewModel>, default: {} },
  },
});
</script>
