import os
from pydantic_settings import BaseSettings
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()

class Settings(BaseSettings):
    database_url: str = os.getenv("DATABASE_URL")
    secret_key: str = os.getenv("SECRET_KEY")
    algorithm: str = os.getenv("ALGORITHM")
    BASE_URL: str
    encryption_key: str
    sendinblue_api_key: str
    mail_to: str 
    mail_from: str
    access_token_expire_minutes: int
    refresh_token_expire_minutes: int

    class Config:
        env_file = ".env"  # Correct the env_file configuration (remove the comma)
        extra = "forbid"   # Forbid any extra environment variables

# Instantiate the settings object
settings = Settings()
