import { BedDoubleIcon, BedSingleIcon, KingBedSmallIcon, } from "@/components/Icons" import type { FC } from "react" import type { IconProps } from "@/types/components/icon" export function getBedIcon(name: string): FC | null { const iconMappings = [ { icon: BedDoubleIcon, texts: ["Queen"], }, { icon: KingBedSmallIcon, texts: ["King"], }, { icon: KingBedSmallIcon, texts: ["CustomOccupancy"], }, { icon: BedSingleIcon, texts: ["Twin"], }, { icon: BedSingleIcon, texts: ["Single"], }, ] const icon = iconMappings.find((icon) => icon.texts.includes(name)) return icon ? icon.icon : BedSingleIcon }