namespace Baya.Application.Common;

/// <summary>Wire-masking for sensitive-but-displayable identifiers.</summary>
public static class Mask
{
    private const string MaskPrefix = "••••";

    /// <summary>Masks an IBAN to its last four characters (e.g. <c>••••3456</c>) so lists never carry the
    /// full value. Returns the input unchanged when it is null/empty or already ≤4 chars.</summary>
    public static string IbanTail(string iban)
        => string.IsNullOrEmpty(iban) || iban.Length <= 4 ? iban : MaskPrefix + iban[^4..];
}
