namespace VigilCare.Simulation;

public static class DepartmentMapper
{
    private static readonly Dictionary<string, string> ScenarioToApi = new(StringComparer.OrdinalIgnoreCase)
    {
        ["Icu"] = "ICU",
        ["GeneralMedicine"] = "GENERAL_MEDICINE",
        ["Emergency"] = "EMERGENCY",
        ["Cardiology"] = "CARDIOLOGY",
        ["Surgery"] = "SURGERY",
        ["Pediatrics"] = "PEDIATRICS",
    };

    public static string ToApiDepartment(string scenarioDepartment)
    {
        if (ScenarioToApi.TryGetValue(scenarioDepartment, out var apiValue))
            return apiValue;

        throw new InvalidOperationException(
            $"Unknown scenario department '{scenarioDepartment}'. Expected one of: {string.Join(", ", ScenarioToApi.Keys)}.");
    }
}
