export interface SubMenuItem {
  label: string;
  href: string;
  badge?: string;
  description?: string;
  isHot?: boolean;
  isNew?: boolean;
  /**
   * A subject-group item (e.g. "Management", "Academic Writing Service")
   * is itself a real linkable page *and* has its own task-page children
   * (e.g. "Change Management Assignment", "Conflict Management Assignment
   * Help") — the live site's mega menu opens a third flyout column for
   * these on hover rather than flattening them into the subject list.
   */
  children?: SubMenuItem[];
}

export interface MegaMenuCategory {
  categoryTitle: string;
  categoryHref?: string;
  items: SubMenuItem[];
}

export interface MenuItem {
  id: string;
  label: string;
  href: string;
  hasSubmenu?: boolean;
  isMegaMenu?: boolean;
  categories?: MegaMenuCategory[];
  subItems?: SubMenuItem[];
}

export interface TopBarData {
  whatsappNumber: string;
  whatsappUrl: string;
  phone: string;
  email: string;
  announcement: {
    /** Badge text, e.g. "OFFER!" */
    discountBadge: string;
    /** The highlighted, linked portion, e.g. "Save 56%" */
    ctaText: string;
    ctaHref: string;
    /** Trailing plain text after the link, e.g. "on Assignment Crafted by Human Writers" */
    text: string;
  };
}

export interface HeaderData {
  topBar: TopBarData;
  mainNav: MenuItem[];
  popularSearches: Array<{ label: string; href: string }>;
  cta: {
    orderNowUrl: string;
    loginUrl: string;
    cartCount: number;
    cartUrl: string;
    earnOnlineUrl: string;
  };
}

export interface FooterColumnItem {
  label: string;
  href: string;
  isNew?: boolean;
}

export interface FooterColumn {
  id: string;
  title: string;
  links: FooterColumnItem[];
}

/** One country in the footer's "Country" column, with its real per-city links. */
export interface FooterCountryItem {
  label: string;
  href: string;
  cities: FooterColumnItem[];
}

export interface SocialLinkItem {
  platform: string;
  url: string;
  iconName: string;
}

export interface FooterData {
  columns: {
    topSearches: FooterColumn;
    /** "Get to know us" on the live site. */
    company: FooterColumn;
    /** "Country" on the live site — each entry expands to its real cities. */
    countries: { id: string; title: string; items: FooterCountryItem[] };
  };
  legalLinks: FooterColumnItem[];
  contactInfo: {
    phone: string;
    whatsapp: string;
    whatsappUrl: string;
    email: string;
    appStoreUrl: string;
    playStoreUrl: string;
  };
  socialLinks: SocialLinkItem[];
  dmcaUrl: string;
  paymentBadgeAlt: string;
  disclaimerText: string;
  copyrightText: string;
  ratingInfo: {
    rating: string;
    reviewsCount: string;
    reviewsUrl: string;
  };
}

export interface NavigationResponse {
  header: HeaderData;
  footer: FooterData;
}
