import { ShowFloatingButtonOptions } from 'src/contexts/types';
import { PageVisitInfo } from './pageVisitInfo';
import { PLPInfo } from './plpInfo';
import { ProductInfo } from './productInfo';

export enum VariantTypeEnum {
  Pdp = 'pdp',
  Plp = 'plp',
  PageVisit = 'page_visit',
  Home = 'homepage',
  Search = 'search',
  Other = 'other',
  FullPageSalesAgent = 'full_page',
}

export type VariantType = 'pdp' | 'plp' | 'page_visit';

export type VariantInfo = PDPVariantInfo | PLPVariantInfo | PageVisitVariantInfo;

export type PDPVariantInfo = {
  floatingButtonOverride?: ShowFloatingButtonOptions;
  variantId: string;
  variant: VariantTypeEnum.Pdp;
} & ProductInfo;

export type PLPVariantInfo = {
  floatingButtonOverride?: ShowFloatingButtonOptions;
  variantId: string;
  variant: VariantTypeEnum.Plp;
  url?: string;
} & PLPInfo;

export type PageVisitVariantInfo = {
  floatingButtonOverride?: ShowFloatingButtonOptions;
  variantId: string;
  variant: VariantTypeEnum.PageVisit;
} & PageVisitInfo;
