"""HomoglyphNormalizer --- maps Cyrillic/Greek lookalikes to ASCII."""

from __future__ import annotations

from .base import BaseNormalizer


class HomoglyphNormalizer(BaseNormalizer):
    """Maps visually similar Cyrillic and Greek characters to ASCII equivalents.

    Defeats homoglyph attacks where attackers use Cyrillic 'a' (U+0430) instead
    of Latin 'a' to evade pattern matching. NFKC normalization does NOT handle
    these --- they are distinct scripts, not compatibility variants.
    """

    def to_normalizer_spec(self) -> dict:
        return {"type": "homoglyph", "config": {}}
