sharee.bike-App/SharedBusinessLogic/ViewModel/Bikes/Bike/BC/StateToText.cs
2024-04-16 11:29:40 +02:00

27 lines
603 B
C#

using ShareeBike.Model.State;
using ShareeBike.MultilingualResources;
namespace ShareeBike.ViewModel.Bikes.Bike.BC
{
public static class StateToText
{
/// <summary> Get button text for given copri state. </summary>
public static string GetActionText(this InUseStateEnum state)
{
switch (state)
{
case InUseStateEnum.Disposable:
return AppResources.ActionRequestBike;
case InUseStateEnum.Reserved:
return AppResources.ActionCancelReservation;
case InUseStateEnum.Booked:
return AppResources.ActionEndRental;
default:
return $"{state}";
}
}
}
}