#nullable enable
using FoodsharingSiegen.Contracts.Entity;
using FoodsharingSiegen.Contracts.Enums;
using FoodsharingSiegen.Contracts.Model;
namespace FoodsharingSiegen.Shared.Helper
{
public static class TermHelper
{
#region Public Method Translate
///
/// Translates an instance into a corresponding string representation,
/// using the provided application settings if necessary.
///
/// The interaction type to translate.
/// The application settings used for custom translations.
/// A string representation of the specified interaction type.
public static string Translate(this InteractionType type, AppSettings appSettings)
{
return type switch
{
InteractionType.EinAb => "Einführung",
InteractionType.Welcome => "Begrüßung",
InteractionType.IdCheck => "Perso-Check",
InteractionType.PrintPass => "FS-Ausweis",
InteractionType.Verify => "Verifizierung",
InteractionType.Complete => "Fertig",
InteractionType.StepInBriefing => appSettings.Terms.StepInName ?? "StepIn",
InteractionType.ReleasedForVerification => "Freigabe zum Freischalten",
_ => type.ToString()
};
}
#endregion
}
}