import { IconByIconName } from "@/components/Icons/IconByIconName"
import { IconName } from "@/components/Icons/iconName"

import type {
  IconProps,
  NucleoIconProps,
} from "@scandic-hotels/design-system/Icons"
import type { MaterialIconSetIconProps } from "@scandic-hotels/design-system/Icons/MaterialIcon"

import { FacilityEnum } from "@/types/enums/facilities"

import type { JSX } from "react";

const facilityToIconMap: Record<FacilityEnum, IconName> = {
  [FacilityEnum.AccessibleBathingControls]: IconName.StarFilled,
  [FacilityEnum.AccessibleBathtubs]: IconName.StarFilled,
  [FacilityEnum.AccessibleElevators]: IconName.StarFilled,
  [FacilityEnum.AccessibleLightSwitch]: IconName.StarFilled,
  [FacilityEnum.AccessibleRoomsAtHotel1]: IconName.StarFilled,
  [FacilityEnum.AccessibleRoomsAtHotel2]: IconName.StarFilled,
  [FacilityEnum.AccessibleToilets]: IconName.StarFilled,
  [FacilityEnum.AccessibleWashBasins]: IconName.StarFilled,
  [FacilityEnum.AdaptedRoomDoors]: IconName.StarFilled,
  [FacilityEnum.AdjoiningConventionCentre]: IconName.ConventionCentre,
  [FacilityEnum.AirConAirCooling]: IconName.AirConAirCooling,
  [FacilityEnum.AirConditioningInRoom]: IconName.AirConditioningInRoom,
  [FacilityEnum.AirportMaxDistance8Km]: IconName.Airplane,
  [FacilityEnum.AlarmsContinuouslyMonitored]: IconName.StarFilled,
  [FacilityEnum.AlarmsHaveStrobeLightsForDeafHardHearingInAllGuestRooms]:
    IconName.StarFilled,
  [FacilityEnum.AlarmsHaveStrobeLightsForDeafHardHearingInAllHallways]:
    IconName.StarFilled,
  [FacilityEnum.AlarmsHaveStrobeLightsForDeafHardHearingInAllPublicAreas]:
    IconName.StarFilled,
  [FacilityEnum.AllAudibleSmokeAlarmsHardwired]: IconName.StarFilled,
  [FacilityEnum.AllExteriorDoorsRequireKeyAccessAtNightOrAutomaticallyLock]:
    IconName.StarFilled,
  [FacilityEnum.AllGuestRoomDoorsHaveViewports]: IconName.StarFilled,
  [FacilityEnum.AllGuestRoomDoorsSelfClosing]: IconName.StarFilled,
  [FacilityEnum.AllParkingAreasPatrolled]: IconName.StarFilled,
  [FacilityEnum.AllParkingAreasWellLit]: IconName.StarFilled,
  [FacilityEnum.AllStairsWellsVentilated]: IconName.StarFilled,
  [FacilityEnum.ArmchairBed]: IconName.ArmChair,
  [FacilityEnum.AudibleAlarms]: IconName.StarFilled,
  [FacilityEnum.AudibleSmokeAlarmsInAllHalls]: IconName.StarFilled,
  [FacilityEnum.AudibleSmokeAlarmsInAllPublicAreas]: IconName.StarFilled,
  [FacilityEnum.AudibleSmokeAlarmsInAllRooms]: IconName.StarFilled,
  [FacilityEnum.AudioVisualEquipmentAvailable]: IconName.StarFilled,
  [FacilityEnum.AutolinkFireDepartment]: IconName.StarFilled,
  [FacilityEnum.AutomatedExternalDefibrillatorOnSiteAED]: IconName.StarFilled,
  [FacilityEnum.AutomaticFireDoors]: IconName.StarFilled,
  [FacilityEnum.AutoRecallElevators]: IconName.StarFilled,
  [FacilityEnum.BalconiesAccessibleToAdjoiningRooms]: IconName.StarFilled,
  [FacilityEnum.Ballroom]: IconName.StarFilled,
  [FacilityEnum.Banquet]: IconName.StarFilled,
  [FacilityEnum.Bar]: IconName.LocalBar,
  [FacilityEnum.BasicMedicalEquipmentOnSite]: IconName.StarFilled,
  [FacilityEnum.BathroomsAdaptedForDisabledGuests]: IconName.StarFilled,
  [FacilityEnum.Beach]: IconName.Beach,
  [FacilityEnum.Beach0To1Km]: IconName.Beach,
  [FacilityEnum.BeautySalon]: IconName.BeautySalon,
  [FacilityEnum.BedroomsWithWheelchairAccess]: IconName.StarFilled,
  [FacilityEnum.BikesForLoan]: IconName.Bike,
  [FacilityEnum.Bowling]: IconName.Bowling,
  [FacilityEnum.BrailleLargePrintHotelLiterature]: IconName.StarFilled,
  [FacilityEnum.BrailleLargePrintMenus]: IconName.StarFilled,
  [FacilityEnum.Breakfast]: IconName.Breakfast,
  [FacilityEnum.Business1]: IconName.BusinessCentre,
  [FacilityEnum.Business2]: IconName.BusinessCentre,
  [FacilityEnum.BusinessCentre]: IconName.BusinessCentre,
  [FacilityEnum.Cafe]: IconName.Restaurant,
  [FacilityEnum.CashFree8pmTill6am]: IconName.CashFree,
  [FacilityEnum.CashFreeHotel]: IconName.CashFree,
  [FacilityEnum.ChildrenWelcome]: IconName.StarFilled,
  [FacilityEnum.City]: IconName.City,
  [FacilityEnum.CoffeeInReceptionAtCharge]: IconName.CoffeeInReceptionAtCharge,
  [FacilityEnum.CoffeeShop]: IconName.CoffeeShop,
  [FacilityEnum.CoffeeTeaFacilities]: IconName.CoffeeAlt,
  [FacilityEnum.ColourTVInRoomsAllScandicHotels]: IconName.StarFilled,
  [FacilityEnum.ComplimentaryColdRefreshments]:
    IconName.ComplimentaryColdRefreshments,
  [FacilityEnum.CongressHall]: IconName.StarFilled,
  [FacilityEnum.ConventionCentre]: IconName.ConventionCentre,
  [FacilityEnum.Couples]: IconName.StarFilled,
  [FacilityEnum.DeadboltsOnConnectingDoors]: IconName.StarFilled,
  [FacilityEnum.DeadboltsSecondaryLocksOnAllGuestRoomDoors]:
    IconName.StarFilled,
  [FacilityEnum.Defibrillator]: IconName.StarFilled,
  [FacilityEnum.Desk]: IconName.Desk,
  [FacilityEnum.DirectDialPhoneInRoomsAllScandic]: IconName.DirectDial,
  [FacilityEnum.DisabledEmergencyPlan1]: IconName.StarFilled,
  [FacilityEnum.DisabledEmergencyPlan2]: IconName.StarFilled,
  [FacilityEnum.DisabledParking]: IconName.Wheelchair,
  [FacilityEnum.DiscoNightClub]: IconName.Nightlife,
  [FacilityEnum.DJLiveMusic]: IconName.Nightlife,
  [FacilityEnum.DO_NOT_USE_Restaurant]: IconName.StarFilled,
  [FacilityEnum.Downtown]: IconName.StarFilled,
  [FacilityEnum.DrinkableTapWater]: IconName.StarFilled,
  [FacilityEnum.DVDPlayer]: IconName.StarFilled,
  [FacilityEnum.EBikesChargingStation]: IconName.ElectricBike,
  [FacilityEnum.ElectronicKeyCards]: IconName.StarFilled,
  [FacilityEnum.Elevator]: IconName.Elevator,
  [FacilityEnum.EmergencyBackUpGenerators]: IconName.StarFilled,
  [FacilityEnum.EmergencyCallButtonOnPhone]: IconName.StarFilled,
  [FacilityEnum.EmergencyCodesOrButtonsInRooms]: IconName.StarFilled,
  [FacilityEnum.EmergencyEvacuationPlan1]: IconName.StarFilled,
  [FacilityEnum.EmergencyEvacuationPlan2]: IconName.StarFilled,
  [FacilityEnum.EmergencyEvaluationDrillFrequency]: IconName.StarFilled,
  [FacilityEnum.EmergencyInfoInAllRooms]: IconName.StarFilled,
  [FacilityEnum.EmergencyLightingAllScandic]: IconName.StarFilled,
  [FacilityEnum.EmergencyLightningInAllPublicAreas]: IconName.StarFilled,
  [FacilityEnum.EmergencyServiceResponseTimeInMinutes]: IconName.StarFilled,
  [FacilityEnum.Entertainment]: IconName.Theatre,
  [FacilityEnum.EventVenue]: IconName.StarFilled,
  [FacilityEnum.ExchangeFacility]: IconName.StarFilled,
  [FacilityEnum.ExitMapsInRooms]: IconName.StarFilled,
  [FacilityEnum.ExitSignsLit]: IconName.StarFilled,
  [FacilityEnum.ExtraFamilyFriendly]: IconName.ExtraFamilyFriendly,
  [FacilityEnum.Families]: IconName.ExtraFamilyFriendly,
  [FacilityEnum.FaxFacilityInRoom]: IconName.Fax,
  [FacilityEnum.Financial]: IconName.StarFilled,
  [FacilityEnum.FireDetectorsAllScandic]: IconName.StarFilled,
  [FacilityEnum.FireDetectorsInAllHalls]: IconName.StarFilled,
  [FacilityEnum.FireDetectorsInAllPublicAreas]: IconName.StarFilled,
  [FacilityEnum.FireDetectorsInAllRooms]: IconName.StarFilled,
  [FacilityEnum.FireExtinguishersInAllPublicAreas]: IconName.StarFilled,
  [FacilityEnum.FireExtinguishersInPublicAreasAllScandic]: IconName.StarFilled,
  [FacilityEnum.FireSafetyAllScandic]: IconName.StarFilled,
  [FacilityEnum.FirstAidAvailable]: IconName.StarFilled,
  [FacilityEnum.FoodDrinks247]: IconName.FoodDrinks247,
  [FacilityEnum.FreeWiFi]: IconName.Wifi,
  [FacilityEnum.GiftShop]: IconName.Gift,
  [FacilityEnum.Golf]: IconName.Golf,
  [FacilityEnum.GolfCourse0To30Km]: IconName.Golf,
  [FacilityEnum.GuestRoomDoorsHaveASecondLock]: IconName.StarFilled,
  [FacilityEnum.Gym]: IconName.Fitness,
  [FacilityEnum.GymTrainingFacilities]: IconName.Fitness,
  [FacilityEnum.Hairdresser]: IconName.Hairdresser,
  [FacilityEnum.HairdryerInRoomAllScandic]: IconName.HairdryerInRoomAllScandic,
  [FacilityEnum.HandicapFacilities]: IconName.StarFilled,
  [FacilityEnum.HandrailsInBathrooms]: IconName.StarFilled,
  [FacilityEnum.HearingInductionLoops]: IconName.StarFilled,
  [FacilityEnum.Highway1]: IconName.StarFilled,
  [FacilityEnum.Highway2]: IconName.StarFilled,
  [FacilityEnum.Hiking0To3Km]: IconName.Hiking,
  [FacilityEnum.HotelCompliesWithAAASecurityStandards]: IconName.StarFilled,
  [FacilityEnum.HotelIsFollowingScandicsSafetySecurityPolicy]:
    IconName.StarFilled,
  [FacilityEnum.HotelWorksAccordingToScandicsAccessibilityConcepts]:
    IconName.StarFilled,
  [FacilityEnum.IceMachine]: IconName.IceMachine,
  [FacilityEnum.IceMachineReception]: IconName.IceMachine,
  [FacilityEnum.IDRequiredToReplaceAGuestRoomKey]: IconName.StarFilled,
  [FacilityEnum.IfNoWhatAreTheHoursUse24ClockEx0000To0600]: IconName.StarFilled,
  [FacilityEnum.InCountry]: IconName.StarFilled,
  [FacilityEnum.IndustrialPark]: IconName.StarFilled,
  [FacilityEnum.InternetHighSpeedInternetConnectionAllScandic]:
    IconName.StarFilled,
  [FacilityEnum.InternetHotSpotsAllScandic]: IconName.StarFilled,
  [FacilityEnum.IroningRoom]: IconName.Ironing,
  [FacilityEnum.IronIroningBoardAllScandic]: IconName.Ironing,
  [FacilityEnum.Jacuzzi]: IconName.Jacuzzi,
  [FacilityEnum.JacuzziInRoom]: IconName.Jacuzzi,
  [FacilityEnum.KayaksForLoan]: IconName.Kayaking,
  [FacilityEnum.KeyAccessOnlySecuredFloorsAvailable]: IconName.StarFilled,
  [FacilityEnum.KeyAccessOnlyToHealthClubGym]: IconName.Fitness,
  [FacilityEnum.KidsPlayRoom]: IconName.StarFilled,
  [FacilityEnum.KidsUpToAndIncluding12YearsStayForFree]: IconName.StarFilled,
  [FacilityEnum.KitchenInRoom]: IconName.Kitchen,
  [FacilityEnum.Lake0To1Km]: IconName.StarFilled,
  [FacilityEnum.LakeOrSea0To1Km]: IconName.StarFilled,
  [FacilityEnum.LaptopSafe]: IconName.LaptopSafe,
  [FacilityEnum.LateCheckOutUntil1400Guaranteed]: IconName.Business,
  [FacilityEnum.LaundryRoom]: IconName.LaundryMachine,
  [FacilityEnum.LaundryService]: IconName.LaundryMachine,
  [FacilityEnum.LaundryServiceExpress]: IconName.TshirtWash,
  [FacilityEnum.Leisure]: IconName.StarFilled,
  [FacilityEnum.LifestyleConcierge]: IconName.Concierge,
  [FacilityEnum.LuggageLockers]: IconName.LuggageLockers,
  [FacilityEnum.LuggageStorageAdditionalCost]: IconName.Luggage,
  [FacilityEnum.LuggageStorageNoCost]: IconName.Luggage,
  [FacilityEnum.Massage]: IconName.Massage,
  [FacilityEnum.MeetingArea]: IconName.Business,
  [FacilityEnum.MeetingConferenceFacilities]: IconName.Business,
  [FacilityEnum.MeetingRooms]: IconName.Business,
  [FacilityEnum.MinibarInRoom]: IconName.Minibar,
  [FacilityEnum.MobileLift]: IconName.StarFilled,
  [FacilityEnum.Mountains0To1Km]: IconName.StarFilled,
  [FacilityEnum.MovieChannelsInRoomAllScandic]: IconName.TVRemote,
  [FacilityEnum.MultipleExitsOnEachFloor]: IconName.StarFilled,
  [FacilityEnum.NonSmokingRoomsAllScandic]: IconName.NonSmoking,
  [FacilityEnum.OnSiteTrainingFacilities]: IconName.Fitness,
  [FacilityEnum.OtherExplainInBriefDescription]: IconName.StarFilled,
  [FacilityEnum.OutdoorTerrace]: IconName.Deck,
  [FacilityEnum.OvernightSecurity]: IconName.Guard,
  [FacilityEnum.ParkingAdditionalCost]: IconName.Parking,
  [FacilityEnum.ParkingAttendant]: IconName.StarFilled,
  [FacilityEnum.ParkingElectricCharging]: IconName.ElectricCar,
  [FacilityEnum.ParkingFreeParking]: IconName.Parking,
  [FacilityEnum.ParkingGarage]: IconName.Garage,
  [FacilityEnum.ParkingOutdoor]: IconName.ParkingOutdoor,
  [FacilityEnum.PCHookUpInRoom]: IconName.StarFilled,
  [FacilityEnum.PetFriendlyRooms]: IconName.Pets,
  [FacilityEnum.PillowAlarmsAvailable]: IconName.StarFilled,
  [FacilityEnum.PlayStationInPlayArea]: IconName.Gaming,
  [FacilityEnum.Pool]: IconName.Swim,
  [FacilityEnum.PoolSwimmingPoolJacuzziAtHotel]: IconName.Swim,
  [FacilityEnum.PrintingService]: IconName.StarFilled,
  [FacilityEnum.PropertyMeetsRequirementsFireSafety]: IconName.StarFilled,
  [FacilityEnum.PublicAddressSystem]: IconName.StarFilled,
  [FacilityEnum.RelaxationSuite]: IconName.StarFilled,
  [FacilityEnum.Restaurant]: IconName.Restaurant,
  [FacilityEnum.RestrictedRoomAccessAllScandic]: IconName.StarFilled,
  [FacilityEnum.RooftopBar]: IconName.Deck,
  [FacilityEnum.RoomsAccessibleFromTheInterior]: IconName.StarFilled,
  [FacilityEnum.RoomService]: IconName.RoomService,
  [FacilityEnum.RoomWindowsOpen]: IconName.StarFilled,
  [FacilityEnum.RoomWindowsThatOpenHaveLockingDevice]: IconName.StarFilled,
  [FacilityEnum.Rural1]: IconName.StarFilled,
  [FacilityEnum.Rural2]: IconName.StarFilled,
  [FacilityEnum.SafeDepositBoxInRoomsAllScandic]: IconName.SafetyBox,
  [FacilityEnum.SafeDepositBoxInRoomsCanHoldA17InchLaptop]: IconName.SafetyBox,
  [FacilityEnum.SafeDepositBoxInRoomsCannotHoldALaptop]: IconName.SafetyBox,
  [FacilityEnum.SafetyChainsOnGuestRoomDoor]: IconName.StarFilled,
  [FacilityEnum.Sauna]: IconName.Sauna,
  [FacilityEnum.ScandicShop24Hrs]: IconName.ConvenienceStore24h,
  [FacilityEnum.SecondaryLocksOnSlidingGlassDoors]: IconName.StarFilled,
  [FacilityEnum.SecondaryLocksOnWindows]: IconName.StarFilled,
  [FacilityEnum.Security24Hours]: IconName.Guard,
  [FacilityEnum.SecurityEscortsAvailableOnRequest]: IconName.Guard,
  [FacilityEnum.SecurityPersonnelOnSite]: IconName.Guard,
  [FacilityEnum.SeparateFloorsForWomen]: IconName.StarFilled,
  [FacilityEnum.ServesBreakfastAlwaysIncluded]: IconName.Breakfast,
  [FacilityEnum.ServesBreakfastNotAlwaysIncluded]: IconName.Breakfast,
  [FacilityEnum.ServesOrganicBreakfastAlwaysIncluded]: IconName.Breakfast,
  [FacilityEnum.ServesOrganicBreakfastNotAlwaysIncluded]: IconName.Breakfast,
  [FacilityEnum.ServiceGuideDogsAllowed]: IconName.StarFilled,
  [FacilityEnum.ServiceSecurity24Hrs]: IconName.Guard,
  [FacilityEnum.Shopping]: IconName.Shopping,
  [FacilityEnum.SkateboardsForLoan]: IconName.Skateboarding,
  [FacilityEnum.Skiing0To1Km]: IconName.Skiing,
  [FacilityEnum.Skybar]: IconName.LocalBar,
  [FacilityEnum.SmokeDetectorsAllScandic]: IconName.StarFilled,
  [FacilityEnum.Solarium]: IconName.StarFilled,
  [FacilityEnum.SpecialNeedsMenus]: IconName.StarFilled,
  [FacilityEnum.Sports]: IconName.Sports,
  [FacilityEnum.SprinklersAllScandic]: IconName.StarFilled,
  [FacilityEnum.SprinklersInAllHalls]: IconName.StarFilled,
  [FacilityEnum.SprinklersInAllPublicAreas]: IconName.StarFilled,
  [FacilityEnum.SprinklersInAllRooms]: IconName.StarFilled,
  [FacilityEnum.StaffInDuplicateKeys]: IconName.StarFilled,
  [FacilityEnum.StaffRedCrossCertifiedInCPR]: IconName.StarFilled,
  [FacilityEnum.StaffTrainedForDisabledGuests]: IconName.StarFilled,
  [FacilityEnum.StaffTrainedInAutomatedExternalDefibrillatorUsageAED]:
    IconName.StarFilled,
  [FacilityEnum.StaffTrainedInCPR]: IconName.StarFilled,
  [FacilityEnum.StaffTrainedInFirstAid]: IconName.StarFilled,
  [FacilityEnum.StaffTrainedInFirstAidTechniques]: IconName.StarFilled,
  [FacilityEnum.StaffTrainedToCaterForDisabledGuestsAllScandic]:
    IconName.StarFilled,
  [FacilityEnum.Suburbs]: IconName.StarFilled,
  [FacilityEnum.SwingboltLock]: IconName.StarFilled,
  [FacilityEnum.TeleConferencingFacilitiesAvailable]: IconName.StarFilled,
  [FacilityEnum.TelevisionsWithSubtitlesOrClosedCaptions]: IconName.StarFilled,
  [FacilityEnum.Tennis1]: IconName.Sports,
  [FacilityEnum.Tennis2]: IconName.Sports,
  [FacilityEnum.TennisPadel]: IconName.Sports,
  [FacilityEnum.Theatre]: IconName.Theatre,
  [FacilityEnum.TrouserPress]: IconName.Ironing,
  [FacilityEnum.TVWithChromecast1]: IconName.TvCasting,
  [FacilityEnum.TVWithChromecast2]: IconName.TvCasting,
  [FacilityEnum.UniformSecurityOnPremises]: IconName.StarFilled,
  [FacilityEnum.UtilityRoomForIroning]: IconName.Ironing,
  [FacilityEnum.VendingMachineWithNecessities]: IconName.Dining,
  [FacilityEnum.VideoSurveillanceInHallways]: IconName.StarFilled,
  [FacilityEnum.VideoSurveillanceInPublicAreas]: IconName.StarFilled,
  [FacilityEnum.VideoSurveillanceMonitored24HrsADay]: IconName.StarFilled,
  [FacilityEnum.VideoSurveillanceOfAllParkingAreas]: IconName.StarFilled,
  [FacilityEnum.VideoSurveillanceOfExteriorFrontEntrance]: IconName.StarFilled,
  [FacilityEnum.VideoSurveillanceRecorded24HrsADayParkingArea]:
    IconName.StarFilled,
  [FacilityEnum.WallMountedCycleRack]: IconName.Bike,
  [FacilityEnum.WellLitWalkways]: IconName.StarFilled,
  [FacilityEnum.WellnessAndSaunaEntranceFeeAdmission16PlusYears]: IconName.Spa,
  [FacilityEnum.WellnessPoolSaunaEntranceFeeAdmission16PlusYears]: IconName.Spa,
  [FacilityEnum.WheelchairAccess]: IconName.Wheelchair,
  [FacilityEnum.WideCorridors]: IconName.StarFilled,
  [FacilityEnum.WideEntrance]: IconName.StarFilled,
  [FacilityEnum.WideRestaurantEntrance]: IconName.StarFilled,
  [FacilityEnum.WiFiWirelessInternetAccessAllScandic]: IconName.StarFilled,
}

interface mapFacilityToIconProps {
  id: FacilityEnum
}
export function FacilityToIcon({
  id,
  ...props
}: mapFacilityToIconProps &
  (
    | MaterialIconSetIconProps
    | NucleoIconProps
    | IconProps
  )): JSX.Element | null {
  const iconName = facilityToIconMap[id]
  return <IconByIconName iconName={iconName} {...props} />
}
