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

export const formOptions: VbenFormProps = {
  wrapperClass: 'grid-cols-12',
  commonConfig: {
    formItemClass: 'col-span-12',
    componentProps: {
      class: 'w-full',
    },
  },
  layout: 'horizontal',
  schema: [
    {
      component: 'VbenInput',
      formItemClass: 'col-span-6',
      componentProps: {
        placeholder: '请输入医生姓名',
      },
      fieldName: 'name',
      label: '医生姓名',
    },
    {
      component: 'VbenInput',
      formItemClass: 'col-span-6',
      componentProps: {
        placeholder: '请输入手机号',
      },
      fieldName: 'mobile',
      label: '手机号',
    },
    {
      component: 'Select',
      formItemClass: 'col-span-6',
      componentProps: {
        placeholder: '请选择审核状态',
        options: [
          { label: '待审核', value: 0 },
          { label: '审核通过', value: 1 },
          { label: '审核拒绝', value: 2 },
        ],
      },
      fieldName: 'status',
      label: '审核状态',
    },
  ],
  showDefaultActions: false,
};

/** 审核列表：默认只看待审核 */
export const auditFormOptions: VbenFormProps = {
  ...formOptions,
  schema: formOptions.schema?.map((item) =>
    item.fieldName === 'status' ? { ...item, defaultValue: 0 } : item,
  ),
};
