import os
from dotenv import load_dotenv

load_dotenv()

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY', 'aufmass-dev-key-change-in-production')
    SQLALCHEMY_DATABASE_URI = os.environ.get(
        'DATABASE_URL',
        'postgresql://aufmass:aufmass_secret@localhost:5432/aufmassweb'
    )
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    UPLOAD_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'uploads')
    EXPORT_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data', 'exports')
    MAX_CONTENT_LENGTH = 16 * 1024 * 1024
    REGISTRATION_ENABLED = os.environ.get('REGISTRATION_ENABLED', 'false').lower() in ('true', '1', 'yes')

