private function configureTabElementFactory(ContainerBuilder $container): void
    {
        $definition = $container->findDefinition(TabElementFactory::class);
        if (!$definition) {
            return;
        }

        $bundles = $container->getParameter('kernel.bundles');

        if (!isset($bundles['ContaoBootstrapGridBundle'])) {
            return;
        }

        $definition->setArgument(5, new Reference('contao_bootstrap.grid.grid_provider'));
    }