services:
  _defaults:
    autoconfigure: true
  html_response.big_pipe_subscriber:
    class: Drupal\big_pipe\EventSubscriber\HtmlResponseBigPipeSubscriber
    arguments: ['@big_pipe']
  placeholder_strategy.big_pipe:
    class: Drupal\big_pipe\Render\Placeholder\BigPipeStrategy
    arguments: ['@session_configuration', '@request_stack', '@current_route_match']
    tags:
      - { name: placeholder_strategy, priority: 0 }
  big_pipe:
    class: Drupal\big_pipe\Render\BigPipe
    arguments: ['@renderer', '@session', '@request_stack', '@http_kernel', '@event_dispatcher', '@config.factory', '@messenger', '@router.request_context', '@logger.channel.php', '%http.response.debug_cacheability_headers%']
  Drupal\big_pipe\Render\BigPipe: '@big_pipe'
  html_response.attachments_processor.big_pipe:
    public: false
    class: \Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor
    decorates: html_response.attachments_processor
    arguments: ['@html_response.attachments_processor.big_pipe.inner', '@asset.resolver', '@config.factory', '@asset.css.collection_renderer', '@asset.js.collection_renderer', '@request_stack', '@renderer', '@module_handler', '@language_manager']

  route_subscriber.no_big_pipe:
    class: Drupal\big_pipe\EventSubscriber\NoBigPipeRouteAlterSubscriber
  http_middleware.big_pipe:
    class: \Drupal\big_pipe\StackMiddleware\ContentLength
    tags:
      # Must run after the content_length middleware.
      - { name: http_middleware, priority: 150 }
