export interface SearchProduct {
  pid: number;
  title: string;
  description: string;
  sku: string;
  barcode: string;
  harmonized_tariff_code: string;
  price: number;
  regular_price: number;
  cost_price: number;
  vendor: string;
  vendor_reference: string;
  notions_reference: string;
  brand: string;
  brand_id: string;
  line: string;
  line_id: string;
  subline: string;
  subline_id: string;
  artist: string;
  artist_id: string;
  moq: number;
  weight: number;
  length: number;
  width: number;
  height: number;
  country_of_origin: string;
  total_sold: number;
  first_received: string | null;
  date_last_sold: string | null;
  supplier?: string;
  case_qty?: number;
  tax_code?: string;
  size_cat?: string;
  shipping_restrictions?: string;
  is_new?: number;
  is_preorder?: number;
}

export interface FieldOption {
  label: string;
  value: string;
}

export interface FieldOptions {
  companies: FieldOption[];
  artists: FieldOption[];
  sizes: FieldOption[];
  themes: FieldOption[];
  categories: FieldOption[];
  colors: FieldOption[];
  suppliers: FieldOption[];
  taxCategories: FieldOption[];
  shippingRestrictions: FieldOption[];
}

export interface LineOption {
  label: string;
  value: string;
}

export interface LandingExtra {
  extra_id: number;
  name: string;
  image: string;
  extra_cat_id: number;
  path: string;
  top_text: string;
}

export interface ProductImage {
  iid: number | string; // number for existing, string like "new-0" for added
  order: number;
  hidden: boolean;
  sizes: Record<string, { width: number; height: number; url: string }>;
  imageUrl?: string; // for newly added images (the uploaded URL)
  isNew?: boolean;
}

export interface ProductFormValues {
  name: string;
  company: string;
  line: string;
  subline: string;
  supplier: string;
  upc: string;
  item_number: string;
  supplier_no: string;
  notions_no: string;
  msrp: string;
  current_price: string;
  cost_each: string;
  qty_per_unit: string;
  case_qty: string;
  tax_cat: string;
  artist: string;
  weight: string;
  length: string;
  width: string;
  height: string;
  ship_restrictions: string;
  coo: string;
  hts_code: string;
  size_cat: string;
  description: string;
  priv_notes: string;
  categories: string[];
  themes: string[];
  colors: string[];
}
