<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Factories;

use apexl\Io\includes\Entity;
use apexl\Io\modules\tabulator\Services\TabulatorColumnFieldNameResolver;
use DI\Container;
use DI\DependencyException;
use DI\NotFoundException;

final readonly class TabulatorColumnFieldNameResolverFactory
{
    public function __construct(private Container $container) {}

    /**
     * @throws DependencyException
     * @throws NotFoundException
     */
    public function make(Entity $entity): TabulatorColumnFieldNameResolver
    {
        return $this->container->make(TabulatorColumnFieldNameResolver::class, [
            'entity' => $entity
        ]);
    }
}