<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Factories;

use apexl\Io\interfaces\HasGeneralSearchInterface;
use apexl\Io\services\GeneralSearchLoaderConditionCollectionBuilder;
use DI\Container;

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

    public function make(HasGeneralSearchInterface $hasGeneralSearch): GeneralSearchLoaderConditionCollectionBuilder
    {
        return $this->container->make(GeneralSearchLoaderConditionCollectionBuilder::class, [
            'entity' => $hasGeneralSearch,
        ]);
    }
}