import { LocalizedTextContent } from './static-page.model';

export interface FooterPaymentIconConfig {
  src: string;
  alt: string;
  width?: number;
  height?: number;
}

export interface FooterSocialLinkConfig {
  id: string;
  label: string;
  url: string;
  icon?: string;
}

export interface FooterLinkConfig {
  id: string;
  label: string;
  /** Key of an existing static page (features/content-management ContentPage.id) - preferred over a raw URL so the link stays correct if the page's route ever changes. */
  pageKey?: string;
  /** Used only when pageKey is empty - an external or custom URL. */
  url?: string;
}

export interface FooterColumnConfig {
  id: string;
  title: string;
  links: FooterLinkConfig[];
}

export interface FooterConfig {
  logoUrl?: string;
  paymentIcons?: FooterPaymentIconConfig[];
  copyrightText?: string | LocalizedTextContent;
  /** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
  legalPageKeys?: string[];
  /** @deprecated superseded by `columns` - kept so already-saved configs still resolve until re-saved through the Footer Builder. */
  staticPageKeys?: string[];
  columns?: FooterColumnConfig[];
  socialLinks?: FooterSocialLinkConfig[];
}