# Path: sanskrit_parser/base/sanskrit_base.py
# class SanskritImmutableString(SanskritString):
#     """ Immutable version of SanskritString
#     """
#     def __init__(self, thing=None, encoding=None, unicode_encoding='utf-8'):
#         super().__init__(thing, encoding, unicode_encoding)
# 
#     def __hash__(self):
#         return hash(str(self))
# 
#     def __eq__(self, other):
#         return str(self) == str(other)
# 
#     def __ne__(self, other):
#         return str(self) != str(other)
# 
# SLP1 = sanscript.SLP1
# 
# Path: sanskrit_parser/generator/operations.py
# def adesha(a, f, t):
#     p = str(f).find(str(a))
#     if p != -1:
#         return str(t)[p]
#     else:
#         return a
# 
# Path: sanskrit_parser/generator/maheshvara.py
# def isInPratyahara(p, s):
# def isSavarna(p, s):


from sanskrit_parser.base.sanskrit_base import SanskritImmutableString, SLP1
from .operations import adesha
from .maheshvara import ms, isInPratyahara, isSavarna
from sanskrit_parser.generator.pratipadika import *  # noqa: F403
        "danta": "dat",
        "nAsikA": "nas",
        "mAsa": "mAs",
        "hfdaya": "hfd",
        "niSA": "niS",
        "asfj": "asan",
        "yUza": "yUzan",
        "doza": "dozan",
        "yakft": "yakan",
        "Sakft": "Sakan",
        "udaka": "udan",
        "Asya": "Asan",
        }
    if s in d:
        return d[s]
    else:
        return s


# FIXME - this is better. debug in SK228
def pAdAdi_AdeSa_r(s):
    d = {
        "pAda": pad,    # noqa: F405
        "danta": dat,    # noqa: F405
        "nAsikA": nas,    # noqa: F405
        "mAsa": mAs,    # noqa: F405
        "hfdaya": hfd,    # noqa: F405
        "niSA": niS,    # noqa: F405
        "asfj": asan,    # noqa: F405
        "yUza": yUzan,    # noqa: F405

# Path: sanskrit_parser/base/sanskrit_base.py
# class SanskritImmutableString(SanskritString):
#     """ Immutable version of SanskritString
#     """
#     def __init__(self, thing=None, encoding=None, unicode_encoding='utf-8'):
#         super().__init__(thing, encoding, unicode_encoding)
# 
#     def __hash__(self):
#         return hash(str(self))
# 
#     def __eq__(self, other):
#         return str(self) == str(other)
# 
#     def __ne__(self, other):
#         return str(self) != str(other)
# 
# SLP1 = sanscript.SLP1
# 
# Path: sanskrit_parser/generator/operations.py
# def adesha(a, f, t):
#     p = str(f).find(str(a))
#     if p != -1:
#         return str(t)[p]
#     else:
#         return a
# 
# Path: sanskrit_parser/generator/maheshvara.py
# def isInPratyahara(p, s):
# def isSavarna(p, s):


# Path: sanskrit_parser/generator/paribhasha.py
from sanskrit_parser.base.sanskrit_base import SanskritImmutableString, SLP1
from .operations import adesha
from .maheshvara import ms, isInPratyahara, isSavarna
from sanskrit_parser.generator.pratipadika import *  # noqa: F403

        "danta": "dat",
        "nAsikA": "nas",
        "mAsa": "mAs",
        "hfdaya": "hfd",
        "niSA": "niS",
        "asfj": "asan",
        "yUza": "yUzan",
        "doza": "dozan",
        "yakft": "yakan",
        "Sakft": "Sakan",
        "udaka": "udan",
        "Asya": "Asan",
        }
    if s in d:
        return d[s]
    else:
        return s


# FIXME - this is better. debug in SK228
def pAdAdi_AdeSa_r(s):
    d = {
        "pAda": pad,    # noqa: F405
        "danta": dat,    # noqa: F405
        "nAsikA": nas,    # noqa: F405
        "mAsa": mAs,    # noqa: F405
        "hfdaya": hfd,    # noqa: F405
        "niSA": niS,    # noqa: F405
        "asfj": asan,    # noqa: F405
        "yUza": yUzan,    # noqa: F405

        "doza": dozan,    # noqa: F405