feat(SW-325): added additional poi groups
This commit is contained in:
@@ -1,21 +1,30 @@
|
||||
import { IconName } from "@/types/components/icon"
|
||||
import type { PointOfInterestCategory } from "@/types/hotel"
|
||||
import {
|
||||
PointOfInterestCategoryNameEnum,
|
||||
PointOfInterestGroupEnum,
|
||||
} from "@/types/hotel"
|
||||
|
||||
/* 2024-09-18: At the moment, the icons for the different categories is unknown.
|
||||
This will be handled later. */
|
||||
export function getCategoryIconName(category?: PointOfInterestCategory | null) {
|
||||
switch (category) {
|
||||
case "Transportations":
|
||||
return IconName.Train
|
||||
case "Shopping":
|
||||
export function getIconByPoiGroupAndCategory(
|
||||
group: PointOfInterestGroupEnum,
|
||||
category?: PointOfInterestCategoryNameEnum
|
||||
) {
|
||||
switch (group) {
|
||||
case PointOfInterestGroupEnum.PUBLIC_TRANSPORT:
|
||||
return category === PointOfInterestCategoryNameEnum.AIRPORT
|
||||
? IconName.Airplane
|
||||
: IconName.Train
|
||||
case PointOfInterestGroupEnum.ATTRACTIONS:
|
||||
return category === PointOfInterestCategoryNameEnum.MUSEUM
|
||||
? IconName.Museum
|
||||
: IconName.Camera
|
||||
case PointOfInterestGroupEnum.BUSINESS:
|
||||
return IconName.Business
|
||||
case PointOfInterestGroupEnum.PARKING:
|
||||
return IconName.Parking
|
||||
case PointOfInterestGroupEnum.SHOPPING_DINING:
|
||||
return IconName.Shopping
|
||||
case "Museum":
|
||||
return IconName.Museum
|
||||
case "Tourist":
|
||||
return IconName.Cultural
|
||||
case "Restaurant":
|
||||
return IconName.Restaurant
|
||||
case PointOfInterestGroupEnum.LOCATION:
|
||||
default:
|
||||
return IconName.StarFilled
|
||||
return IconName.Location
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user