241 lines
8.9 KiB
TypeScript
241 lines
8.9 KiB
TypeScript
import {
|
|
AcIcon,
|
|
AirplaneIcon,
|
|
BalconyIcon,
|
|
BathtubIcon,
|
|
BedDoubleIcon,
|
|
BedHotelIcon,
|
|
BedroomParentIcon,
|
|
BedSingleIcon,
|
|
BikeIcon,
|
|
BreakfastIcon,
|
|
BusinessIcon,
|
|
CableIcon,
|
|
ChairIcon,
|
|
CityIcon,
|
|
CoffeeAltIcon,
|
|
CoffeeIcon,
|
|
CoffeeMakerIcon,
|
|
ConciergeIcon,
|
|
CoolIcon,
|
|
DeskIcon,
|
|
DiningIcon,
|
|
ElectricBikeIcon,
|
|
FamilyIcon,
|
|
FitnessIcon,
|
|
FootstoolIcon,
|
|
HairdryerIcon,
|
|
HandSoapIcon,
|
|
HealthBeautyIcon,
|
|
HeartIcon,
|
|
IronIcon,
|
|
KayakingIcon,
|
|
KettleIcon,
|
|
LaptopIcon,
|
|
LaundryMachineIcon,
|
|
LocalBarIcon,
|
|
LuggageIcon,
|
|
MicrowaveIcon,
|
|
MirrorIcon,
|
|
NatureIcon,
|
|
NightlifeIcon,
|
|
NoSmokingIcon,
|
|
OutdoorFurnitureIcon,
|
|
ParkingIcon,
|
|
PetsIcon,
|
|
PhoneIcon,
|
|
RestaurantIcon,
|
|
RoomServiceIcon,
|
|
SafetyBoxIcon,
|
|
SaunaIcon,
|
|
ShowerIcon,
|
|
SpeakerIcon,
|
|
StoreIcon,
|
|
StreetIcon,
|
|
SwimIcon,
|
|
TshirtWashIcon,
|
|
TvCastingIcon,
|
|
WifiIcon,
|
|
WindowCurtainsAltIcon,
|
|
WindowNotAvailableIcon,
|
|
WineBarIcon,
|
|
WoodFloorIcon,
|
|
YardIcon,
|
|
} from "@/components/Icons"
|
|
|
|
import type { FC } from "react"
|
|
|
|
import type { IconProps } from "@/types/components/icon"
|
|
|
|
export function getFacilityIcon(
|
|
name: string | undefined
|
|
): FC<IconProps> | null {
|
|
if (!name) {
|
|
return HeartIcon
|
|
}
|
|
|
|
const normalizedName = name.toLowerCase()
|
|
|
|
const iconMappings = [
|
|
{ icon: AcIcon, name: "aircondition" },
|
|
{ icon: AirplaneIcon, name: "airport" },
|
|
{ icon: BalconyIcon, name: "balcony" },
|
|
{ icon: BalconyIcon, name: "balconyorterrace" },
|
|
{ icon: BalconyIcon, name: "frenchbalcony" },
|
|
{ icon: BathtubIcon, name: "bathroomwithbathtub" },
|
|
{ icon: BathtubIcon, name: "bathroomwithshowerandbathtub" },
|
|
{ icon: BathtubIcon, name: "bathroomwithshowerorbathtub" },
|
|
{ icon: BedDoubleIcon, name: "adjustablebeds" },
|
|
{ icon: BedDoubleIcon, name: "setoftwopillows" },
|
|
{ icon: BedHotelIcon, name: "armchairbed" },
|
|
{ icon: BedHotelIcon, name: "pulloutbed" },
|
|
{ icon: BedroomParentIcon, name: "separatebedroom" },
|
|
{ icon: BedSingleIcon, name: "extrabed" },
|
|
{ icon: BikeIcon, name: "bikeforloan" },
|
|
{ icon: BreakfastIcon, name: "breakfast" },
|
|
{ icon: BreakfastIcon, name: "servesbreakfastalwaysincluded" },
|
|
{ icon: BusinessIcon, name: "meetingconferencefacilities" },
|
|
{ icon: BusinessIcon, name: "meetingrooms" },
|
|
{ icon: CableIcon, name: "internetwithcableintheroom" },
|
|
{ icon: ChairIcon, name: "armchair" },
|
|
{ icon: ChairIcon, name: "connectingrooms" },
|
|
{ icon: CityIcon, name: "viewcityview" },
|
|
{ icon: CoffeeAltIcon, name: "nespressomachine" },
|
|
{ icon: CoffeeIcon, name: "café" },
|
|
{ icon: CoffeeIcon, name: "coffee" },
|
|
{ icon: CoffeeMakerIcon, name: "coffeemachine" },
|
|
{ icon: ConciergeIcon, name: "lifestyleconcierge" },
|
|
{ icon: CoolIcon, name: "aircooling" },
|
|
{ icon: CoolIcon, name: "cooler" },
|
|
{ icon: CoolIcon, name: "coolingcabinet" },
|
|
{ icon: DeskIcon, name: "deskandchair" },
|
|
{ icon: DiningIcon, name: "diningarea" },
|
|
{ icon: DiningIcon, name: "tablefordining" },
|
|
{ icon: ElectricBikeIcon, name: "ebikeschargingstation" },
|
|
{ icon: FamilyIcon, name: "extrafamilyfriendly" },
|
|
{ icon: FitnessIcon, name: "gym" },
|
|
{ icon: FootstoolIcon, name: "footstool" },
|
|
{ icon: HairdryerIcon, name: "hairdryer" },
|
|
{ icon: HandSoapIcon, name: "toiletries" },
|
|
{ icon: HealthBeautyIcon, name: "beautysalon" },
|
|
{ icon: HeartIcon, name: "bathrobes" },
|
|
{ icon: HeartIcon, name: "bathroom2separatebathrooms" },
|
|
{ icon: HeartIcon, name: "bodycareproducts" },
|
|
{ icon: HeartIcon, name: "bodylotion" },
|
|
{ icon: HeartIcon, name: "bowling" },
|
|
{ icon: HeartIcon, name: "bunkbed" },
|
|
{ icon: HeartIcon, name: "bunkbed80x188cm" },
|
|
{ icon: HeartIcon, name: "carpetingwalltowallcarpet" },
|
|
{ icon: HeartIcon, name: "cashfree800pmtill0600am" },
|
|
{ icon: HeartIcon, name: "cashfreehotel" },
|
|
{ icon: HeartIcon, name: "coffeevoucher" },
|
|
{ icon: HeartIcon, name: "complimentarycoldrefreshments" },
|
|
{ icon: HeartIcon, name: "conditioner" },
|
|
{ icon: HeartIcon, name: "conventioncentre" },
|
|
{ icon: HeartIcon, name: "disabledparking" },
|
|
{ icon: HeartIcon, name: "dockingstationforipodipad" },
|
|
{ icon: HeartIcon, name: "dryingcabinet" },
|
|
{ icon: HeartIcon, name: "easyaccess" },
|
|
{ icon: HeartIcon, name: "garmentsteamer" },
|
|
{ icon: HeartIcon, name: "highfloor" },
|
|
{ icon: HeartIcon, name: "icemachine" },
|
|
{ icon: HeartIcon, name: "icemachinereception" },
|
|
{ icon: HeartIcon, name: "jaccuzzi" },
|
|
{ icon: HeartIcon, name: "jacuzzi" },
|
|
{ icon: HeartIcon, name: "kitchen" },
|
|
{ icon: HeartIcon, name: "kitchenette" },
|
|
{ icon: HeartIcon, name: "latecheckoutuntil1400guaranteed" },
|
|
{ icon: HeartIcon, name: "livemusicexhibitions" },
|
|
{ icon: HeartIcon, name: "massage" },
|
|
{ icon: HeartIcon, name: "meetingarea" },
|
|
{ icon: HeartIcon, name: "minibarincludedinroomrate" },
|
|
{ icon: HeartIcon, name: "overnightsecurity" },
|
|
{ icon: HeartIcon, name: "parkingadditionalcost" },
|
|
{ icon: HeartIcon, name: "privatesauna" },
|
|
{ icon: HeartIcon, name: "refrigerator" },
|
|
{ icon: HeartIcon, name: "seatingarea" },
|
|
{ icon: HeartIcon, name: "security24hoours" },
|
|
{ icon: HeartIcon, name: "separatelivingroom" },
|
|
{ icon: HeartIcon, name: "separatetoilet" },
|
|
{ icon: HeartIcon, name: "servicesecurity24h" },
|
|
{ icon: HeartIcon, name: "shampoo" },
|
|
{ icon: HeartIcon, name: "slippers" },
|
|
{ icon: HeartIcon, name: "sofabed" },
|
|
{ icon: HeartIcon, name: "sofas" },
|
|
{ icon: HeartIcon, name: "sofawithtable" },
|
|
{ icon: HeartIcon, name: "spaciousroom" },
|
|
{ icon: HeartIcon, name: "stillandsparklingwater" },
|
|
{ icon: HeartIcon, name: "table" },
|
|
{ icon: HeartIcon, name: "tassimocoffeemaker" },
|
|
{ icon: HeartIcon, name: "terrace" },
|
|
{ icon: HeartIcon, name: "trouserpress" },
|
|
{ icon: HeartIcon, name: "tv" },
|
|
{ icon: HeartIcon, name: "tvwithcomplimentarymoviechannels" },
|
|
{ icon: HeartIcon, name: "tvwithmoviechannels" },
|
|
{ icon: HeartIcon, name: "tvwithstreamingoption" },
|
|
{ icon: HeartIcon, name: "ventilationinroom" },
|
|
{ icon: HeartIcon, name: "view" },
|
|
{ icon: HeartIcon, name: "viewfjordview" },
|
|
{ icon: HeartIcon, name: "viewlakeview" },
|
|
{ icon: HeartIcon, name: "viewpanoramicview" },
|
|
{ icon: HeartIcon, name: "viewseaview" },
|
|
{ icon: HeartIcon, name: "wallbed" },
|
|
{ icon: HeartIcon, name: "wallmountedcyclerack" },
|
|
{ icon: HeartIcon, name: "wardrobe" },
|
|
{ icon: HeartIcon, name: "wellnessandsaunaentrancefeeadmission16years" },
|
|
{ icon: HeartIcon, name: "wellnesspoolsaunaentrancefeeadmission16years" },
|
|
{ icon: HeartIcon, name: "windownook" },
|
|
{ icon: IronIcon, name: "ironandironingboard" },
|
|
{ icon: IronIcon, name: "ironingroom" },
|
|
{ icon: KayakingIcon, name: "kayaksforloan" },
|
|
{ icon: KettleIcon, name: "kettle" },
|
|
{ icon: KettleIcon, name: "kettlewithcoffeetea" },
|
|
{ icon: LaptopIcon, name: "laptopsafe" },
|
|
{ icon: LaptopIcon, name: "laptoptray" },
|
|
{ icon: LaundryMachineIcon, name: "laundryservice" },
|
|
{ icon: LocalBarIcon, name: "bar" },
|
|
{ icon: LocalBarIcon, name: "rooftopbar" },
|
|
{ icon: LocalBarIcon, name: "skybar" },
|
|
{ icon: LuggageIcon, name: "luggagelockers" },
|
|
{ icon: MicrowaveIcon, name: "microwave" },
|
|
{ icon: MirrorIcon, name: "cosmeticmirror" },
|
|
{ icon: NatureIcon, name: "viewparkview" },
|
|
{ icon: NightlifeIcon, name: "disconightclub" },
|
|
{ icon: NoSmokingIcon, name: "nonsmoking" },
|
|
{ icon: OutdoorFurnitureIcon, name: "outdoorterrace" },
|
|
{ icon: ParkingIcon, name: "parking" },
|
|
{ icon: ParkingIcon, name: "parkingfreeparking" },
|
|
{ icon: PetsIcon, name: "petfriendlyrooms" },
|
|
{ icon: PhoneIcon, name: "directdialphoneandvoicemail" },
|
|
{ icon: RestaurantIcon, name: "restaurant" },
|
|
{ icon: RoomServiceIcon, name: "roomservice" },
|
|
{ icon: SafetyBoxIcon, name: "safetybox" },
|
|
{ icon: SaunaIcon, name: "sauna" },
|
|
{ icon: ShowerIcon, name: "bathroomwithshower" },
|
|
{ icon: ShowerIcon, name: "rainshower" },
|
|
{ icon: ShowerIcon, name: "sharedbathroomwithshower" },
|
|
{ icon: ShowerIcon, name: "showergel" },
|
|
{ icon: ShowerIcon, name: "showerproductsscentbygrandcentral" },
|
|
{ icon: SpeakerIcon, name: "modernvinylplayer" },
|
|
{ icon: SpeakerIcon, name: "musicplayer" },
|
|
{ icon: StoreIcon, name: "hairdresser" },
|
|
{ icon: StoreIcon, name: "shop" },
|
|
{ icon: StreetIcon, name: "viewstreetview" },
|
|
{ icon: SwimIcon, name: "pool" },
|
|
{ icon: TshirtWashIcon, name: "handwash" },
|
|
{ icon: TvCastingIcon, name: "tvwithchromecast" },
|
|
{ icon: WifiIcon, name: "freewifi" },
|
|
{ icon: WindowCurtainsAltIcon, name: "blackoutcurtains" },
|
|
{ icon: WindowNotAvailableIcon, name: "nowindow" },
|
|
{ icon: WineBarIcon, name: "minibar" },
|
|
{ icon: WoodFloorIcon, name: "woodenfloor" },
|
|
{ icon: YardIcon, name: "viewatriumview" },
|
|
]
|
|
|
|
const icon = iconMappings.find(
|
|
(icon) => icon.name.toLowerCase() === normalizedName
|
|
)
|
|
|
|
return icon ? icon.icon : HeartIcon
|
|
}
|