<?php

/**
 * ITSWEBER CMS – Application Configuration
 *
 * © Benjamin Weber / ITSWEBER – www.itsweber.de
 */
return [
    'name'     => 'ITSWEBER CMS',
    'version'  => '3.1.3',
    'debug'    => false,
    'timezone' => 'Europe/Berlin',
    'locale'   => 'de',
    'charset'  => 'UTF-8',

    // URL settings
    'base_url' => '',  // Set by installer or manually

    // Upload settings
    'upload' => [
        'max_size'        => 10 * 1024 * 1024, // 10MB
        'allowed_types'   => ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'pdf', 'doc', 'docx'],
        'image_types'     => ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg'],
        'upload_path'     => 'public/uploads',
    ],

    // Session settings
    'session' => [
        'lifetime' => 7200, // 2 hours
        'name'     => 'iw_session',
    ],

    // ── Mail settings (used by App\Services\Mailer) ─────────────────────────
    //
    // transport:
    //   'mail'  – PHP's built-in mail() (default, works on most shared hosting)
    //   'smtp'  – Direct SMTP connection (recommended for reliable delivery)
    //
    // smtp_encryption:
    //   'tls'   – STARTTLS on plain connection (recommended, port 587)
    //   'ssl'   – Implicit TLS from the start (port 465)
    //   'none'  – No encryption (port 25, not recommended in production)
    //
    'mail' => [
        'transport'       => 'mail',                // 'mail' | 'smtp'
        'from_address'    => 'noreply@example.com', // Set to your domain
        'from_name'       => 'ITSWEBER CMS',
        'reply_to'        => '',                    // Defaults to from_address if empty

        // SMTP-specific options (only used when transport = 'smtp')
        'smtp_host'       => '',                    // e.g. 'smtp.gmail.com'
        'smtp_port'       => 587,                   // 587 (TLS), 465 (SSL), 25 (plain)
        'smtp_username'   => '',
        'smtp_password'   => '',
        'smtp_encryption' => 'tls',                 // 'tls' | 'ssl' | 'none'
    ],
];
