export interface IShop {
  _id: string;
  shopName: string;
  shopDescription: string;
  logo: string;
}

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

export interface IDefaultVariant {
  _id: string;
  market_status: string;
  price: IPrice;
  stock: number;
  isFreeShip: boolean;
  isWholeSale: boolean;
}

export interface IShipmentMethod {
  _id: number;
  name: string;
  description: string;
  deliveryTime: number;
  deliveryType: "Standard" | "SameDay" | "Express";
}

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

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

export interface IVariant {
  _id: string;
  market_status: "Marketable" | "Unmarketable" | "OutOfStock";
  price: IPrice;
  stock: number;
  postingTime: number;
  isFreeShip: boolean;
  isWholeSale: boolean;
  shop: IShop;
  shipmentMethod: IShipmentMethod[];
  warranty: IWarranty;
  meterage?: IMeterage;
  size?: IMeterage;
  color?: IMeterage;
}

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

export interface IProduct {
  _id: number;
  title_fa: string;
  title_en: string;
  seoTitle: string | null;
  seoDescription: string | null;
  model: string;
  description: string;
  tags: string[];
  shop: IShop;
  status: string;
  imagesUrl: IImagesUrl;
  url: string;
  default_variant: IDefaultVariant;
  variants: IVariant[];
  isWishlist: boolean;
}

export interface ICategory {
  _id: string;
  title_fa: string;
  title_en: string;
  icon: string;
  imageUrl: string;
  description: string;
  url: string;
}

export interface ISlider {
  _id: string;
  displayLocation: "desktop" | "mobile";
  imageUrl: string;
  altText: string;
  title: string;
  linkUrl: string;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
  order: number;
}

export interface ISliders {
  desktop: ISlider[];
  mobile: ISlider[];
}

export interface IBanner {
  _id: string;
  imageUrl: string;
  altText: string;
  title: string;
  linkUrl: string;
  isActive: boolean;
  order: number;
  createdAt: string;
  updatedAt: string;
}

export interface ILandingResults {
  popularProducts: IProduct[];
  incredibleOffers: IProduct[];
  latestProducts: IProduct[];
  topCategory: ICategory[];
  sliders: ISliders;
  banners: IBanner[];
}

export interface ILandingResponse {
  status: number;
  success: boolean;
  results: ILandingResults;
}
