"use client" import { DialogTrigger } from "react-aria-components" import { Button } from "@scandic-hotels/design-system/Button" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import SidePeekSelfControlled from "@scandic-hotels/design-system/SidePeekSelfControlled" import { trackOpenSidePeekEvent } from "@/utils/tracking" import { HotelSidePeekContent } from "./HotelSidePeekContent" import type { AdditionalData, Hotel, Restaurant, } from "@scandic-hotels/trpc/types/hotel" import { SidePeekEnum } from "@/types/sidepeek" interface HotelDetailsSidePeekProps { hotel: Hotel & { url: string | null } restaurants: Restaurant[] additionalHotelData: AdditionalData | undefined triggerLabel: string buttonVariant: "primary" | "secondary" wrapping?: boolean } const buttonPropsMap: Record< HotelDetailsSidePeekProps["buttonVariant"], Pick< React.ComponentProps, "variant" | "color" | "size" | "typography" > > = { primary: { variant: "Text", color: "Primary", size: "Medium", typography: "Body/Paragraph/mdBold", }, secondary: { variant: "Secondary", color: "Inverted", size: "Small", typography: "Body/Supporting text (caption)/smBold", }, } export default function HotelDetailsSidePeek({ hotel, restaurants, additionalHotelData, triggerLabel, wrapping = true, buttonVariant, }: HotelDetailsSidePeekProps) { const buttonProps = buttonPropsMap[buttonVariant] return ( ) }