<?php

declare(strict_types=1);

namespace Plugin\tnt_stabila_shop\src\Enums;

use Plugin\tnt_stabila_shop\src\Helper\EnumUtility;

enum PluginSettings: string
{
    use EnumUtility;

    case PERFORMANCE_BOOSTER       = '{"name": "performanceBooster", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case QUALITY_BOOSTER           = '{"name": "qualityBooster", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case SENTRY_DSN                = '{"name": "sentryDsn", "type": "' . SettingType::STRING->value
        . '", "defaultValue": ""}';
    case AUTO_REPORT               = '{"name": "autoReport", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case MAIL_NOTIFICATIONS        = '{"name": "mailNotifications", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case ALERT_MIN_SEVERITY        = '{"name": "alertMinSeverity", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case SALES_ANOMALY_THRESHOLD   = '{"name": "salesAnomalyThreshold", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case ALERT_QUIET_FROM          = '{"name": "alertQuietFrom", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case ALERT_QUIET_UNTIL         = '{"name": "alertQuietUntil", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case CHANNEL_MAIL_MIN_SEVERITY = '{"name": "channelMailMinSeverity", "type": "' . SettingType::INT->value
        . '", "defaultValue": "0"}';
    case CHANNEL_WEBHOOK_URL       = '{"name": "channelWebhookUrl", "type": "' . SettingType::STRING->value
        . '", "defaultValue": ""}';
    // Default HIGH (RANK_ERROR = 3): with a URL set, the webhook fires only from
    // "error" up. Empty URL keeps the channel disabled regardless of this rank.
    case CHANNEL_WEBHOOK_MIN_SEVERITY = '{"name": "channelWebhookMinSeverity", "type": "' . SettingType::INT->value
        . '", "defaultValue": "3"}';
}
