/**
 * Product Types
 */

export interface ProductCategory {
  id: number;
  name: string;
  slug: string;
  count?: number;
  term_id?: number;
}

export interface Product {
  id: number;
  name: string;
  slug: string;
  type: string;
  status: string;
  price: string;
  regular_price?: string;
  sale_price?: string;
  on_sale: boolean;
  stock_status: 'instock' | 'outofstock' | 'onbackorder';
  stock_quantity?: number;
  image?: string;
  images?: string[];
  short_description?: string;
  description?: string;
  sku?: string;
  categories?: ProductCategory[];
  tags?: any[];
  attributes?: any[];
  variations?: number[];
  permalink?: string;
  related_ids?: number[];
  virtual?: boolean;
  downloadable?: boolean;
  review_count?: number;
  average_rating?: string;
}

export interface ProductsResponse {
  products: Product[];
  total: number;
  total_pages: number;
  current_page: number;
}

export interface CategoriesResponse {
  categories: ProductCategory[];
}
