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

let config = (searchTgy:(platformId: string) => void, fnc: () => void, dels: () => void, foundLandingPage: () => void, backSorter:(value: string) => void): FormConfig[] => [
    {
        tag: 'RangePicker',
        name: 'RangePicker',
        change: true,
        callback: (e)=>{console.log(111111, e)}
    },
    {
        tag: 'input',
        name: 'platformId',
        change: true,
        width: 200,
        placeholder: "搜索推广页",
        callback: (e)=>{searchTgy(e.target.value)}
    },
    // {
    //     tag: 'select',
    //     name: 'sorter',
    //     defaultValue: '降序',
    //     children: [{text: '升序', value: '升序'}, {text: '降序', value: '降序'}],
    //     change: true,
    //     width: 200,
    //     placeholder: "选择排序",
    //     callback: (e)=>{backSorter(e)}
    // },
    {
        label: '查询',
        icon: <SearchOutlined />,
        tag: 'button',
        htmlType: 'button',
        btnType: 'primary',
        name: 'zx',
        callback: fnc
    },
    // {
    //     label: '删除',
    //     tag: 'button',
    //     htmlType: 'button',
    //     btnType: 'dashed',
    //     name: 'zx',
    //     callback: dels
    // },
    {
        label: '新建推广页',
        tag: 'button',
        htmlType: 'button',
        btnType: 'primary',
        name: 'zx',
        callback: foundLandingPage
    },
]

export default config