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

/**
 * 列表顶部搜索表单
 * 按任务名 / 编码 / 启停筛选，方便运维定位
 */
export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '任务名称',
      },
      fieldName: 'name',
      label: '任务名称',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: 'task_code',
      },
      fieldName: 'task_code',
      label: '任务编码',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '启用', value: 1 },
          { label: '禁用', value: 0 },
        ],
        placeholder: '启停状态',
      },
      fieldName: 'enabled',
      label: '启停',
    },
  ],
  showCollapseButton: false,
  submitButtonOptions: {
    content: '查询',
  },
  submitOnChange: false,
  submitOnEnter: true,
};
