feat(SW-2873): Move HotelReservationSidePeek to booking-flow * Move sidepeek store to booking-flow * Begin move of HotelReservationSidePeek to booking-flow * Copy Link * Update AccessibilityAccordionItem * Split AccessibilityAccordionItem into two components * Fix tracking for Accordion * Duplicate ButtonLink to booking-flow TEMP * AdditionalAmeneties * wip * Move sidepeek accordion items * Remove temp ButtonLink * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix accordion tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Update exports * Fix self-referencing import * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Add 'use client' to tracking function * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix TEMP folder * Refactor sidepeek tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow Approved-by: Joakim Jäderberg
235 lines
11 KiB
TypeScript
235 lines
11 KiB
TypeScript
import BathroomCabinetIcon from './Nucleo/Amenities_Facilities/bathroom-cabinet-2'
|
|
import BedHotelIcon from './Customised/Amenities_Facilities/BedHotel'
|
|
import BowlingPinsIcon from './Nucleo/Experiences/bowling-pins'
|
|
import BunkBedIcon from './Customised/Amenities_Facilities/MdiBunkBedOutline'
|
|
import ConferenceRoomIcon from './Nucleo/Amenities_Facilities/conference-room'
|
|
import CoolingIcon from './Customised/Amenities_Facilities/Cooling'
|
|
import CouchTableIcon from './Customised/Amenities_Facilities/CouchTable'
|
|
import DoorIcon from './Nucleo/Amenities_Facilities/door-2'
|
|
import FootStoolIcon from './Customised/Amenities_Facilities/FootStool'
|
|
import HairdresserIcon from './Nucleo/Amenities_Facilities/hairdresser-1'
|
|
import HairdryerIcon from './Customised/Amenities_Facilities/Hairdryer'
|
|
import HandSoapIcon from './Customised/Amenities_Facilities/HandSoap'
|
|
import IceMachineIcon from './Customised/Amenities_Facilities/IceMachine'
|
|
import MassageIcon from './Customised/Amenities_Facilities/Massage'
|
|
import { MaterialIcon, type MaterialIconSetIconProps } from './MaterialIcon'
|
|
import MirrorIcon from './Customised/Amenities_Facilities/Mirror'
|
|
import MovingBedsIcon from './Customised/Amenities_Facilities/MovingBeds'
|
|
import RecordPlayerIcon from './Nucleo/Amenities_Facilities/record-player-3'
|
|
import RoadIcon from './Customised/Amenities_Facilities/Road'
|
|
import RugIcon from './Customised/Amenities_Facilities/Rug'
|
|
import SafetyBoxIcon from './Customised/Amenities_Facilities/SafetyBox'
|
|
import SlippersIcon from './Customised/Amenities_Facilities/Slippers'
|
|
import ToiletIcon from './Nucleo/Amenities_Facilities/toilet-2'
|
|
import TowelIcon from './Customised/Amenities_Facilities/Towel'
|
|
import UserPoliceIcon from './Nucleo/Amenities_Facilities/user-police-2'
|
|
import ViewIcon from './Customised/Amenities_Facilities/View'
|
|
import WardIcon from './Customised/Amenities_Facilities/Ward'
|
|
import WindowNotAvailableIcon from './Customised/Amenities_Facilities/WindowNotAvailable'
|
|
import WoodFloorIcon from './Customised/Amenities_Facilities/WoodFloor'
|
|
|
|
import type { IconProps, NucleoIconProps } from '.'
|
|
import type { MaterialSymbolProps } from './MaterialIcon/MaterialSymbol'
|
|
import type { JSX } from 'react'
|
|
|
|
interface FacilityIconProps {
|
|
name: string | undefined
|
|
}
|
|
export function FacilityIcon({
|
|
name,
|
|
...props
|
|
}:
|
|
| (FacilityIconProps & MaterialIconSetIconProps)
|
|
| NucleoIconProps
|
|
| IconProps): JSX.Element {
|
|
if (!name) {
|
|
return <MaterialIcon icon="favorite" {...props} />
|
|
}
|
|
|
|
const normalizedName = name.toLowerCase()
|
|
|
|
const customIcon = CustomIconMappings.find(
|
|
(icon) => icon.name.toLowerCase() === normalizedName
|
|
)
|
|
if (customIcon) {
|
|
return <customIcon.icon {...props} />
|
|
}
|
|
|
|
const materialSymbolIcon = MaterialIconMappings.find(
|
|
(icon) => icon.name.toLowerCase() === normalizedName
|
|
)
|
|
|
|
return materialSymbolIcon ? (
|
|
<MaterialIcon icon={materialSymbolIcon.icon} {...props} />
|
|
) : (
|
|
<MaterialIcon icon="favorite" {...props} />
|
|
)
|
|
}
|
|
|
|
const MaterialIconMappings: {
|
|
icon: MaterialSymbolProps['icon']
|
|
name: string
|
|
}[] = [
|
|
{ icon: 'air_purifier_gen', name: 'aircondition' },
|
|
{ icon: 'travel', name: 'airport' },
|
|
{ icon: 'balcony', name: 'balcony' },
|
|
{ icon: 'deck', name: 'balconyorterrace' },
|
|
{ icon: 'balcony', name: 'frenchbalcony' },
|
|
{ icon: 'bathtub', name: 'bathroomwithbathtub' },
|
|
{ icon: 'bathtub', name: 'bathroomwithshowerandbathtub' },
|
|
{ icon: 'bed', name: 'setoftwopillows' },
|
|
{ icon: 'chair', name: 'armchairbed' },
|
|
{ icon: 'meeting_room', name: 'separatebedroom' },
|
|
{ icon: 'pedal_bike', name: 'bikeforloan' },
|
|
{ icon: 'bakery_dining', name: 'breakfast' },
|
|
{ icon: 'bakery_dining', name: 'servesbreakfastalwaysincluded' },
|
|
{ icon: 'business_center', name: 'meetingconferencefacilities' },
|
|
{ icon: 'business_center', name: 'meetingrooms' },
|
|
{ icon: 'router', name: 'internetwithcableintheroom' },
|
|
{ icon: 'chair', name: 'armchair' },
|
|
{ icon: 'chair', name: 'chair' },
|
|
{ icon: 'meeting_room', name: 'connectingrooms' },
|
|
{ icon: 'location_city', name: 'viewcityview' },
|
|
{ icon: 'coffee_maker', name: 'nespressomachine' },
|
|
{ icon: 'dining', name: 'café' },
|
|
{ icon: 'coffee', name: 'coffee' },
|
|
{ icon: 'coffee_maker', name: 'coffeemachine' },
|
|
{ icon: 'concierge', name: 'lifestyleconcierge' },
|
|
{ icon: 'mode_fan', name: 'aircooling' },
|
|
{ icon: 'mode_fan', name: 'cooler' },
|
|
{ icon: 'desk', name: 'deskandchair' },
|
|
{ icon: 'desk', name: 'desk' },
|
|
{ icon: 'dining', name: 'diningarea' },
|
|
{ icon: 'table_bar', name: 'tablefordining' },
|
|
{ icon: 'electric_bike', name: 'ebikeschargingstation' },
|
|
{ icon: 'family_restroom', name: 'extrafamilyfriendly' },
|
|
{ icon: 'exercise', name: 'gym' },
|
|
{ icon: 'health_and_beauty', name: 'beautysalon' },
|
|
{ icon: 'bathroom', name: 'bathroom2separatebathrooms' },
|
|
{ icon: 'credit_card_heart', name: 'cashfree800pmtill0600am' },
|
|
{ icon: 'credit_card_heart', name: 'cashfreehotel' },
|
|
{ icon: 'confirmation_number', name: 'coffeevoucher' },
|
|
{ icon: 'water_full', name: 'complimentarycoldrefreshments' },
|
|
{ icon: 'groups', name: 'conventioncentre' },
|
|
{ icon: 'accessible', name: 'disabledparking' },
|
|
{ icon: 'charging_station', name: 'dockingstationforipodipad' },
|
|
{ icon: 'cool_to_dry', name: 'dryingcabinet' },
|
|
{ icon: 'assistant_navigation', name: 'easyaccess' },
|
|
{ icon: 'laundry', name: 'garmentsteamer' },
|
|
{ icon: 'stairs', name: 'highfloor' },
|
|
{ icon: 'hot_tub', name: 'jaccuzzi' },
|
|
{ icon: 'hot_tub', name: 'jacuzzi' },
|
|
{ icon: 'countertops', name: 'kitchen' },
|
|
{ icon: 'countertops', name: 'kitchenette' },
|
|
{ icon: 'checked_bag', name: 'latecheckoutuntil1400guaranteed' },
|
|
{ icon: 'music_cast', name: 'livemusicexhibitions' },
|
|
{ icon: 'liquor', name: 'minibarincludedinroomrate' },
|
|
{ icon: 'local_parking', name: 'parkingadditionalcost' },
|
|
{ icon: 'sauna', name: 'privatesauna' },
|
|
{ icon: 'kitchen', name: 'refrigerator' },
|
|
{ icon: 'airline_seat_recline_normal', name: 'seatingarea' },
|
|
{ icon: 'scene', name: 'separatelivingroom' },
|
|
{ icon: 'chair', name: 'sofabed' },
|
|
{ icon: 'chair', name: 'sofas' },
|
|
{ icon: 'chair', name: 'sofa' },
|
|
{ icon: 'bedroom_parent', name: 'spaciousroom' },
|
|
{ icon: 'local_drink', name: 'stillandsparklingwater' },
|
|
{ icon: 'table_bar', name: 'table' },
|
|
{ icon: 'coffee_maker', name: 'tassimocoffeemaker' },
|
|
{ icon: 'deck', name: 'terrace' },
|
|
{ icon: 'iron', name: 'trouserpress' },
|
|
{ icon: 'tv_guide', name: 'tv' },
|
|
{ icon: 'tv_remote', name: 'tvwithcomplimentarymoviechannels' },
|
|
{ icon: 'tv_remote', name: 'tvwithmoviechannels' },
|
|
{ icon: 'live_tv', name: 'tvwithstreamingoption' },
|
|
{ icon: 'hvac', name: 'ventilationinroom' },
|
|
{ icon: 'landscape', name: 'viewfjordview' },
|
|
{ icon: 'houseboat', name: 'viewlakeview' },
|
|
{ icon: 'panorama', name: 'viewpanoramicview' },
|
|
{ icon: 'sailing', name: 'viewseaview' },
|
|
{ icon: 'ward', name: 'wallbed' },
|
|
{ icon: 'pedal_bike', name: 'wallmountedcyclerack' },
|
|
{ icon: 'dresser', name: 'wardrobe' },
|
|
{ icon: 'spa', name: 'wellnessandsaunaentrancefeeadmission16years' },
|
|
{ icon: 'spa', name: 'wellnesspoolsaunaentrancefeeadmission16years' },
|
|
{ icon: 'curtains', name: 'windownook' },
|
|
{ icon: 'iron', name: 'ironandironingboard' },
|
|
{ icon: 'iron', name: 'ironingroom' },
|
|
{ icon: 'kayaking', name: 'kayaksforloan' },
|
|
{ icon: 'kettle', name: 'kettle' },
|
|
{ icon: 'kettle', name: 'kettlewithcoffee' },
|
|
{ icon: 'sync_saved_locally', name: 'laptopsafe' },
|
|
{ icon: 'computer', name: 'laptoptray' },
|
|
{ icon: 'local_laundry_service', name: 'laundryservice' },
|
|
{ icon: 'local_bar', name: 'bar' },
|
|
{ icon: 'deck', name: 'rooftopbar' },
|
|
{ icon: 'local_bar', name: 'skybar' },
|
|
{ icon: 'microwave', name: 'microwave' },
|
|
{ icon: 'nature', name: 'viewparkview' },
|
|
{ icon: 'nightlife', name: 'disconightclub' },
|
|
{ icon: 'smoke_free', name: 'nonsmoking' },
|
|
{ icon: 'deck', name: 'outdoorterrace' },
|
|
{ icon: 'local_parking', name: 'parking' },
|
|
{ icon: 'local_parking', name: 'parkingfreeparking' },
|
|
{ icon: 'pets', name: 'petfriendlyrooms' },
|
|
{ icon: 'phone', name: 'directdialphoneandvoicemail' },
|
|
{ icon: 'restaurant', name: 'restaurant' },
|
|
{ icon: 'room_service', name: 'roomservice' },
|
|
{ icon: 'sauna', name: 'sauna' },
|
|
{ icon: 'shower', name: 'bathroomwithshower' },
|
|
{ icon: 'shower', name: 'rainshower' },
|
|
{ icon: 'shower', name: 'sharedbathroomwithshower' },
|
|
{ icon: 'radio', name: 'musicplayer' },
|
|
{ icon: 'shopping_bag', name: 'shop' },
|
|
{ icon: 'pool', name: 'pool' },
|
|
{ icon: 'laundry', name: 'handwash' },
|
|
{ icon: 'connected_tv', name: 'tvwithchromecast' },
|
|
{ icon: 'wifi', name: 'freewifi' },
|
|
{ icon: 'curtains_closed', name: 'blackoutcurtains' },
|
|
{ icon: 'liquor', name: 'minibar' },
|
|
{ icon: 'yard', name: 'viewatriumview' },
|
|
]
|
|
|
|
const CustomIconMappings = [
|
|
{ icon: BathroomCabinetIcon, name: 'bathroomwithshowerorbathtub' },
|
|
{ icon: MovingBedsIcon, name: 'adjustablebeds' },
|
|
{ icon: MovingBedsIcon, name: 'pulloutbed' },
|
|
{ icon: BedHotelIcon, name: 'extrabed' },
|
|
{ icon: CoolingIcon, name: 'coolingcabinet' },
|
|
{ icon: FootStoolIcon, name: 'footstool' },
|
|
{ icon: HairdryerIcon, name: 'hairdryer' },
|
|
{ icon: HairdresserIcon, name: 'hairdresser' },
|
|
{ icon: HandSoapIcon, name: 'toiletries' },
|
|
{ icon: TowelIcon, name: 'bathrobes' },
|
|
{ icon: HandSoapIcon, name: 'bodycareproducts' },
|
|
{ icon: HandSoapIcon, name: 'bodylotion' },
|
|
{ icon: BowlingPinsIcon, name: 'bowling' },
|
|
{ icon: BunkBedIcon, name: 'bunkbed' },
|
|
{ icon: BunkBedIcon, name: 'bunkbed80x188cm' },
|
|
{ icon: IceMachineIcon, name: 'icemachine' },
|
|
{ icon: IceMachineIcon, name: 'icemachinereception' },
|
|
{ icon: MassageIcon, name: 'massage' },
|
|
{ icon: ConferenceRoomIcon, name: 'meetingarea' },
|
|
{ icon: UserPoliceIcon, name: 'overnightsecurity' },
|
|
{ icon: UserPoliceIcon, name: 'security24hoours' },
|
|
{ icon: UserPoliceIcon, name: 'servicesecurity24h' },
|
|
{ icon: FootStoolIcon, name: 'footstool' },
|
|
{ icon: WindowNotAvailableIcon, name: 'nowindow' },
|
|
{ icon: DoorIcon, name: 'luggagelockers' },
|
|
{ icon: MirrorIcon, name: 'cosmeticmirror' },
|
|
{ icon: WardIcon, name: 'wallbed' },
|
|
{ icon: CouchTableIcon, name: 'sofawithtable' },
|
|
{ icon: SafetyBoxIcon, name: 'safetybox' },
|
|
{ icon: RecordPlayerIcon, name: 'modernvinylplayer' },
|
|
{ icon: RugIcon, name: 'carpetingwalltowallcarpet' },
|
|
{ icon: ToiletIcon, name: 'separatetoilet' },
|
|
{ icon: WoodFloorIcon, name: 'woodenfloor' },
|
|
{ icon: ViewIcon, name: 'view' },
|
|
{ icon: HandSoapIcon, name: 'shampoo' },
|
|
{ icon: HandSoapIcon, name: 'conditioner' },
|
|
{ icon: RoadIcon, name: 'viewstreetview' },
|
|
{ icon: SlippersIcon, name: 'slippers' },
|
|
{ icon: HandSoapIcon, name: 'showergel' },
|
|
{ icon: HandSoapIcon, name: 'showerproductsscentbygrandcentral' },
|
|
]
|