from pathlib import Path
from split_settings.tools import include
import environ

BASE_DIR = Path(__file__).resolve().parent.parent.parent
env = environ.Env()
env.read_env(BASE_DIR / ".env")

include("base.py")


ENV_MODE_MAPPINGS = {
    "development": "development.py",
    "testing": "testing.py",
    "production": "production.py",
}

# include environment specific settings
env_mode = env.str("ENV_MODE", default="development")

include(ENV_MODE_MAPPINGS.get(env_mode, "development.py"))
