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

export const formOptions: VbenFormProps = {
  // 默认展开
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '输入资质名称',
      },
      defaultValue: '',
      fieldName: 'name',
      label: '资质名称',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        placeholder: '选择资质类型',
        options: [
          { label: '药品经营许可证', value: 1 },
          { label: '营业执照', value: 2 },
          { label: '医疗器械经营许可证', value: 3 },
          { label: '食品经营许可证', value: 4 },
          { label: '药师资格证', value: 5 },
        ],
      },
      defaultValue: '',
      fieldName: 'type',
      label: '资质类型',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        placeholder: '选择状态',
        options: [
          { label: '启用', value: 1 },
          { label: '禁用', value: 0 },
        ],
      },
      defaultValue: '',
      fieldName: 'status',
      label: '状态',
    },
  ],
  // 控制表单是否显示折叠按钮
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  // 是否在字段值改变时提交表单
  submitOnChange: true,
  // 按下回车时是否提交表单
  submitOnEnter: false,
};
