<template>
    <w-card>
        <template #title>
            <text>{{ item.date }}</text>
        </template>
        <template #content>
            <view class="flex flex-col gap-[16rpx]">
                <view v-for="(data, index) in item.templateItems" :key="`unique_${index}`">
                    <text>{{ data.formTitle }}：</text>
                    <text>{{ data.value }}</text>
                </view>
            </view>
        </template>
    </w-card>
</template>

<script setup lang="ts">
import { PropType } from 'vue'
import { ISummary } from '@/components/widgets/summary-form/summary-form.vue'

export interface ISummaryCard {
    date: string
    templateItems: ISummary[]
}
defineProps({
    item: {
        type: Object as PropType<ISummaryCard>,
        default: () => ({})
    }
})
</script>
<style scoped></style>
