using System.Runtime.CompilerServices;

namespace Pgo.Backend.Models;

public enum DvaType
{
    Unknown,
    Zorgaanbieder, // "ZA"
    Basiszorgaanbieder, // "BAZB"
    AanbiederPersoonsdomein // "APD"
}

public static class DvaTypeExtensions
{
    public static DvaType AsDvaType(this string dvaType)
    {
        return dvaType switch
        {
            "ZA" => DvaType.Zorgaanbieder,
            "BAZB" => DvaType.Basiszorgaanbieder,
            "APD" => DvaType.AanbiederPersoonsdomein,
            _ => DvaType.Unknown
        };
    }

    public static string ToString(this DvaType dvaType)
    {
        return dvaType switch
        {
            DvaType.Zorgaanbieder => "ZA",
            DvaType.Basiszorgaanbieder => "BAZB",
            DvaType.AanbiederPersoonsdomein => "APD",
            _ => "Unknown"
        };
    }
}
