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

/**
 * 群聊搜索表单配置
 *
 * 关键字段：
 * - platform_code：平台编码精确匹配
 * - name：群聊名称模糊匹配
 * - status：启用/禁用
 */
export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '输入群聊名称',
      },
      defaultValue: '',
      fieldName: 'name',
      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: '状态',
    },
  ],
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  submitOnChange: true,
  submitOnEnter: false,
};
