export interface ProductPrice {
  order_limit: number;
  retailPrice: number;
  selling_price: number;
  is_specialSale: boolean;
  discount_percent: number;
  specialSale_order_limit: number | null;
  specialSale_quantity: number | null;
  specialSale_endDate: string | null;
}

export interface ProductSize {
  _id: number;
  value: string;
}

export interface ProductColor {
  _id: number;
  value: string;
  hexColor?: string;
}

export interface ProductMeterage {
  _id: number;
  value: string;
}

export interface ProductWarranty {
  _id: number;
  duration: string;
  logoUrl: string;
  name: string;
}

export interface ProductShop {
  _id: string;
  shopName: string;
  shopCode: number;
  owner: string;
  shopDescription: string;
  telephoneNumber: string;
  isChatActive: boolean;
  shopPostalCode: string;
  logo: string;
}

export interface ShipmentMethod {
  _id: number;
  name: string;
  description: string;
  deliveryTime: number;
  deliveryType: string;
}

export interface ProductVariant {
  _id: string;
  market_status: string;
  price: ProductPrice;
  stock: number;
  postingTime: number;
  isFreeShip: boolean;
  isWholeSale: boolean;
  shop: ProductShop;
  shipmentMethod: ShipmentMethod[];
  warranty: ProductWarranty;
  size?: ProductSize;
  color?: ProductColor;
  meterage?: ProductMeterage;
}

export interface ProductBrand {
  _id: string;
  status: string;
  title_en: string;
  title_fa: string;
  images: string[];
  logoUrl: string;
}

export interface ProductCategory {
  _id: string;
  title_fa: string;
  title_en: string;
  icon: string;
  imageUrl: string;
  theme: string;
  description: string;
  leaf: boolean;
  parent: string;
}

export interface ProductSpecification {
  title: string;
  values: string[];
}

export interface ProductImages {
  cover: string;
  list: string[];
}

export interface CategoryPathItem {
  id: string;
  title_fa: string;
  title_en: string;
}

export interface Review {
  _id: string;
  user: {
    name: string;
    avatar?: string;
  };
  rating: number;
  comment: string;
  date: string;
  isVerified: boolean;
  helpful: number;
}

export interface Question {
  _id: string;
  user: {
    name: string;
    avatar?: string;
  };
  question: string;
  answers: Answer[];
  date: string;
  helpful: number;
}

export interface Answer {
  _id: string;
  user: {
    name: string;
    avatar?: string;
  };
  answer: string;
  date: string;
  helpful: number;
}

export interface Product {
  _id: number;
  url: string;
  title_fa: string;
  title_en: string;
  seoTitle: string | null;
  seoDescription: string | null;
  source: string;
  description: string;
  metaDescription: string;
  tags: string[];
  advantages: string[];
  disAdvantages: string[];
  imagesUrl: ProductImages;
  isFake: string;
  voice: string | null;
  specifications: ProductSpecification[];
  brand: ProductBrand;
  category: ProductCategory;
  default_variant: ProductVariant;
  variants: ProductVariant[];
}

export interface ProductDetailResponse {
  status: number;
  success: boolean;
  results: {
    product: Product;
    categoryPath: CategoryPathItem[];
    reviews?: Review[];
    questions?: Question[];
  };
}
