from functools import lru_cache

from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    secret_key: str
    admin_user: str
    admin_pass: str
    token_expiry_hours: int = 24
    base_url: str = "https://taller-wox.fitlabs.dev"
    db_path: str = "./leads.db"
    material_dir: str = "./material"
    reports_output_dir: str = "./app/data/reports_output"

    model_config = SettingsConfigDict(env_file=".env", case_sensitive=False, extra="ignore")


@lru_cache
def get_settings() -> Settings:
    return Settings()
