<?php

/**
 * Notifier Configuration
 *
 * Copy this file to config.php and fill in your values.
 * NEVER commit config.php to version control.
 */

return [
    // Telegram - Production
    'telegram' => [
        'bot_token' => 'YOUR_BOT_TOKEN_HERE',
        'chat_id'   => 'YOUR_CHAT_ID_HERE',
        'timeout'   => 10,  // HTTP timeout in seconds
    ],

    // Telegram - Test environment (for "Test Send" feature)
    'telegram_test' => [
        'bot_token' => 'YOUR_TEST_BOT_TOKEN_HERE',  // Can be same bot
        'chat_id'   => 'YOUR_TEST_CHAT_ID_HERE',    // Different group/chat
    ],

    // UI + API Authentication
    'auth' => [
        'password'  => 'YOUR_PASSWORD_HERE',           // Will be hashed
        'api_token' => 'YOUR_RANDOM_API_TOKEN_HERE',   // For API access (32+ chars)
    ],

    // Display timezone (all UI times shown in this timezone)
    'display_timezone' => 'America/Mexico_City',
    // Public base URL (used for confirmation links)
    'app_url' => 'https://your-domain.com/notifier',

    // File uploads
    'upload_max_size' => 5 * 1024 * 1024,  // 5MB
    'upload_path'     => __DIR__ . '/uploads',

    // Session
    'session_lifetime' => 30 * 24 * 60 * 60,  // 30 days

    // Database
    'database' => [
        'path' => __DIR__ . '/database.sqlite',
    ],

    // Scheduler
    'scheduler' => [
        'lock_file'     => '/tmp/notifier.lock',
        'lock_timeout'  => 300,   // Seconds before stale lock is broken
        'batch_size'    => 50,    // Max jobs per cron run
        'rate_limit_ms' => 100,   // Delay between Telegram sends
    ],

    // Cron health checks
    'cron_health' => [
        'max_age_minutes' => 10,
        'email_to' => 'contact@maurosicard.com',
        'from' => 'notifier@localhost',
        'subject_prefix' => '[Notifier]',
        'method' => 'mail', // mail | mailersend
    ],

    // MailerSend (for cron health email alerts)
    'mailer_send' => [
        'api_key' => 'YOUR_MAILERSEND_API_KEY',
        'from_email' => 'notifier@your-verified-domain.com',
        'from_name' => 'Notifier',
    ],

    // Alerts (stub for future email integration)
    'alerts' => [
        'enabled' => false,
        'method'  => 'email',  // 'email' | 'webhook' | 'telegram'
        'config'  => [
            // Future: SendGrid, Resend, Mailgun, etc.
        ],
    ],
];
