/**
 * 灾害预警信息表格配置
 */
import type { TableColumnProps } from '@/types/basic-table';
// 基础表格样式配置
export const TABLE_OPTIONS = {
  emptyText: '暂无数据',
  height: '60vh',
  loading: true,
  stripe: true,
};

// 基础表格列配置
const BASIC_TABLE_COLUMNS = {
  DISASTER_TYPE: {
    prop: 'disasterType',
    label: '灾害类型',
    align: 'center',
  },
  DISASTER_LEVEL: {
    prop: 'disasterLevel',
    label: '灾害等级',
    align: 'center',
  },
  PUBLISH_TIME: {
    prop: 'publishTime',
    label: '发布时间',
    align: 'center',
    width: '200cpx',
  },
  ACTIVE_STATUS: {
    prop: 'activeStatus',
    label: '生效状态',
    align: 'center',
    slot: 'activeStatus',
    width: '120cpx',
  },
  PUSH_STATUS: {
    prop: 'pushStatus',
    label: '推送',
    align: 'center',
    slot: 'pushStatus',
  },
  ACTION: {
    prop: 'action',
    label: '操作',
    align: 'center',
    slot: 'action',
    fixed: 'right',
    width: '250cpx',
  },
};

// 预警信息表格列配置
export const WARNING_INFO_TABLE_COLUMNS: TableColumnProps[] = [
  {
    prop: 'warningIcon',
    label: '预警图标',
    align: 'center',
    slot: 'warningIcon',
  },
  BASIC_TABLE_COLUMNS.DISASTER_TYPE,
  BASIC_TABLE_COLUMNS.DISASTER_LEVEL,
  {
    prop: 'warningTime',
    label: '预警时间',
    align: 'center',
    width: '200cpx',
  },
  {
    prop: 'warningContent',
    label: '发布内容',
    align: 'center',
    width: '200cpx',
  },
  BASIC_TABLE_COLUMNS.ACTIVE_STATUS,
  BASIC_TABLE_COLUMNS.PUBLISH_TIME,
  BASIC_TABLE_COLUMNS.PUSH_STATUS,
  BASIC_TABLE_COLUMNS.ACTION,
];

// 防御通知表格列配置
export const DEFENSE_NOTICE_TABLE_COLUMNS: TableColumnProps[] = [
  {
    prop: 'noticeTitle',
    label: '通知标题',
    align: 'center',
  },
  BASIC_TABLE_COLUMNS.DISASTER_TYPE,
  BASIC_TABLE_COLUMNS.DISASTER_LEVEL,
  BASIC_TABLE_COLUMNS.PUBLISH_TIME,
  BASIC_TABLE_COLUMNS.ACTIVE_STATUS,
  BASIC_TABLE_COLUMNS.PUSH_STATUS,
  BASIC_TABLE_COLUMNS.ACTION,
];
