import { SearchTypeItem, SearchWayItemType } from "@/app/_lib/data/search";
import { mRequest } from "@/app/_lib/request";
import { useAntdTable, useRequest } from "ahooks";
import { Button, Card, Space, Table } from "antd";

export default function Page() {
    const searchWayList = useRequest(async () => mRequest('GET', "/api/search"))
    const { data } = useAntdTable(async () => mRequest<{
        total: number;
        list: SearchTypeItem[]
    }>('GET', "/api/"))
    return <Space>
        {/* 
        <Card title="搜索分类管理" extra={<Button type="primary">添加</Button>}>
            <Table<SearchTypeItem>
                columns={[
                    {
                        title: '分类名称',
                        dataIndex: 'name'
                    },
                    {
                        title: '标示符',
                        dataIndex: 'key',

                    },
                    {
                        title: 
                    }
                ]}
            >

            </Table>
        </Card> */}
        <Card title="搜索引擎管理">
            <Table<SearchWayItemType>
                columns={[
                    {
                        title: '名称',
                        dataIndex: 'label',

                    },
                    {
                        title: '全称',
                        dataIndex: 'fullName',
                    },
                    {
                        title: '搜索链接',
                        dataIndex: 'value'
                    }
                ]}
            >

            </Table>

        </Card>

    </Space>
}