export type AddCommentProps = {
  title: string;
  advantage: string[];
  disAdvantage: string[];
  content: string;
  rate: number;
  productId?: string;
};

export type AddQuestionProps = {
  content: string;
  productId?: string;
};

export type SubmitReportProps = {
  productId: string;
  questionIds: string[];
  description?: string;
};

export type ProductStoreType = {
  variantId: string;
  setVariantId: (value: string) => void;
};

export type PriceHistoryItem = {
  shop: string;
  selling_price: number;
  retail_price: number;
  date: string;
};

export type PriceHistory = {
  _id: number;
  product: number;
  title: string;
  history: PriceHistoryItem[];
};

export type PriceHistoryResults = {
  priceHistory: PriceHistory[];
};

export type PriceHistoryResponse = {
  status: number;
  success: boolean;
  results: PriceHistoryResults;
};

export type QuestionAnswer = {
  content: string;
};

export type QuestionUser = {
  fullName: string;
};

export type QuestionProductBrand = {
  _id: string;
  status: string;
  title_en: string;
  title_fa: string;
  images: string[];
  logoUrl: string;
};

export type QuestionProductCategory = {
  _id: string;
  title_fa: string;
  title_en: string;
  icon: string;
  imageUrl: string;
  theme: string;
  description: string;
  leaf: boolean;
  parent: string | null;
};

export type QuestionProductImages = {
  cover: string;
  list: string[];
};

export type QuestionProduct = {
  _id: number;
  url: string;
  title_fa: string;
  title_en: string;
  seoTitle: string;
  seoDescription: string | null;
  source: string;
  description: string;
  metaDescription: string;
  tags: string[];
  advantages: string[];
  disAdvantages: string[];
  imagesUrl: QuestionProductImages;
  isFake: string;
  voice: string | null;
  specifications: unknown[];
  brand: QuestionProductBrand;
  category: QuestionProductCategory;
};

export type ProductQuestion = {
  _id: string;
  content: string;
  status: string;
  product: QuestionProduct;
  user: QuestionUser;
  answers: QuestionAnswer[];
  createdAt: string;
};

export type ProductQuestionsResults = {
  questions: ProductQuestion[];
};

export type ProductQuestionsResponse = {
  status: number;
  success: boolean;
  results: ProductQuestionsResults;
};

export type SaveReportTypes = {
  answers: { questionId: number }[];
  description: string;
  productId: string;
};

export type AddQuestionResults = {
  message: string;
  content: string;
};

export type AddQuestionResponse = {
  status: number;
  success: boolean;
  results: AddQuestionResults;
};
