import { UserEvent, VariantTypeEnum } from 'src/application/models';

export type PDPPageVariantInfo = {
  variantType: VariantTypeEnum.Pdp;
  productId: string;
  collections: string[];
  numberOfReviews: number;
  merchantTags: string[];
  url: string;
};

export type PLPPageVariantInfo = {
  variantType: VariantTypeEnum.Plp;
  plpId: string;
  topCategory: string;
  url: string;
};

export type VisitPageVariantInfo = {
  variantType: VariantTypeEnum.PageVisit;
  url: string;
};

export type HomeVariantInfo = {
  variantType: VariantTypeEnum.Home;
  url: string;
};

export type OtherVariantInfo = {
  variantType: VariantTypeEnum.Other;
  url: string;
};

export type FullPageSalesAgentVariantInfo = {
  variantType: VariantTypeEnum.FullPageSalesAgent;
  url: string;
};

export type PageVariantInfo =
  | PDPPageVariantInfo
  | PLPPageVariantInfo
  | VisitPageVariantInfo
  | HomeVariantInfo
  | OtherVariantInfo
  | FullPageSalesAgentVariantInfo;

export interface PageDetails {
  pageUrl: string | undefined;
  variantInfo: PageVariantInfo | undefined;
  userEvent: UserEvent | undefined;
}
