"use client"
import SidePeekProvider from "@/components/SidePeeks/SidePeekProvider"
import { trackOpenSidePeekEvent } from "@/utils/tracking"

interface SidePeeksProps extends React.PropsWithChildren {
  hotelId: string
}

export default function SidePeeks({ hotelId, children }: SidePeeksProps) {
  function handleOpen(sidePeek: string) {
    trackOpenSidePeekEvent(sidePeek, hotelId)
  }

  return <SidePeekProvider onOpen={handleOpen}>{children}</SidePeekProvider>
}
