import type { FileItem } from '@/components/UploadFiles/types.ts';

interface BasicResponse {
  id: number;
  disasterType: string;
  disasterLevel: string;
  pushTime: string;
  effectState: number;
  isPush: number;
}
export interface WarningInfoListResponse extends BasicResponse {
  warnTime: string;
  content: string;
  contentEltooptip?: boolean;
}

interface BasicListQuery {
  disasterType?: string | null;
  disasterLevel?: string | null;
  effectState?: number | null;
}

export interface WarningInfoListQuery extends BasicListQuery {}

export interface DefenseNoticeListQuery extends BasicListQuery {}

export interface DefenseNoticeListResponse extends BasicResponse {
  title: string;
  createdAt: string;
}

interface BasicDetailResponse {
  userGroupList?: number[];
  realname: string;
}

export interface WarningInfoDetailResponse
  extends BasicDetailResponse,
    Omit<WarningInfoListResponse, 'effectState' | 'isPush' | 'pushTime'> {
  source: string;
  isEmergency: number;
  eventType?: string;
}

export interface DefenseNoticeDetailResponse
  extends BasicDetailResponse,
    Omit<DefenseNoticeListResponse, 'effectState' | 'updatedAt'> {
  content: string;
  attachmentListRes: FileItem[];
  pushName: string;
}
