services:
  consumer.negotiator:
    class: Drupal\consumers\Negotiator
    arguments: ['@request_stack', '@logger.channel.consumers']
    calls:
      - [setLogger, ['@logger.channel.consumers']]
      - [setEntityStorage, ['@entity_type.manager']]
  consumer.consumer.route_enhancer:
    class: Drupal\consumers\ConsumerRouteEnhancer
    public: false
    arguments:
      - '@consumer.negotiator'
      - '@module_handler'
    tags:
      - { name: route_enhancer }
  consumer.vary_event_subscriber:
    class: Drupal\consumers\EventSubscriber\ConsumerVaryEventSubscriber
    arguments: ['@consumer.negotiator']
    tags:
      - { name: 'event_subscriber' }

  logger.channel.consumers:
    parent: logger.channel_base
    arguments: ['consumers']
