import { SearchOutlined } from "@ant-design/icons"
import React from "react"
import { FormConfig } from '@/components/Formitem/type'

let config = (backISP: (bookName: string) => void, backAccount: (platformId: string) => void, backPitcher:(platformId: string) => void, fnc: () => void, platform: any[]): FormConfig[] => [
    {
        tag: 'select',
        name: 'bookName',
        children: [{ value: '1', text: '服务商1' }, { value: '2', text: '服务商2' }],
        change: true,
        width: 200,
        placeholder: "选择服务商",
        callback: backISP
    },
    {
        tag: 'select',
        name: 'platformId',
        children: platform,
        change: true,
        width: 200,
        placeholder: "选择公众号",
        callback: backAccount
    },
    {
        tag: 'select',
        name: 'platformId',
        children: platform,
        change: true,
        width: 200,
        placeholder: "选择投手",
        callback: backPitcher
    },
    {
        label: '查询',
        icon: <SearchOutlined />,
        tag: 'button',
        htmlType: 'button',
        btnType: 'primary',
        name: 'zx',
        callback: fnc
    }
]

export default config