/**
 * 灾害防范通用常量
 */

// 是否推送
export enum IS_PUSH {
  NOT_PUSH = 0,
  PUSH,
}

// 是否启动应急事件
export enum IS_EMERGENCY {
  NOT_EMERGENCY = 0,
  EMERGENCY,
}

// 生效状态
export enum ACTIVE_STATUS {
  INACTIVE = 0,
  NOT_EFFECTIVE,
  ACTIVE,
}

export const ACTIVE_STATUS_COLOR = {
  [ACTIVE_STATUS.ACTIVE]: '#52c41a',
  [ACTIVE_STATUS.NOT_EFFECTIVE]: '#ff4d4f',
  [ACTIVE_STATUS.INACTIVE]: '#1890ff',
};

export const ACTIVE_STATUS_MAP: Record<number, string> = {
  [ACTIVE_STATUS.ACTIVE]: '生效',
  [ACTIVE_STATUS.NOT_EFFECTIVE]: '未生效',
  [ACTIVE_STATUS.INACTIVE]: '失效',
};

export const ACTIVE_STATUS_OPTIONS_DEFAULT = [
  {
    label: '生效',
    value: ACTIVE_STATUS.ACTIVE,
  },
  {
    label: '失效',
    value: ACTIVE_STATUS.INACTIVE,
  },
];

export const ACTIVE_STATUS_OPTIONS = [
  {
    label: '生效',
    value: ACTIVE_STATUS.ACTIVE,
  },
  {
    label: '未生效',
    value: ACTIVE_STATUS.NOT_EFFECTIVE,
  },
];

export const ACTIVE_STATUS_OPTIONS_MANAGEMENT = [
  {
    label: '未生效',
    value: ACTIVE_STATUS.NOT_EFFECTIVE,
  },
  ...ACTIVE_STATUS_OPTIONS_DEFAULT,
];

//管理权限
export const DISASTER_PERMISSIONS = {
  OVERVIEW_MONITOR: 'disaster_business_module:monitoring_area',
  WARNING_INFO: 'disaster_business_module:warn_info',
  DEFENSE_NOTICE: 'disaster_business_module:defense_notice',
  TASK_MANAGEMENT: 'disaster_business_module:prevent_inspect',
  DISPOSAL_MANAGEMENT: 'disaster_business_module:disaster_handle',
};
