from typing import Dict, Sequence, Tuple

from .mappers import (
    DotNetSphinxMapper,
    PythonSphinxMapper,
    GoSphinxMapper,
    JavaScriptSphinxMapper,
)

DEFAULT_FILE_PATTERNS = {
    "python": ["*.py", "*.pyi"],
    "dotnet": ["project.json", "*.csproj", "*.vbproj"],
    "go": ["*.go"],
    "javascript": ["*.js"],
}


DEFAULT_IGNORE_PATTERNS = {
    "dotnet": ["*toc.yml", "*index.yml"],
    "python": ["*migrations*"],
    "go": ["_test.go"],
}


LANGUAGE_MAPPERS = {
    "python": PythonSphinxMapper,
    "dotnet": DotNetSphinxMapper,
    "go": GoSphinxMapper,
    "javascript": JavaScriptSphinxMapper,
}


#: describes backend requirements in form
#: {'backend name': (('1st package name in pypi', '1st package import name'), ...)}
LANGUAGE_REQUIREMENTS: Dict[str, Sequence[Tuple[str, str]]] = {
    "python": (),
    "javascript": (),
    "go": (("sphinxcontrib-golangdomain", "sphinxcontrib.golangdomain"),),
    "dotnet": (("sphinxcontrib-dotnetdomain", "sphinxcontrib.dotnetdomain"),),
}
