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

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

export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '总仓库', value: 0 },
          { label: '诊所|药店', value: 1 },
        ],
        placeholder: '全部',
      },
      fieldName: 'type',
      label: '仓库类型',
    },
    {
      component: 'VbenInput',
      componentProps: { placeholder: '药品ID', allowClear: true },
      fieldName: 'drug_id',
      label: '药品ID',
    },
    {
      component: 'VbenInput',
      componentProps: { placeholder: '门店ID', allowClear: true },
      fieldName: 'store_id',
      label: '门店ID',
    },
    { ...logTimeRangeSchema },
  ],
  showCollapseButton: true,
  submitButtonOptions: { content: '查询' },
  submitOnChange: false,
  submitOnEnter: true,
};
