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

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

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

defineEmits(['click']);

const items: PPTTempItem[] = [
  {
    id: 'ee3889b6-50fa-463e-b956-3b93447727fc',
    name: '从可研申报书生成科技项目PPT',
  },
];
</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>
