"""
Application settings and configuration
"""
import os
from typing import Optional

class Settings:
    """Application settings class"""
    
    # Application settings
    APP_NAME: str = "MerchantsOfHope"
    APP_VERSION: str = "1.0.0"
    DEBUG: bool = os.getenv("DEBUG", "False").lower() == "true"
    
    # Database settings
    DATABASE_URL: str = os.getenv("DATABASE_URL", "sqlite:///./merchants_of_hope.db")
    
    # Multi-tenant settings
    MULTI_TENANT_ENABLED: bool = True
    TENANT_ID_HEADER: str = "X-Tenant-ID"
    
    # Authentication settings
    SECRET_KEY: str = os.getenv("SECRET_KEY", "dev-secret-key-change-in-production")
    ALGORITHM: str = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
    
    # OIDC settings
    OIDC_ISSUER: Optional[str] = os.getenv("OIDC_ISSUER")
    OIDC_CLIENT_ID: Optional[str] = os.getenv("OIDC_CLIENT_ID")
    OIDC_CLIENT_SECRET: Optional[str] = os.getenv("OIDC_CLIENT_SECRET")
    OIDC_REDIRECT_URI: Optional[str] = os.getenv("OIDC_REDIRECT_URI")
    
    # Security settings
    ALLOWED_HOSTS: list = ["*"]  # Should be configured properly in production
    
    # Compliance settings
    PCI_ENABLED: bool = True
    GDPR_ENABLED: bool = True
    SOC_ENABLED: bool = True
    FEDRAMP_ENABLED: bool = True

settings = Settings()