<?php
declare( strict_types=1 );

namespace FiboFilters\DI;

use FiboFiltersVendor\Symfony\Component\DependencyInjection\ContainerBuilder;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class ContainerConfiguratorPro
 */
class ContainerConfiguratorPro implements IContainerConfigurator {

	public function get_dump_namespace(): string {
		return 'FiboFiltersGenerated';
	}

	public function get_dump_class_name(): string {
		return 'ProCachedContainer';
	}

	/**
	 * @param ContainerBuilder $container Container.
	 */
	public function configure( ContainerBuilder $container ): ContainerBuilder {
		// Factory for free deps.
		$container->register( IContainerConfigurator::FREE_CONTAINER_SERVICE_SLUG )
			->setSynthetic( true )
			->setPublic( true );

		return $container;
	}

	/* // phpcs:ignore Squiz.PHP.CommentedOutCode.Found
	private function register_free_service( ContainerBuilder $container, string $id ) {
		$container->register( $id )
			->setPublic( true )
			->addArgument( $id )
			->setFactory(
				[
					new Reference( IContainerConfigurator::FREE_CONTAINER_SERVICE_SLUG ),
					'get',
				]
			);
	}
	*/
}
