<script setup lang="ts">
import type { WordTempItem } from './typing';

import { Card, CardContent, CardHeader, CardTitle } from '@vben-core/shadcn-ui';

defineOptions({
  name: 'WordListView',
});

defineEmits(['click']);

const items: WordTempItem[] = [
  {
    id: 'baca08c1-e92b-4dc9-a445-3584803f54d4',
    name: '职业创新申报书',
  },
];
</script>

<template>
  <Card style="height: calc(55vh - 120px); overflow-y: auto">
    <CardHeader class="py-4">
      <CardTitle class="text-lg">选择模板</CardTitle>
    </CardHeader>
    <CardContent class="flex flex-wrap p-5 pt-0">
      <ul class="divide-border w-full divide-y" role="list">
        <li
          v-for="(item, index) in items"
          :key="index"
          @click="$emit('click', item)"
          class="flex cursor-pointer justify-between gap-x-6 py-5"
        >
          {{ item.name }}
        </li>
      </ul>
    </CardContent>
  </Card>
</template>
