import os

class Settings:
    DB_HOST: str = os.getenv("DB_HOST", "postgres")
    DB_PORT: int = int(os.getenv("DB_PORT", "5432"))
    DB_USER: str = os.getenv("DB_USER", "aissa")
    DB_PASSWORD: str = os.getenv("DB_PASSWORD", "Foodlinkk#2026")
    DB_NAME: str = os.getenv("DB_NAME", "foodlinkk")
    OLLAMA_URL: str = os.getenv("OLLAMA_URL", "http://10.4.7.19:11434")
    OLLAMA_MODEL: str = os.getenv("OLLAMA_MODEL", "qwen3:8b")
    TOOLS_API_URL: str = os.getenv("TOOLS_API_URL", "http://tools-api:8700")
    HERMAN_ORCHESTRATOR_URL: str = os.getenv("HERMAN_ORCHESTRATOR_URL", "http://10.4.7.19:8090")
    WHISPER_API_URL: str = os.getenv("WHISPER_API_URL", "http://10.4.7.19:8877/v1/audio/transcriptions")
    WHISPER_MODEL: str = os.getenv("WHISPER_MODEL", "Systran/faster-whisper-base")
    WHISPER_LANGUAGE: str = os.getenv("WHISPER_LANGUAGE", "nl")
    HERMES_BUILD_URL: str = os.getenv("HERMES_BUILD_URL", "http://10.4.7.27:8798")
    CHROMA_HOST: str = os.getenv("CHROMA_HOST", "chroma")
    CHROMA_PORT: int = int(os.getenv("CHROMA_PORT", "8000"))
    MINIO_ENDPOINT: str = os.getenv("MINIO_ENDPOINT", "minio:9000")

    @property
    def database_dsn(self) -> str:
        return (
            f"host={self.DB_HOST} port={self.DB_PORT} dbname={self.DB_NAME} "
            f"user={self.DB_USER} password={self.DB_PASSWORD}"
        )

settings = Settings()
