<?php

return [
    'app_name' => getenv('APP_NAME') ?: 'Volley Manager',
    'env' => getenv('APP_ENV') ?: 'local',
    'debug' => filter_var(getenv('APP_DEBUG') ?: true, FILTER_VALIDATE_BOOL),
    'jwt_secret' => getenv('JWT_SECRET') ?: 'change-me-in-production',
    'jwt_ttl' => (int) (getenv('JWT_TTL') ?: 86400),
    'cors_origin' => getenv('CORS_ORIGIN') ?: '*',
    'db' => [
        'host' => getenv('DB_HOST') ?: '127.0.0.1',
        'port' => getenv('DB_PORT') ?: '3306',
        'database' => getenv('DB_DATABASE') ?: 'volley_tournaments',
        'username' => getenv('DB_USERNAME') ?: 'volley',
        'password' => getenv('DB_PASSWORD') ?: 'volley',
        'charset' => 'utf8mb4',
    ],
];
