services:
  # The following 2 services are from the core patch in https://www.drupal.org/project/drupal/issues/2946333#comment-13129737
  access_check.entity.layout_builder_translation_access:
    class: Drupal\layout_builder_st\Access\LayoutBuilderTranslationAccessCheck
    tags:
      - { name: access_check, applies_to: _layout_builder_translation_access }
  layout_builder.translate_block_component_subscriber:
    class: Drupal\layout_builder_st\EventSubscriber\ComponentPluginTranslate
    arguments: ['@language_manager', '@current_route_match']
    tags:
      - { name: event_subscriber }
  # The route subscriber service is only needed to alter core layout_builder routes.
  layout_builder.route_subscriber:
    class: Drupal\layout_builder_st\Routing\RouteSubscriber
    tags:
      - { name: event_subscriber }
  # Override the class resolver to so that InlineBlockEntityOperations can be swapped to the extend version.
  class_resolver:
    class: Drupal\layout_builder_st\DependencyInjection\ClassResolver
    calls:
      - [setContainer, ['@service_container']]
  plugin.manager.element_info:
    class: Drupal\layout_builder_st\ElementManager
    arguments: ['@container.namespaces', '@cache.discovery', '@cache_tags.invalidator', '@module_handler', '@theme.manager']
