"""constants.py"""

# Standard Library
import importlib.resources

# Local
from . import DATA_FOLDER

# Resources
CCCEDICT_PATH = importlib.resources.files("anki_hsk_creator").joinpath("cedict_ts.u8")

# Data folder structure
INPUT = DATA_FOLDER / "input"
INPUT.mkdir(exist_ok=True, parents=True)
OUTPUT = DATA_FOLDER / "output"
OUTPUT.mkdir(exist_ok=True, parents=True)
RESOURCES = DATA_FOLDER / "resources"
RESOURCES.mkdir(exist_ok=True, parents=True)

# File Types
PHRASES_TYPE = ".phrases"
DICT_TYPE = ".dictionary"
DICTATION_TYPE = ".dictation"

# time dalays
WORD = 0.1
COMMA = 0.5
POINT = 1.0

class LANGUAGES:
    """Available laguages for translation"""

    CN = "zh"
    EN = "en"
    ES = "es"
    FR = "fr"
    RU = "ru"
    TR = "tr"
    TH = "th"

    AvailableLanguages = (EN, ES, FR, RU, TR, TH)
    LanguageNames = {
        EN: "English",
        ES: "Spanish",
        FR: "French",
        RU: "Russian",
        TR: "Turkish",
        TH: "Thai",
    }
