import { ParkingPricePeriods } from '../parkingInformationTypes' import type { IntlShape } from 'react-intl' export function getPeriod(intl: IntlShape, period?: string) { switch (period) { case ParkingPricePeriods.hour: return intl.formatMessage({ defaultMessage: 'Price per hour', }) case ParkingPricePeriods.day: return intl.formatMessage({ defaultMessage: 'Price per day', }) case ParkingPricePeriods.night: return intl.formatMessage({ defaultMessage: 'Price per night', }) case ParkingPricePeriods.allDay: return intl.formatMessage({ defaultMessage: 'Price per 24 hours', }) default: return period } }