/**
 * 灾害预警信息搜索配置
 */
import { ACTIVE_STATUS_OPTIONS } from '@/views/disaster/constant';
import type { SearchConfig } from '@/types/basic-search';
// 通用搜索配置
const BASIC_SEARCH_CONFIG = {
  DISASTER_LEVEL: {
    label: '灾害等级：',
    prop: 'disasterLevel',
    slot: 'disasterLevel',
  },
  EFFECT_STATE: {
    label: '生效状态：',
    prop: 'effectState',
    component: 'ElSelect',
    selectOptions: ACTIVE_STATUS_OPTIONS,
    componentProps: {
      placeholder: '请选择生效状态',
    },
  },
};

// 预警信息搜索配置
export const WARNING_INFO_SEARCH_CONFIG_DEFAULT: SearchConfig[] = [
  {
    label: '预警类型：',
    prop: 'disasterType',
    slot: 'disasterType',
  },
  BASIC_SEARCH_CONFIG.DISASTER_LEVEL,
];
export const WARNING_INFO_SEARCH_CONFIG_PERMISSION: SearchConfig[] = [
  ...WARNING_INFO_SEARCH_CONFIG_DEFAULT,
  BASIC_SEARCH_CONFIG.EFFECT_STATE,
];

// 防御通知搜索配置
export const DEFENSE_NOTICE_SEARCH_CONFIG_DEFAULT: SearchConfig[] = [
  {
    label: '灾害类型：',
    prop: 'disasterType',
    slot: 'disasterType',
  },
  BASIC_SEARCH_CONFIG.DISASTER_LEVEL,
];
export const DEFENSE_NOTICE_SEARCH_CONFIG_PERMISSION: SearchConfig[] = [
  ...DEFENSE_NOTICE_SEARCH_CONFIG_DEFAULT,
  BASIC_SEARCH_CONFIG.EFFECT_STATE,
];
