import { ApiResponse } from './api-response.interface';

export interface BankAccount {
  id: number;
  tenant_code: string;
  titular: string;
  entidad: string;
  alias: string;
  cvu: string;
}

export interface HeroConfig {
  background_image?: string | null;
  title_html?: string | null;
  description_html?: string | null;
  button_text?: string | null;
  button_href?: string | null;
}

export interface EventConfig {
  title?: string | null;
  location?: string | null;
  dates?: string[] | null;
}

export interface Menu {
  id: number;
  code: string;
  label: string;
  parent_menu_code: string | null;
  content_type: 'static' | 'dynamic';
  route: string;
  static_content?: unknown;
  submenues: Menu[];
}

export interface SocialMedia {
  code: string;
  icon: string;
  name: string;
  url: string;
}

export interface Category {
  id: number;
  nombre: string;
  subcategories: Category[];
}

export interface Tenant {
  id: number;
  codigo: string;
  nombre: string;
  dominio: string;
  primary_color: string;
  secondary_color: string;
  danger_color: string;
  success_color: string;
  header_bg_color: string;
  footer_bg_color: string;
  header_logo: string;
  footer_logo: string;
  selected_bank_account_id?: number | null;
  selected_bank_account?: BankAccount | null;
  hero_config?: HeroConfig | null;
  event_config?: EventConfig | null;
  search_product_layout?: 'row' | 'column_with_image' | 'column_with_cart';
  search_group_layout?: 'paginated' | 'simple' | 'simple_vertical' | 'carousel';
  search_items_per_page?: number;
  main_carousel_images?: string[];
  social_media?: SocialMedia[];
  menues?: Menu[];
  categories: Category[];
}

export type TenantBootstrapResponse = ApiResponse<Tenant>;
