/**
 * Banner data for home page hero section
 */
export interface BannerData {
  ctaLink: string;
  ctaText: string;
  heading: string;
  mobileImage: string | null;
  desktopImage: string;
  welcome_text: string;
  territory_name: string;
}

/**
 * Menu item structure from backend API
 */
export interface MenuItem {
  name: string;
  url: string;
  access: boolean;
  status: boolean;
  is_globle: boolean;
  order_no: number;
  group_ids: string[];
}

/**
 * General settings with language information
 */
export interface GeneralSettings {
  language_code: string;
  language_name: string;
  language_flag: string;
  available_templates?: string[];
}

/**
 * Header configuration with logo and navigation menu
 */
export interface HeaderData {
  logo: string | null;
  menu: MenuItem[];
  available_templates?: string[];
}
export interface WhatsAppData {
  country_code: string;
  phone_number: string;
  welcome_message: string | null;
}

/**
 * Per-licensee social profiles, set in the admin under
 * Settings → Footer → Social Links Configuration. Every field is optional —
 * a network is only rendered when its URL has actually been filled in.
 */
export interface SocialLinksConfiguration {
  facebook?: string;
  instagram?: string;
  twitter?: string;
  linkedin?: string;
  youtube?: string;
  tiktok?: string;
  enable_sharing?: boolean;
}

/**
 * Footer configuration
 */
export interface FooterData {
  social_links_configuration?: SocialLinksConfiguration;
  [key: string]: any;
}

/**
 * Tenant information for multi-tenant setup
 */
export interface TenantData {
  isPreview: boolean;
  franchiseeId: string;
  status: "published" | "draft" | "unpublished";
  zoho_franchise_id: string;
  latitude: string;
  longitude: string;
  isDev: boolean;
  /** True when the request resolved to the shared/corporate record, not a licensee. */
  isGlobal?: boolean;
}

/**
 * Main API response structure for header-footer/home endpoint
 */
export interface HeaderFooterHomeResponse {
  status: boolean;
  message: string;
  data: {
    header: HeaderData;
    banner: BannerData;
    footer: FooterData;
    tenant: TenantData;
    whatsapp?: WhatsAppData | null;
    general_settings?: GeneralSettings;
  };
}

/**
 * Processed header/footer/banner data for component consumption
 */
export interface ProcessedHeaderFooterHomeData {
  header: HeaderData;
  banner: BannerData;
  footer: FooterData;
  tenant: TenantData;
  whatsapp: WhatsAppData | null;
  general_settings?: GeneralSettings;
}