import { trackEvent } from "./base"

export function trackAccordionClick(option: string) {
  trackEvent({
    event: "accordionClick",
    accordion: {
      action: "accordion open click",
      option,
    },
  })
}

export function trackOpenSidePeekEvent(
  name: string | null,
  hotelId: string,
  pathName?: string,
  roomTypeCode?: string | null
) {
  trackEvent({
    event: "openSidePeek",
    hotelInfo: {
      hotelId: hotelId,
    },
    cta: {
      name,
      ...(roomTypeCode ? { roomTypeCode } : {}),
      ...(pathName ? { pathName } : {}),
    },
  })
}
