<?php
declare(strict_types=1);

return [
    'email_enabled' => getenv('FLEET_ALERT_EMAIL_ENABLED') !== '0',
    'sms_enabled' => getenv('FLEET_ALERT_SMS_ENABLED') === '1',
    'mail_from' => getenv('FLEET_ALERT_MAIL_FROM') ?: 'noreply@c-ileasing.com',
    'mail_from_name' => getenv('FLEET_ALERT_MAIL_FROM_NAME') ?: 'Fleet Operations',
    // SMTP settings (can be overridden by environment variables)
    'smtp_host' => getenv('FLEET_SMTP_HOST') ?: '',
    'smtp_port' => getenv('FLEET_SMTP_PORT') ?: 587,
    'smtp_user' => getenv('FLEET_SMTP_USER') ?: '',
    'smtp_pass' => getenv('FLEET_SMTP_PASS') ?: '',
    'smtp_secure' => getenv('FLEET_SMTP_SECURE') ?: 'tls',
    'sms_provider' => getenv('FLEET_ALERT_SMS_PROVIDER') ?: 'log',
    'sms_webhook_url' => getenv('FLEET_ALERT_SMS_WEBHOOK_URL') ?: '',
    'sms_api_key' => getenv('FLEET_ALERT_SMS_API_KEY') ?: '',
    'sms_sender' => getenv('FLEET_ALERT_SMS_SENDER') ?: 'FleetOps',
    'app_url' => rtrim((string)(getenv('FLEET_APP_URL') ?: ''), '/'),
];
