import DowntownCamperMarker from "./DowntownCamper"
import DowntownCamperSmallMarker from "./DowntownCamperSmall"
import GrandHotelMarker from "./GrandHotel"
import GrandHotelSmallMarker from "./GrandHotelSmall"
import HaymarketMarker from "./Haymarket"
import HaymarketSmallMarker from "./HaymarketSmall"
import HotelNorgeMarker from "./HotelNorge"
import HotelNorgeSmallMarker from "./HotelNorgeSmall"
import MarskiMarker from "./Marski"
import MarskiSmallMarker from "./MarskiSmall"
import ScandicMarker from "./Scandic"
import ScandicGoMarker from "./ScandicGo"
import ScandicGoSmallMarker from "./ScandicGoSmall"
import ScandicSmallMarker from "./ScandicSmall"

import type { MarkerInfo } from "@/types/components/maps/marker"
import { HotelTypeEnum } from "@/types/enums/hotelType"
import { SignatureHotelEnum } from "@/types/enums/signatureHotel"

interface HotelMarkerByTypeProps
  extends MarkerInfo,
    React.SVGAttributes<HTMLOrSVGElement> {
  size?: "large" | "small"
}

export default function HotelMarkerByType({
  hotelId,
  hotelType,
  size = "large",
  ...props
}: HotelMarkerByTypeProps) {
  if (hotelType === HotelTypeEnum.ScandicGo) {
    return size === "small" ? (
      <ScandicGoSmallMarker {...props} />
    ) : (
      <ScandicGoMarker {...props} />
    )
  }

  switch (hotelId) {
    case SignatureHotelEnum.Haymarket:
      return size === "small" ? (
        <HaymarketSmallMarker {...props} />
      ) : (
        <HaymarketMarker {...props} />
      )
    case SignatureHotelEnum.HotelNorge:
      return size === "small" ? (
        <HotelNorgeSmallMarker {...props} />
      ) : (
        <HotelNorgeMarker {...props} />
      )
    case SignatureHotelEnum.DowntownCamper:
      return size === "small" ? (
        <DowntownCamperSmallMarker {...props} />
      ) : (
        <DowntownCamperMarker {...props} />
      )
    case SignatureHotelEnum.GrandHotelOslo:
      return size === "small" ? (
        <GrandHotelSmallMarker {...props} />
      ) : (
        <GrandHotelMarker {...props} />
      )
    case SignatureHotelEnum.Marski:
      return size === "small" ? (
        <MarskiSmallMarker {...props} />
      ) : (
        <MarskiMarker {...props} />
      )
    default:
      return size === "small" ? (
        <ScandicSmallMarker {...props} />
      ) : (
        <ScandicMarker {...props} />
      )
  }
}
