<?php

namespace Common\Helpers;

require_once __DIR__ . '/../../discord/DiscordSender.php';
require_once __DIR__ . '/../../telegram/TelegramSender.php';

use Discord\DiscordSender;
use Telegram\TelegramSender;

class SenderFactory
{
    public static function create(string $platform): object
    {
        return match ($platform) {
            'discord' => new DiscordSender(),
            'telegram' => new TelegramSender(),
            default => throw new \InvalidArgumentException("Plataforma no soportada: $platform"),
        };
    }

    public static function getPlatforms(): array
    {
        return ['discord', 'telegram'];
    }
}
