namespace Baya.Domain.Entities.Bnpl;

/// <summary>
/// The closed set of supported <c>bnpl_transactions.provider_code</c> values — each selects one
/// <c>IBnplProvider</c> impl through the resolver. All four Iranian provider-financed BNPLs are uniformly
/// full-upfront / provider-bears-risk / interest-free-to-customer, so they share the mock behaviour; a real
/// system maps each to its concrete adapter. Persisted as these stable snake_case codes.
/// </summary>
public static class BnplProviderCodes
{
    public const string SnappPay = "snapppay";
    public const string Digipay = "digipay";
    public const string Tara = "tara";
    public const string TorobPay = "torobpay";

    /// <summary>Balinyaar's in-house installment plan. Modelled identically to the external providers
    /// (net-of-fee card payment, provider-financed) so it selects the same mock adapter; the distinction is the
    /// financing entity, not the money mechanics.</summary>
    public const string Balinyaar = "balinyaar";

    public static readonly IReadOnlyCollection<string> All = [SnappPay, Digipay, Tara, TorobPay, Balinyaar];

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