import type { MaterialSymbolProps } from "@scandic-hotels/design-system/Icons/MaterialIcon/MaterialSymbol"

export function getBedIconName(name: string): MaterialSymbolProps["icon"] {
  const iconMappings = [
    {
      icon: "bed",
      texts: ["Queen"],
    },
    {
      icon: "king_bed",
      texts: ["King"],
    },
    {
      icon: "single_bed",
      texts: ["CustomOccupancy"],
    },
    {
      icon: "bed",
      texts: ["Twin"],
    },
    {
      icon: "single_bed",
      texts: ["Single"],
    },
  ]

  const icon = iconMappings.find((icon) => icon.texts.includes(name))
  return icon ? (icon.icon as MaterialSymbolProps["icon"]) : "single_bed"
}
