<template>
  <div class="d-flex flex-row align-items-center gap-3">

    <div class="d-flex flex-column">
      <a-badge v-if="item.progress === -1" status="error" text="已退回" />
      <a-badge v-else-if="item.progress === 0" status="processing" text="待初审" />
      <a-badge v-else-if="item.progress === 1" status="processing" text="初审通过待专家审核" />
      <a-badge v-else-if="item.progress === 2" status="warning" text="专家审核通过" />
      <a-badge v-else-if="item.progress === 3" status="success" text="审核通过" />

      <span v-if="item.logintime" class="text-secondary">传承人上次登录：{{ item.logintime }}</span>
      <span v-if="item.updatedAt" class="text-secondary">上次更新时间：{{ item.updatedAt }}</span>
      <span v-if="item.collectTotal" class="text-secondary">采集版本总数：{{ item.collectTotal }}</span>
    </div>

    <a-tag v-if="!item.hasSubmit" color="#ff4d4f">未提交</a-tag>
    <a-tag v-else color="#409e11">已提交</a-tag>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import type { GetContentListItem } from '@/api/CommonContent';
import { useAuthStore } from '@/stores/auth';

const authStore = useAuthStore();

const props = defineProps({
  item: {
    type: Object as () => GetContentListItem,
    required: true,
  },
})
</script>