<?php

return [
    'alert_recipients' => [
        'mail' => env('STORAGE_ALERT_EMAIL'),
    ],

    'queue_failure_alerts' => env('STORAGE_QUEUE_FAILURE_ALERTS', true),

    'capacity_thresholds' => [
        'warning' => (int) env('STORAGE_CAPACITY_WARNING', 75),
        'critical' => (int) env('STORAGE_CAPACITY_CRITICAL', 90),
    ],

    'monitor' => [
        'lock_seconds' => (int) env('STORAGE_MONITOR_LOCK_SECONDS', 300),
        'cache_minutes' => (int) env('STORAGE_MONITOR_CACHE_MINUTES', 15),
    ],

    'archive' => [
        'grace_days' => (int) env('STORAGE_ARCHIVE_GRACE_DAYS', 3),
        'lock_seconds' => (int) env('STORAGE_ARCHIVE_LOCK_SECONDS', 1800),
        'event_lock_seconds' => (int) env('STORAGE_ARCHIVE_EVENT_LOCK_SECONDS', 3600),
        'chunk' => (int) env('STORAGE_ARCHIVE_CHUNK', 25),
        'max_dispatch' => (int) env('STORAGE_ARCHIVE_MAX_DISPATCH', 100),
    ],

    'queue_health' => [
        'lock_seconds' => (int) env('STORAGE_QUEUE_HEALTH_LOCK_SECONDS', 120),
        'cache_minutes' => (int) env('STORAGE_QUEUE_HEALTH_CACHE_MINUTES', 10),
        'stalled_minutes' => (int) env('STORAGE_QUEUE_STALLED_MINUTES', 10),
        'pending_event_minutes' => (int) env('STORAGE_QUEUE_PENDING_EVENT_MINUTES', 8),
        'pending_event_threshold' => (int) env('STORAGE_QUEUE_PENDING_EVENT_THRESHOLD', 5),
        'failed_event_minutes' => (int) env('STORAGE_QUEUE_FAILED_EVENT_MINUTES', 30),
        'failed_event_threshold' => (int) env('STORAGE_QUEUE_FAILED_EVENT_THRESHOLD', 2),
        'guest_alert_ttl' => (int) env('STORAGE_QUEUE_GUEST_ALERT_TTL', 30),
        'thresholds' => [
            'default' => [
                'warning' => (int) env('STORAGE_QUEUE_DEFAULT_WARNING', 100),
                'critical' => (int) env('STORAGE_QUEUE_DEFAULT_CRITICAL', 300),
            ],
            'media-storage' => [
                'warning' => (int) env('STORAGE_QUEUE_MEDIA_STORAGE_WARNING', 200),
                'critical' => (int) env('STORAGE_QUEUE_MEDIA_STORAGE_CRITICAL', 500),
            ],
            'media-security' => [
                'warning' => (int) env('STORAGE_QUEUE_MEDIA_SECURITY_WARNING', 50),
                'critical' => (int) env('STORAGE_QUEUE_MEDIA_SECURITY_CRITICAL', 150),
            ],
        ],
    ],
];
