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

import { logTimeRangeSchema } from '../../shared/normalizeLogFilters';

export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '姓名（精确匹配）',
        allowClear: true,
      },
      fieldName: 'name',
      label: '姓名',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '匹配', value: 1 },
          { label: '不匹配', value: 0 },
        ],
        placeholder: '全部',
      },
      fieldName: 'is_match',
      label: '结论',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '就诊人', value: 'patient' },
          { label: '医生', value: 'doctor' },
          { label: '药师', value: 'pharmacist' },
        ],
        placeholder: '全部',
      },
      fieldName: 'scene',
      label: '场景',
    },
    { ...logTimeRangeSchema },
  ],
  showCollapseButton: true,
  submitButtonOptions: { content: '查询' },
  submitOnChange: false,
  submitOnEnter: true,
};
