using SIGCM2.Domain.Exceptions;

namespace SIGCM2.Domain.Pricing.Exceptions;

/// <summary>
/// PRC-001 — Thrown when the input text contains any Unicode emoji codepoint.
/// Emoji detection occurs BEFORE normalization. → HTTP 400
/// </summary>
public sealed class EmojiDetectedException : DomainException
{
    /// <summary>The Unicode codepoint value of the first detected emoji rune.</summary>
    public int DetectedCodepoint { get; }

    public EmojiDetectedException(int detectedCodepoint)
        : base($"El texto contiene emojis (U+{detectedCodepoint:X4}), que no son tarifables. Eliminálos antes de continuar.")
    {
        DetectedCodepoint = detectedCodepoint;
    }
}
