export interface NewsroomItem {
  _id: string;
  t: string; // Title
  sl?: string; // Slug
  st?: string; // Subtitle / short title
  bi?: string; // Banner image URL
  c?: string; // HTML content
  mt?: string; // Meta title
  md?: string; // Meta description
  f?: number; // Status flag (1 = active, 2 = inactive)
  cat?: string | string[]; // Category ID or array of category names
  cat_name?: string; // Category Name
  kw?: string[] | string; // Keywords
  related_news?: NewsroomItem[]; // Related news articles
  d?: string; // Date
  createdAt: string;
  updatedAt?: string;
  author?: string;
}

export interface NewsroomCategory {
  _id: string;
  n: string; // Category Name
  createdAt?: string;
  blogCount?: number;
}

export interface NewsroomPagination {
  docs: NewsroomItem[];
  totalDocs: number;
  limit: number;
  page: number;
  totalPages: number;
  pagingCounter?: number;
  hasPrevPage: boolean;
  hasNextPage: boolean;
  prevPage: number | null;
  nextPage: number | null;
}

export interface NewsroomListResponse {
  message: string;
  result: NewsroomPagination;
  latest_record?: NewsroomItem[] | NewsroomItem;
  ay?: (number | string)[];
}

export interface NewsroomDetailResponse {
  message: string;
  result: NewsroomItem;
}

export interface CategoryListResponse {
  message: string;
  result: NewsroomCategory[];
}
