export type TDashboardSummary = {
  total_tenders: number;
  active_tenders: number;
  awarded_tenders: number;
  expired_tenders: number;
  cancelled_tenders: number;
  closing_soon: number;
  total_estimated_value: number;
  value_currency: string;
  generated_at: number;
};

export type TDashboardTrendPoint = {
  date: string;
  count: number;
};

export type TDashboardTrend = {
  metric: "created" | "published" | "awarded";
  days: number;
  series: TDashboardTrendPoint[];
};

export type TDashboardStatisticsDaily = {
  scraped_ted: TDashboardTrendPoint[];
  scraped_documents: TDashboardTrendPoint[];
  translated_notices: TDashboardTrendPoint[];
};

export type TDashboardStatisticsTotals = {
  scraped_documents: number;
  translated_tenders: number;
};

export type TDashboardStatistics = {
  days: number;
  generated_at: number;
  daily: TDashboardStatisticsDaily;
  totals: TDashboardStatisticsTotals;
};

export type TDashboardCountryItem = {
  country_code: string;
  count: number;
};

export type TDashboardCountries = {
  total: number;
  items: TDashboardCountryItem[];
  other_count: number;
};

export type TDashboardNoticeTypeItem = {
  type: string;
  count: number;
};

export type TDashboardNoticeTypes = {
  total: number;
  items: TDashboardNoticeTypeItem[];
};

export type TDashboardClosingSoonItem = {
  id: string;
  title: string;
  country_code: string;
  buyer_name?: string;
  submission_deadline: number;
  tender_deadline?: number;
  status: string;
  estimated_value?: number;
  currency?: string;
};

export type TDashboardClosingSoon = {
  items: TDashboardClosingSoonItem[];
};
