<template>
  <img class="head-img w-100 radius-base" src="https://mn.wenlvti.net/app_static/xiangan/banner_dig_environment.jpg" />
  <TaskList>
    <TaskItem 
      title="自然环境" 
      desc="村落建立与发展历程" 
      icon="icon-task-environment-1" 
      :enabled="canCollect('environment')"
      @click="goForm('environment', 0)"
    />
    <TaskItem 
      title="文物古迹" 
      desc="重要历史文献资料" 
      icon="icon-task-environment-5" 
      :enabled="canCollect('relic')"
      @click="goForm('relic', 0)"
    />
    <TaskItem 
      title="历史环境要素" 
      desc="历史环境要素资料" 
      icon="icon-task-environment-6" 
      :enabled="canCollect('element')"
      @click="goForm('element', 0)"
    />
  </TaskList>
</template>

<script setup lang="ts">
import { useTaskEntryForm } from '../composeable/TaskEntryForm';
import { useCollectStore } from '@/stores/collect';
import TaskList from '../components/TaskList.vue';
import TaskItem from '../components/TaskItem.vue';

const { goForm } = useTaskEntryForm();
const { canCollect } = useCollectStore();
</script>