export interface Product {
  id: number;
  category_id: number;
  brand_id: number | null;
  slug: string;
  nombre: string;
  descripcion: string;
  precio: string;
  category: string;
  brand: string | null;
  images: string[];
}

export interface ProductAttributeOption {
  id: number;
  value: string;
  label: string;
  sort_order: number;
  metadata: Record<string, unknown> | null;
}

export interface ProductAttribute {
  id: number;
  codigo: string;
  nombre: string;
  is_required: boolean;
  metadata_schema: Record<string, unknown> | null;
  type: string;
  options: ProductAttributeOption[];
}

export interface ProductVariant {
  id: number;
  cantidad_maxima: number;
  definitions: Record<string, string>;
  images: string[];
}

export interface ProductVariantMap {
  variant_id: number;
  cantidad_maxima: number;
  attributes: Record<string, string>;
}

export interface ProductDetail extends Product {
  attributes: ProductAttribute[];
  variants_map: ProductVariantMap[];
  variant: ProductVariant | null;
}

