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

/**
 * 日志搜索表单配置
 */
export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '输入场景编码',
      },
      defaultValue: '',
      fieldName: 'scene_code',
      label: '场景编码',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '输入平台编码',
      },
      defaultValue: '',
      fieldName: 'platform_code',
      label: '平台编码',
    },
    {
      component: 'VbenSelect',
      componentProps: {
        placeholder: '选择状态',
        options: [
          { label: '成功', value: 1 },
          { label: '失败', value: 0 },
        ],
      },
      defaultValue: '',
      fieldName: 'status',
      label: '状态',
    },
    {
      // 发送类型筛选：normal 业务正常发送 / test 机器人测试发送
      component: 'VbenSelect',
      componentProps: {
        placeholder: '选择发送类型',
        options: [
          { label: '正常发送', value: 'normal' },
          { label: '测试发送', value: 'test' },
        ],
      },
      defaultValue: '',
      fieldName: 'send_type',
      label: '发送类型',
    },
  ],
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  submitOnChange: true,
  submitOnEnter: false,
};
