<?php

declare(strict_types=1);

require_once __DIR__ . '/env.php';
iav_load_env(dirname(__DIR__) . '/.env');

$config = [
    'app' => require __DIR__ . '/app.php',
    'auth' => require __DIR__ . '/auth.php',
    'branding' => require __DIR__ . '/branding.php',
    'database' => require __DIR__ . '/database.php',
    'mail' => require __DIR__ . '/mail.php',
    'security' => require __DIR__ . '/security.php',
];

date_default_timezone_set($config['app']['timezone']);

if ($config['app']['environment'] === 'production') {
    ini_set('display_errors', '0');
    ini_set('log_errors', '1');
}

return $config;
