/**
 * 灾害预警信息搜索配置
 */
import { DISASTER_TYPE, DISASTER_LEVEL, ACTIVE_STATUS_OPTIONS } from '@/views/disaster/constant';
import { WEATHER_DISASTER_ALERT_TYPE } from '../constant';
import type { SearchConfig } from '@/views/disaster/types';
// 通用搜索配置
const BASIC_SEARCH_CONFIG = {
  DISASTER_LEVEL: {
    label: '灾害等级',
    prop: 'disasterLevel',
    component: 'ElSelect',
    selectOptions: DISASTER_LEVEL,
    componentProps: {
      placeholder: '请选择灾害等级',
    },
  },
};

// 预警信息搜索配置
export const WARNING_INFO_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '灾害类型',
    prop: 'disasterType',
    component: 'ElSelect',
    selectOptions: WEATHER_DISASTER_ALERT_TYPE,
    componentProps: {
      placeholder: '请选择灾害类型',
      filterable: true,
    },
  },
  BASIC_SEARCH_CONFIG.DISASTER_LEVEL,
];

// 防御通知搜索配置
export const DEFENSE_NOTICE_SEARCH_CONFIG: SearchConfig[] = [
  {
    label: '灾害类型',
    prop: 'disasterType',
    component: 'ElSelect',
    selectOptions: DISASTER_TYPE,
    componentProps: {
      placeholder: '请选择灾害类型',
      filterable: true,
    },
  },
  BASIC_SEARCH_CONFIG.DISASTER_LEVEL,
  {
    label: '生效状态',
    prop: 'activeStatus',
    component: 'ElSelect',
    selectOptions: ACTIVE_STATUS_OPTIONS,
  },
];
