import { FC } from "react"

import { getIconByIconName } from "@/components/Icons/get-icon-by-icon-name"

import { IconName, IconProps } from "@/types/components/icon"
import { FacilityEnum } from "@/types/enums/facilities"

const facilityToIconMap: Record<FacilityEnum, IconName> = {
  [FacilityEnum.Bar]: IconName.LocalBar,
  [FacilityEnum.Skybar]: IconName.LocalBar,
  [FacilityEnum.RooftopBar]: IconName.LocalBar,
  [FacilityEnum.BikesForLoan]: IconName.Biking,
  [FacilityEnum.Gym]: IconName.Fitness,
  [FacilityEnum.GymTrainingFacilities]: IconName.Fitness,
  [FacilityEnum.KeyAccessOnlyToHealthClubGym]: IconName.Fitness,
  [FacilityEnum.FreeWiFi]: IconName.Wifi,
  [FacilityEnum.MeetingRooms]: IconName.People2,
  [FacilityEnum.MeetingConferenceFacilities]: IconName.People2,
  [FacilityEnum.PetFriendlyRooms]: IconName.Pets,
  [FacilityEnum.Sauna]: IconName.Sauna,
  [FacilityEnum.Restaurant]: IconName.Restaurant,
  [FacilityEnum.ParkingGarage]: IconName.Garage,
  [FacilityEnum.ParkingElectricCharging]: IconName.ElectricCar,
  [FacilityEnum.ParkingFreeParking]: IconName.Parking,
  [FacilityEnum.ParkingOutdoor]: IconName.Parking,
  [FacilityEnum.ParkingAdditionalCost]: IconName.Parking,
  [FacilityEnum.DisabledParking]: IconName.Parking,
  [FacilityEnum.OutdoorTerrace]: IconName.OutdoorFurniture,
  [FacilityEnum.RoomService]: IconName.RoomService,
  [FacilityEnum.LaundryRoom]: IconName.LaundryMachine,
  [FacilityEnum.LaundryService]: IconName.LaundryMachine,
  [FacilityEnum.LaundryServiceExpress]: IconName.LaundryMachine,
  [FacilityEnum.ScandicShop24Hrs]: IconName.ConvenienceStore24h,
  [FacilityEnum.ServesBreakfastAlwaysIncluded]: IconName.CoffeeAlt,
  [FacilityEnum.ServesBreakfastNotAlwaysIncluded]: IconName.CoffeeAlt,
  [FacilityEnum.ServesOrganicBreakfastAlwaysIncluded]: IconName.CoffeeAlt,
  [FacilityEnum.ServesOrganicBreakfastNotAlwaysIncluded]: IconName.CoffeeAlt,
  [FacilityEnum.Breakfast]: IconName.CoffeeAlt,
  [FacilityEnum.EBikesChargingStation]: IconName.ElectricBike,
  [FacilityEnum.Shopping]: IconName.Shopping,
  [FacilityEnum.Golf]: IconName.Golf,
  [FacilityEnum.GolfCourse0To30Km]: IconName.Golf,
  [FacilityEnum.TVWithChromecast1]: IconName.TvCasting,
  [FacilityEnum.TVWithChromecast2]: IconName.TvCasting,
  [FacilityEnum.DJLiveMusic]: IconName.Nightlife,
  [FacilityEnum.DiscoNightClub]: IconName.Nightlife,
  [FacilityEnum.CoffeeInReceptionAtCharge]: IconName.CoffeeAlt,
  [FacilityEnum.CoffeeShop]: IconName.CoffeeAlt,
  [FacilityEnum.CoffeeTeaFacilities]: IconName.CoffeeAlt,
  [FacilityEnum.SkateboardsForLoan]: IconName.Skateboarding,
  [FacilityEnum.KayaksForLoan]: IconName.Kayaking,
  [FacilityEnum.LifestyleConcierge]: IconName.Concierge,
  [FacilityEnum.WellnessAndSaunaEntranceFeeAdmission16PlusYears]:
    IconName.Sauna,
  [FacilityEnum.WellnessPoolSaunaEntranceFeeAdmission16PlusYears]:
    IconName.Sauna,
  [FacilityEnum.Cafe]: IconName.Restaurant,
  [FacilityEnum.Pool]: IconName.Swim,
  [FacilityEnum.PoolSwimmingPoolJacuzziAtHotel]: IconName.Swim,
  [FacilityEnum.VendingMachineWithNecessities]: IconName.Groceries,

  [FacilityEnum.Jacuzzi]: IconName.StarFilled,
  [FacilityEnum.JacuzziInRoom]: IconName.StarFilled,

  [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.StarFilled,
  [FacilityEnum.AirConAirCooling]: IconName.StarFilled,
  [FacilityEnum.AirConditioningInRoom]: IconName.StarFilled,
  [FacilityEnum.AirportMaxDistance8Km]: IconName.StarFilled,
  [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.StarFilled,
  [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.BasicMedicalEquipmentOnSite]: IconName.StarFilled,
  [FacilityEnum.BathroomsAdaptedForDisabledGuests]: IconName.StarFilled,
  [FacilityEnum.Beach]: IconName.StarFilled,
  [FacilityEnum.Beach0To1Km]: IconName.StarFilled,
  [FacilityEnum.BeautySalon]: IconName.StarFilled,
  [FacilityEnum.BedroomsWithWheelchairAccess]: IconName.StarFilled,
  [FacilityEnum.Bowling]: IconName.StarFilled,
  [FacilityEnum.BrailleLargePrintHotelLiterature]: IconName.StarFilled,
  [FacilityEnum.BrailleLargePrintMenus]: IconName.StarFilled,
  [FacilityEnum.Business1]: IconName.StarFilled,
  [FacilityEnum.Business2]: IconName.StarFilled,
  [FacilityEnum.BusinessCentre]: IconName.StarFilled,
  [FacilityEnum.CashFree8pmTill6am]: IconName.StarFilled,
  [FacilityEnum.CashFreeHotel]: IconName.StarFilled,
  [FacilityEnum.ChildrenWelcome]: IconName.StarFilled,
  [FacilityEnum.City]: IconName.StarFilled,
  [FacilityEnum.ColourTVInRoomsAllScandicHotels]: IconName.StarFilled,
  [FacilityEnum.ComplimentaryColdRefreshments]: IconName.StarFilled,
  [FacilityEnum.CongressHall]: IconName.StarFilled,
  [FacilityEnum.ConventionCentre]: IconName.StarFilled,
  [FacilityEnum.Couples]: IconName.StarFilled,
  [FacilityEnum.DeadboltsOnConnectingDoors]: IconName.StarFilled,
  [FacilityEnum.DeadboltsSecondaryLocksOnAllGuestRoomDoors]:
    IconName.StarFilled,
  [FacilityEnum.Defibrillator]: IconName.StarFilled,
  [FacilityEnum.Desk]: IconName.StarFilled,
  [FacilityEnum.DirectDialPhoneInRoomsAllScandic]: IconName.StarFilled,
  [FacilityEnum.DisabledEmergencyPlan1]: IconName.StarFilled,
  [FacilityEnum.DisabledEmergencyPlan2]: IconName.StarFilled,
  [FacilityEnum.DO_NOT_USE_Restaurant]: IconName.StarFilled,
  [FacilityEnum.Downtown]: IconName.StarFilled,
  [FacilityEnum.DrinkableTapWater]: IconName.StarFilled,
  [FacilityEnum.DVDPlayer]: IconName.StarFilled,
  [FacilityEnum.ElectronicKeyCards]: IconName.StarFilled,
  [FacilityEnum.Elevator]: IconName.StarFilled,
  [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.StarFilled,
  [FacilityEnum.EventVenue]: IconName.StarFilled,
  [FacilityEnum.ExchangeFacility]: IconName.StarFilled,
  [FacilityEnum.ExitMapsInRooms]: IconName.StarFilled,
  [FacilityEnum.ExitSignsLit]: IconName.StarFilled,
  [FacilityEnum.ExtraFamilyFriendly]: IconName.StarFilled,
  [FacilityEnum.Families]: IconName.StarFilled,
  [FacilityEnum.FaxFacilityInRoom]: IconName.StarFilled,
  [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.StarFilled,
  [FacilityEnum.GiftShop]: IconName.StarFilled,
  [FacilityEnum.GuestRoomDoorsHaveASecondLock]: IconName.StarFilled,
  [FacilityEnum.Hairdresser]: IconName.StarFilled,
  [FacilityEnum.HairdryerInRoomAllScandic]: IconName.StarFilled,
  [FacilityEnum.HandicapFacilities]: IconName.StarFilled,
  [FacilityEnum.HandrailsInBathrooms]: IconName.StarFilled,
  [FacilityEnum.HearingInductionLoops]: IconName.StarFilled,
  [FacilityEnum.Highway1]: IconName.StarFilled,
  [FacilityEnum.Highway2]: IconName.StarFilled,
  [FacilityEnum.Hiking0To3Km]: IconName.StarFilled,
  [FacilityEnum.HotelCompliesWithAAASecurityStandards]: IconName.StarFilled,
  [FacilityEnum.HotelIsFollowingScandicsSafetySecurityPolicy]:
    IconName.StarFilled,
  [FacilityEnum.HotelWorksAccordingToScandicsAccessibilityConcepts]:
    IconName.StarFilled,
  [FacilityEnum.IceMachine]: IconName.StarFilled,
  [FacilityEnum.IceMachineReception]: IconName.StarFilled,
  [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.StarFilled,
  [FacilityEnum.IronIroningBoardAllScandic]: IconName.StarFilled,
  [FacilityEnum.KeyAccessOnlySecuredFloorsAvailable]: IconName.StarFilled,
  [FacilityEnum.KidsPlayRoom]: IconName.StarFilled,
  [FacilityEnum.KidsUpToAndIncluding12YearsStayForFree]: IconName.StarFilled,
  [FacilityEnum.KitchenInRoom]: IconName.StarFilled,
  [FacilityEnum.Lake0To1Km]: IconName.StarFilled,
  [FacilityEnum.LakeOrSea0To1Km]: IconName.StarFilled,
  [FacilityEnum.LaptopSafe]: IconName.StarFilled,
  [FacilityEnum.Leisure]: IconName.StarFilled,
  [FacilityEnum.LuggageLockers]: IconName.StarFilled,
  [FacilityEnum.Massage]: IconName.StarFilled,
  [FacilityEnum.MinibarInRoom]: IconName.StarFilled,
  [FacilityEnum.MobileLift]: IconName.StarFilled,
  [FacilityEnum.Mountains0To1Km]: IconName.StarFilled,
  [FacilityEnum.MovieChannelsInRoomAllScandic]: IconName.StarFilled,
  [FacilityEnum.MultipleExitsOnEachFloor]: IconName.StarFilled,
  [FacilityEnum.NonSmokingRoomsAllScandic]: IconName.StarFilled,
  [FacilityEnum.OnSiteTrainingFacilities]: IconName.StarFilled,
  [FacilityEnum.OtherExplainInBriefDescription]: IconName.StarFilled,
  [FacilityEnum.OvernightSecurity]: IconName.StarFilled,
  [FacilityEnum.ParkingAttendant]: IconName.StarFilled,
  [FacilityEnum.PCHookUpInRoom]: IconName.StarFilled,
  [FacilityEnum.PillowAlarmsAvailable]: IconName.StarFilled,
  [FacilityEnum.PlayStationInPlayArea]: IconName.StarFilled,
  [FacilityEnum.PrintingService]: IconName.StarFilled,
  [FacilityEnum.PropertyMeetsRequirementsFireSafety]: IconName.StarFilled,
  [FacilityEnum.PublicAddressSystem]: IconName.StarFilled,
  [FacilityEnum.RelaxationSuite]: IconName.StarFilled,
  [FacilityEnum.RestrictedRoomAccessAllScandic]: IconName.StarFilled,
  [FacilityEnum.RoomsAccessibleFromTheInterior]: IconName.StarFilled,
  [FacilityEnum.RoomWindowsOpen]: IconName.StarFilled,
  [FacilityEnum.RoomWindowsThatOpenHaveLockingDevice]: IconName.StarFilled,
  [FacilityEnum.Rural1]: IconName.StarFilled,
  [FacilityEnum.Rural2]: IconName.StarFilled,
  [FacilityEnum.SafeDepositBoxInRoomsAllScandic]: IconName.StarFilled,
  [FacilityEnum.SafeDepositBoxInRoomsCanHoldA17InchLaptop]: IconName.StarFilled,
  [FacilityEnum.SafeDepositBoxInRoomsCannotHoldALaptop]: IconName.StarFilled,
  [FacilityEnum.SafetyChainsOnGuestRoomDoor]: IconName.StarFilled,
  [FacilityEnum.SecondaryLocksOnSlidingGlassDoors]: IconName.StarFilled,
  [FacilityEnum.SecondaryLocksOnWindows]: IconName.StarFilled,
  [FacilityEnum.Security24Hours]: IconName.StarFilled,
  [FacilityEnum.SecurityEscortsAvailableOnRequest]: IconName.StarFilled,
  [FacilityEnum.SecurityPersonnelOnSite]: IconName.StarFilled,
  [FacilityEnum.SeparateFloorsForWomen]: IconName.StarFilled,
  [FacilityEnum.ServiceGuideDogsAllowed]: IconName.StarFilled,
  [FacilityEnum.ServiceSecurity24Hrs]: IconName.StarFilled,
  [FacilityEnum.Skiing0To1Km]: IconName.StarFilled,
  [FacilityEnum.SmokeDetectorsAllScandic]: IconName.StarFilled,
  [FacilityEnum.Solarium]: IconName.StarFilled,
  [FacilityEnum.SpecialNeedsMenus]: IconName.StarFilled,
  [FacilityEnum.Sports]: IconName.StarFilled,
  [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.StarFilled,
  [FacilityEnum.Tennis2]: IconName.StarFilled,
  [FacilityEnum.TennisPadel]: IconName.StarFilled,
  [FacilityEnum.Theatre]: IconName.StarFilled,
  [FacilityEnum.TrouserPress]: IconName.StarFilled,
  [FacilityEnum.UniformSecurityOnPremises]: IconName.StarFilled,
  [FacilityEnum.UtilityRoomForIroning]: IconName.StarFilled,
  [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.StarFilled,
  [FacilityEnum.WellLitWalkways]: IconName.StarFilled,
  [FacilityEnum.WheelchairAccess]: IconName.StarFilled,
  [FacilityEnum.WideCorridors]: IconName.StarFilled,
  [FacilityEnum.WideEntrance]: IconName.StarFilled,
  [FacilityEnum.WideRestaurantEntrance]: IconName.StarFilled,
  [FacilityEnum.WiFiWirelessInternetAccessAllScandic]: IconName.StarFilled,
}

export function mapFacilityToIcon(id: FacilityEnum): FC<IconProps> | null {
  const iconName = facilityToIconMap[id]
  return getIconByIconName(iconName) || null
}
