export type ProductStatus = 'ativo' | 'inativo';

export interface ProductVariation {
  id: string;
  sku: string;
  /** e.g. { Cor: 'Azul', Tamanho: 'P' } */
  options: Record<string, string>;
  price?: number;          // overrides product price when set
  promoPrice?: number;
  stock: number;
  imageUrl?: string;
  active: boolean;
}

export interface ProductDimensions {
  weight?: number;   // kg
  height?: number;   // cm
  width?: number;    // cm
  length?: number;   // cm
}

export interface Product {
  id: string;
  storeId: string;
  name: string;
  slug: string;
  shortDescription: string;
  description: string;
  sku: string;
  barcode?: string;
  categoryId: string;
  brand?: string;
  images: string[];
  price: number;
  promoPrice?: number;
  cost?: number;
  status: ProductStatus;
  featured: boolean;
  trackStock: boolean;
  stock: number;
  minStock: number;
  dimensions?: ProductDimensions;
  tags: string[];
  seoTitle?: string;
  seoDescription?: string;
  variations: ProductVariation[];
  createdAt: string;
  updatedAt: string;
}
