<?php

namespace ContainerBnDMNJc;

use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;

/*
 * @internal This class has been auto-generated by the Symfony Dependency Injection Component.
 */
class getMassiveSearch_ObjectToDocumentConverterService extends App_KernelProdContainer
{
    /*
     * Gets the private 'massive_search.object_to_document_converter' shared service.
     *
     * @return \Massive\Bundle\SearchBundle\Search\ObjectToDocumentConverter
     */
    public static function do($container, $lazyLoad = true)
    {
        $a = ($container->services['sulu_document_manager.document_manager'] ?? self::getSuluDocumentManager_DocumentManagerService($container));

        if (isset($container->privates['massive_search.object_to_document_converter'])) {
            return $container->privates['massive_search.object_to_document_converter'];
        }
        $b = ($container->services['event_dispatcher'] ?? self::getEventDispatcherService($container));

        if (isset($container->privates['massive_search.object_to_document_converter'])) {
            return $container->privates['massive_search.object_to_document_converter'];
        }
        $c = ($container->services['sulu_category.category_manager'] ?? self::getSuluCategory_CategoryManagerService($container));

        if (isset($container->privates['massive_search.object_to_document_converter'])) {
            return $container->privates['massive_search.object_to_document_converter'];
        }
        $d = ($container->services['sulu_tag.tag_manager'] ?? self::getSuluTag_TagManagerService($container));

        if (isset($container->privates['massive_search.object_to_document_converter'])) {
            return $container->privates['massive_search.object_to_document_converter'];
        }
        $e = new \Massive\Bundle\SearchBundle\Search\Converter\ConverterManager();

        $container->privates['massive_search.object_to_document_converter'] = $instance = new \Massive\Bundle\SearchBundle\Search\ObjectToDocumentConverter(($container->privates['sulu_search.search.factory'] ??= new \Sulu\Bundle\SearchBundle\Search\Factory()), ($container->privates['massive_search.metadata.field_evaluator'] ?? $container->load('getMassiveSearch_Metadata_FieldEvaluatorService')), $e);
        $f = ($container->services['massive_search.search_manager'] ?? $container->load('getMassiveSearch_SearchManagerService'));

        $e->addConverter('date', new \Massive\Bundle\SearchBundle\Search\Converter\Types\DateConverter());
        $e->addConverter('json', new \Massive\Bundle\SearchBundle\Search\Converter\Types\JsonConverter());
        $e->addConverter('structure', new \Sulu\Bundle\SearchBundle\Search\Converter\StructureConverter($a, $f, $instance, $b));
        $e->addConverter('category', new \Sulu\Bundle\CategoryBundle\Search\Converter\CategoryConverter($c, $f, $instance, $b));
        $e->addConverter('tags', new \Sulu\Bundle\TagBundle\Search\TagsConverter($d));

        return $instance;
    }
}
