import type {VbenFormProps} from '#/adapter/form';


export const modalFormProps: VbenFormProps = {
  wrapperClass: 'grid-cols-12', // 24栅格,
  commonConfig: {
    formItemClass: 'col-span-12',
    // 所有表单项
    componentProps: {
      class: 'w-full',
    },
  },
  // handleSubmit: onSubmit,
  layout: 'horizontal',
  schema: [
    {
      component: 'VbenInput',
      fieldName: 'id',
      label: 'ID',
      formItemClass: 'col-span-6',
      dependencies: {
        show: false,
        triggerFields: ['id'],
      },
    },
    {
      component: 'VbenInput',
      fieldName: 'showSelect',
      label: 'ID',
      formItemClass: 'col-span-6',
      dependencies: {
        show: false,
        triggerFields: ['id'],
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入药品昵称',
      },
      fieldName: 'drug_name',
      formItemClass: 'col-span-6',
      label: '药品昵称',
      rules: 'required',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入药品别名',
      },
      fieldName: 'drug_alias',
      formItemClass: 'col-span-6',
      label: '药品别名',
      rules: 'required',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入药品编号',
      },
      fieldName: 'drug_number',
      formItemClass: 'col-span-6',
      label: '药品编号',
      rules: 'required',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        options: [],
        placeholder: '请选择',
      },
      fieldName: 'time_id',
      formItemClass: 'col-span-6',
      label: '使用时间',
      rules: 'required',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        options: [],
        placeholder: '请选择',
      },
      fieldName: 'type_id',
      formItemClass: 'col-span-6',
      label: '使用方法',
      rules: 'required',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        options: [],
        placeholder: '请选择',
      },
      fieldName: 'unit_id',
      formItemClass: 'col-span-6',
      label: '单位',
      rules: 'required',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        options: [],
        placeholder: '请选择',
      },
      fieldName: 'frequency_id',
      formItemClass: 'col-span-6',
      label: '频率',
      rules: 'required',
    },
    {
      component: 'RadioGroup',
      componentProps: {
        placeholder: '请选择',
        options: [
          {
            label: '草稿',
            value: 1,
          },
          {
            label: '下架',
            value: 2,
          },
          {
            label: '上架',
            value: 3,
          },
        ],
      },
      defaultValue: 1,
      formItemClass: 'col-span-12',
      fieldName: 'status',
      label: '商品状态',
      rules: 'required',
    },
  ],
  showDefaultActions: false,
};
export const uploadExcelProps: VbenFormProps = {
  wrapperClass: 'grid-cols-12', // 24栅格,
  commonConfig: {
    formItemClass: 'col-span-12',
    // 所有表单项
    componentProps: {
      class: 'w-full',
    },
  },
  // handleSubmit: onSubmit,
  layout: 'horizontal',
  schema: [
    {
      component: 'Upload',
      componentProps: {
        placeholder: '请选择',
        multiple: true,
      },
      fieldName: 'frequency_id',
      formItemClass: 'col-span-12',
      label: '导入excel',
      rules: 'file',
    },
  ],
  showDefaultActions: false,
};
