import type { ActionOptions } from '@/components/DropDownButtons/type';
import { BasicTableProps } from '@/components/VxeTable';
import { EditType } from '@/type/BaseEnum';
import { Edit, Delete } from "@element-plus/icons-vue";
import { reactive } from 'vue';
/**
 * 客户费用接管表格配置
 * @returns 
 */
function useAdministratorListModel() {
    const administratorListOptions = reactive<BasicTableProps>({
        id: 'administrator_list_table',
        border: true,
        keepSource: true,
        showOverflow: true,
        height: 520,
        loading: false,
        stripe: true,
        rowConfig: { isHover: true, keyField: '_id' },
        columnConfig: { resizable: true },
        columns: [
            { type: "seq", title: '序号', width: 65 },
            { field: 'successorName', title: '用户名', minWidth: 140 },
            { field: 'notifyUserType', title: '类型', minWidth: 110, slots: { default: 'notifyUserType' } },
            { field: 'feeSetName', title: '费用名称', minWidth: 100 },
            { field: 'email', title: 'Emai', minWidth: 120 },
            { field: 'mobile', title: '手机号', minWidth: 120 },
            { title: '操作', slots: { default: 'actions' }, width: 135, fixed: 'right' }
        ],
        data: []
    })

    // 操作类别 
    const administratorListActionOptions: ActionOptions[] = [
        {
            value: EditType.EDIT,
            label: "编辑",
            type: "primary",
            icon: Edit,
            permissions: ['sys:customerFeeSetAdministrator:edit']
        },
        {
            value: EditType.DELETE,
            label: "删除",
            type: "danger",
            icon: Delete,
            permissions: ['sys:customerFeeSetAdministrator:delete']
        }
    ]


    return {
        administratorListOptions,
        administratorListActionOptions
    }
}

export {
    useAdministratorListModel
}