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

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

export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: { placeholder: '订单ID', allowClear: true },
      fieldName: 'product_order_id',
      label: '订单ID',
    },
    {
      component: 'VbenInput',
      componentProps: { placeholder: '药品ID', allowClear: true },
      fieldName: 'drug_id',
      label: '药品ID',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '绝对值', value: 'absolute' },
          { label: '百分比', value: 'percent' },
        ],
        placeholder: '全部',
      },
      fieldName: 'adjust_mode',
      label: '调价方式',
    },
    { ...logTimeRangeSchema },
  ],
  showCollapseButton: true,
  submitButtonOptions: { content: '查询' },
  submitOnChange: false,
  submitOnEnter: true,
};
