/**
 * 预防检查任务单搜索配置
 */
import type { SearchConfig } from '@/types/basic-search';
import {
  INSPECT_TYPE_OPTIONS,
  TASK_STAGE_OPTIONS_MANAGEMENT,
  TASK_STAGE_OPTIONS_EXECUTION,
} from '../constants/task-execution';
import { ACTIVE_STATUS_OPTIONS } from '@/views/disaster/constant';

// 通用搜索配置
const BASIC_SEARCH_CONFIG = {
  INSPECT_TYPE: {
    label: '检查类型：',
    prop: 'inspectType',
    component: 'ElSelect',
    selectOptions: INSPECT_TYPE_OPTIONS,
    componentProps: {
      placeholder: '请选择检查类型',
    },
  },
};

// 任务管理搜索配置
export const TASK_MANAGEMENT_SEARCH_CONFIG: SearchConfig[] = [
  BASIC_SEARCH_CONFIG.INSPECT_TYPE,
  {
    label: '生效状态：',
    prop: 'effectStatus',
    component: 'ElSelect',
    selectOptions: ACTIVE_STATUS_OPTIONS,
    componentProps: {
      placeholder: '请选择生效状态',
    },
  },
  {
    label: '任务阶段：',
    prop: 'taskState',
    component: 'ElSelect',
    selectOptions: TASK_STAGE_OPTIONS_MANAGEMENT,
    componentProps: {
      placeholder: '请选择检查阶段',
    },
  },
];

// 任务执行搜索配置
export const TASK_EXECUTION_SEARCH_CONFIG: SearchConfig[] = [
  BASIC_SEARCH_CONFIG.INSPECT_TYPE,
  {
    label: '任务阶段：',
    prop: 'taskState',
    component: 'ElSelect',
    selectOptions: TASK_STAGE_OPTIONS_EXECUTION,
    componentProps: {
      placeholder: '请选择任务阶段',
    },
  },
];
