import { Category } from '../../core/categories/models/category-domain.model';
import { Product } from '../../core/products/models/product-domain.model';
import { SectionConfig } from '../../shared/models/config';

export interface WidgetResolvedContext {
  section: SectionConfig;
  settings: Record<string, unknown>;
}

export interface HeroSlideData {
  title: string;
  subtitle?: string;
  ctaLabel?: string;
}

export interface HeroWidgetData extends WidgetResolvedContext {
  title: string;
  subtitle?: string;
  ctaLabel?: string;
  /** Extra slides beyond the primary title/subtitle/ctaLabel above, for a real multi-slide hero. Empty when the admin has not added any. */
  slides?: HeroSlideData[];
  autoplay?: boolean;
}

export interface CategoriesWidgetData extends WidgetResolvedContext {
  title: string;
  categories: Category[];
  emptyMessage?: string;
}

export interface ProductCollectionWidgetData extends WidgetResolvedContext {
  title: string;
  products: Product[];
  actionLabel?: string;
  emptyMessage?: string;
}

export interface BannerWidgetData extends WidgetResolvedContext {
  title?: string;
  subtitle?: string;
  imageUrl?: string;
  ctaLabel?: string;
  ctaHref?: string;
}

export interface HtmlWidgetData extends WidgetResolvedContext {
  html: string;
}

export interface PartnersWidgetData extends WidgetResolvedContext {
  title?: string;
  logos: Array<{ id: string; label: string; imageUrl: string; href?: string }>;
}

export interface FooterWidgetData extends WidgetResolvedContext {
  links: Array<{ id: string; label: string; href: string }>;
}