// Product attribute tags (matching backend ProductAttribute domain enum)
export const PRODUCT_ATTRIBUTES = [
  'bio',
  'comercio-justo',
  'congelado',
  'cruelty-free',
  'de-temporada',
  'demeter',
  'fruta-verdura',
  'keto',
  'kosher',
  'low-carb',
  'raw-food',
  'sin-azucar',
  'sin-gluten',
  'sin-lactosa',
  'vegano',
  'zero-waste',
] as const;

export type ProductAttribute = (typeof PRODUCT_ATTRIBUTES)[number];

export interface Product {
  id: string;
  name: string;
  slug: string;
  url: string;
  description?: string;
  state: string;
  attributes?: ProductAttribute[];
  seoTitle?: string;
  seoDescription?: string;
  images: Array<{ id: string; url: string; altText?: string }>;
  brandId?: string;
  categoryIds?: string[];
  priceCents?: number; // populated via separate pricing lookup
  brand?: { id: string; name: string; slug: string };
  imageUrl?: string;
  unitWeightKg?: number;
  minPurchaseQty?: number;
  aiAssisted?: boolean;
}

export interface Category {
  id: string;
  parentId: string | null;
  name: string;
  slug: string;
  url: string;
  seoTitle?: string;
  seoDescription?: string;
  imageUrl?: string;
  description?: string;
  isParent?: boolean;
  emoji?: string;
  color?: string;
  bgColor?: string;
  textColor?: string;
  children?: Category[];
}

export interface Brand {
  id: string;
  name: string;
  slug: string;
  logoUrl?: string;
  seoTitle?: string;
  seoDescription?: string;
}
