<?php

declare(strict_types=1);

namespace Apexl\Io\Notifier\Factories;

use Apexl\Io\Notifier\Interfaces\NotifierInterface;
use DI\Container;

class NotifierFactory
{
    public function __construct(private Container $container) {}

    /**
     * @param class-string<NotifierInterface> $notifier
     */
    public function make(string $notifier, array $params = []): NotifierInterface
    {
        \Apexl\Io\assertInstanceOf($notifier, NotifierInterface::class);

        return $this->container->make($notifier, $params);
    }
}
