using System.Collections.Frozen;

namespace GmRelay.Shared.Domain;

public static class SessionStatus
{
    public const string Planned = "Planned";
    public const string ConfirmationSent = "ConfirmationSent";
    public const string Confirmed = "Confirmed";
    public const string Cancelled = "Cancelled";

    public static IReadOnlySet<string> All { get; } =
        new[] { Planned, ConfirmationSent, Confirmed, Cancelled }
            .ToFrozenSet(StringComparer.Ordinal);

    public static bool IsKnown(string status) => All.Contains(status);

    public static bool IsCancelled(string status) =>
        string.Equals(status, Cancelled, StringComparison.Ordinal);
}
