<?php

declare(strict_types=1);

namespace App\Framework\Notification\ValueObjects;

/**
 * Supported notification delivery channels
 */
enum NotificationChannel: string
{
    case DATABASE = 'database';
    case EMAIL = 'email';
    case PUSH = 'push';
    case SMS = 'sms';
    case WEBHOOK = 'webhook';
    case WHATSAPP = 'whatsapp';
    case TELEGRAM = 'telegram';

    public function isRealtime(): bool
    {
        return match ($this) {
            self::DATABASE, self::PUSH, self::WHATSAPP, self::TELEGRAM => true,
            self::EMAIL, self::SMS, self::WEBHOOK => false,
        };
    }

    public function requiresExternalService(): bool
    {
        return match ($this) {
            self::EMAIL, self::SMS, self::WEBHOOK, self::WHATSAPP, self::TELEGRAM => true,
            self::DATABASE, self::PUSH => false,
        };
    }
}
