<?php

declare(strict_types=1);

return [
    'app' => [
        'name' => env('APP_NAME', 'CiviGO.eu'),
        'env' => env('APP_ENV', 'local'),
        'debug' => env('APP_DEBUG', true),
        'url' => env('APP_URL', 'http://127.0.0.1:8088'),
        'locale' => 'bg_BG',
        'timezone' => 'Europe/Sofia',
    ],
    'database' => [
        'host' => env('DB_HOST'),
        'port' => (int) env('DB_PORT', 3306),
        'name' => env('DB_DATABASE'),
        'username' => env('DB_USERNAME'),
        'password' => env('DB_PASSWORD', ''),
        'charset' => 'utf8mb4',
    ],
    'ai' => [
        'api_key' => env('OPENAI_API_KEY'),
        'base_url' => rtrim((string) env('OPENAI_BASE_URL', 'https://api.openai.com/v1'), '/'),
        'model' => env('OPENAI_MODEL', 'gpt-4.1-mini'),
        'timeout' => 25,
    ],
    'mail' => [
        'host' => env('MAIL_HOST'),
        'port' => (int) env('MAIL_PORT', 587),
        'username' => env('MAIL_USERNAME'),
        'password' => env('MAIL_PASSWORD'),
        'from_address' => env('MAIL_FROM_ADDRESS', 'hello@civigo.eu'),
        'from_name' => env('MAIL_FROM_NAME', 'CiviGO.eu'),
        'return_path' => env('MAIL_RETURN_PATH', 'bounces@civigo.eu'),
    ],
    'delivery' => [
        'mode' => env('INSTITUTION_DELIVERY_MODE', 'email'),
        'edelivery_base_url' => env('EDELIVERY_BASE_URL', 'https://edelivery.egov.bg'),
        'require_manual_incoming_number' => true,
    ],
    'security' => [
        'rate_limit_requests' => (int) env('RATE_LIMIT_REQUESTS', 120),
        'rate_limit_seconds' => (int) env('RATE_LIMIT_SECONDS', 60),
        'session_name' => 'civigo_session',
    ],
    'storage' => [
        'documents' => BASE_PATH . '/storage/documents',
        'uploads' => BASE_PATH . '/storage/uploads',
        'logs' => BASE_PATH . '/storage/logs',
    ],
];
