<script lang="ts" setup>
import type { WorkflowItem } from '@vben/common-ui';

import { useRouter } from 'vue-router';

import { WorkflowsView } from '@vben/common-ui';
import { SvgPPT, SvgSpider, SvgWord } from '@vben/icons';

const items: WorkflowItem[] = [
  {
    icon: SvgSpider,
    title: '数据抓取工具',
    description: '自动抓取',
    path: '/spider',
  },
  {
    icon: SvgWord,
    title: 'Word文档生成工具',
    description: '自动生成word文档',
    path: '/word',
  },
  {
    icon: SvgPPT,
    title: 'PPT生成工具',
    description: '自动生成PPT文档',
    path: '/ppt',
  },
];
const router = useRouter();

function handleGo(path: string) {
  router.push(path);
}
</script>

<template>
  <div class="p-5">
    <WorkflowsView :items="items" @click="handleGo" />
  </div>
</template>
