import { FormConfig } from '@/types/basic-form';

// 隐患类别管理表单配置
export const ACADEMY_FILE_FORM_CONFIG: FormConfig[] = [
  {
    prop: 'categoryName',
    label: '类别名称：',
    component: 'ElInput',
    componentProps: {
      placeholder: '请输入类别名称',
    },
  },
  {
    prop: 'description',
    label: '类别描述：',
    component: 'ElInput',
    componentProps: {
      type: 'textarea',
      rows: 4,
      placeholder: '请输入类别描述，最多300字',
      maxlength: 300,
      showWordLimit: true,
    },
  },
  {
    prop: 'status',
    label: '启用状态：',
    slot: 'status',
  },
];

export const ACADEMY_FILE_FORM_DATA = {
  categoryName: '',
  description: '',
  status: 1, // 默认启用
};

export const ACADEMY_FILE_FORM_RULES = {
  categoryName: [{ required: true, message: '请输入类别名称', trigger: 'blur' }],
  status: [{ required: true, message: '请选择启用状态', trigger: 'change' }],
};

