import { Tools, List, HomeFilled, UserFilled, Platform, BellFilled, GoodsFilled, WarningFilled } from '@element-plus/icons-vue'

// 定义图标映射表配置
export const menuiconMap: Record<string, any> = {
    Tools,
    List,
    HomeFilled,
    UserFilled,
    Platform,
    BellFilled,
    GoodsFilled,
    WarningFilled
}

// 定义选择图标选项列表配置
export const menuiconOptions = [
    { label: "无图标", value: "无图标" },
    { label: "Tools(工具)", value: "Tools", icon: Tools },
    { label: "List(列表)", value: "List", icon: List },
    { label: "HomeFilled(首页)", value: "HomeFilled", icon: HomeFilled },
    { label: "UserFilled(用户)", value: "UserFilled", icon: UserFilled },
    { label: "Platform(平台)", value: "Platform", icon: Platform },
    { label: "BellFilled(铃铛)", value: "BellFilled", icon: BellFilled },
    { label: "GoodsFilled(商品)", value: "GoodsFilled", icon: GoodsFilled },
    { label: "WarningFilled(警告)", value: "WarningFilled", icon: WarningFilled },
]

//定义table配置
export const menuTableColumns = [
    { prop: 'name', label: '菜单名称', align: 'center' as const},
    { prop: 'path', label: '路由路径', align: 'center' as const},
    { label: '图标', slotName: 'icon', align: 'center' as const },
    { label: '类型', slotName: 'type', align: 'center' as const },
    { label: '状态', slotName: 'status', align: 'center' as const },
    { label: '操作', slotName: 'action', align: 'center' as const }
]

//定义menuForm配置
export const menuFormItemOptions = [
  { prop: 'name', label: '菜单名称', type: 'input' as const, placeholder: '请输入菜单名称' },
  { prop: 'parent_id', label: '父级菜单', type: 'select' as const, placeholder: '请选择父级菜单' },
  { prop: 'path', label: '前端路由', type: 'input' as const, placeholder: '请输入前端路由路径' },
  { prop: 'api', label: '后端路由', type: 'input' as const, placeholder: '请输入后端路由' },
  { prop: 'icon', label: '图标名称', type: 'select' as const, placeholder: '请选择图标名称' },
  {
    prop: 'sort',
    label: '排序',
    type: 'number' as const,
    placeholder: '请输入排序,数字越小越靠前',
  },
  { prop: 'type', label: '菜单类型', type: 'radio' as const, placeholder: '请选择菜单类型' },
  { prop: 'status', label: '状态', type: 'radio' as const, placeholder: '请选择状态' },
]
