namespace ROLAC.API.Entities;

/// <summary>
/// The three IRS Form 990 Part IX functional-expense columns. Stored verbatim in
/// Ministry.DefaultFunctionalClass and ExpenseLine.FunctionalClass.
/// </summary>
public static class FunctionalClasses
{
    public const string Program           = "Program";
    public const string ManagementGeneral = "ManagementGeneral";
    public const string Fundraising       = "Fundraising";

    public static readonly IReadOnlyList<string> All = [Program, ManagementGeneral, Fundraising];

    /// <summary>Returns the value if valid, otherwise Program (the safe default).</summary>
    public static string Normalize(string? value) =>
        value is not null && All.Contains(value) ? value : Program;
}
