<?php
declare(strict_types=1);

/**
 * Customer Portal configuration. Separate from Staff Portal.
 * Copy values into config.local.php to override without editing this file.
 */
$default = [
    'app' => [
        'name' => 'AOSWARE Customer Portal',
        'env' => 'local',
        'debug' => true,
        'base_path' => '/crm/customer-portal',
        'timezone' => 'America/New_York',
        'session_name' => 'AOSWARE_CUSTOMER',
        'session_lifetime' => 28800,
    ],
    'db' => [
        'host' => '127.0.0.1',
        'port' => 3306,
        'name' => 'crm',
        'user' => 'root',
        'pass' => '',
        'charset' => 'utf8mb4',
    ],
    'security' => [
        'login_max_attempts' => 8,
        'login_window_minutes' => 15,
        'password_min_length' => 8,
        'csrf_key' => 'aosware_customer_csrf',
    ],
];

$localFile = __DIR__ . '/config.local.php';
if (is_file($localFile)) {
    $local = require $localFile;
    if (is_array($local)) {
        $default = array_replace_recursive($default, $local);
    }
}

return $default;
