parameters:
  commerce_cart_api:
    use_cart_token_session: false
    normalized_entity_references:
      - order_items
      - purchased_entity
services:
  commerce_cart_api.normalizer.field_item:
    class: Drupal\commerce_cart_api\Normalizer\FieldItemNormalizer
    arguments: ['@current_route_match']
    tags:
      - { name: normalizer, priority: 8 }

  commerce_cart_api.normalizer.field:
    class: Drupal\commerce_cart_api\Normalizer\FieldNormalizer
    arguments: ['@current_route_match']
    tags:
      - { name: normalizer, priority: 9 }

  commerce_cart_api.normalizer.entity_references:
    class: Drupal\commerce_cart_api\Normalizer\EntityReferenceNormalizer
    arguments: ['@entity.repository', '@current_route_match', '%commerce_cart_api%']
    tags:
      - { name: normalizer, priority: 9 }

  access_check.cart_api:
    class: Drupal\commerce_cart_api\Access\CartApiAccessCheck
    arguments: ['@commerce_cart.cart_provider']
    tags:
      - { name: access_check, applies_to: _cart_api }

  commerce_cart_api.routing_alter_subscriber:
    class: Drupal\commerce_cart_api\EventSubscriber\RoutingAlterSubscriber
    tags:
      - { name: 'event_subscriber' }

  commerce_cart_api.field_access:
    class: Drupal\commerce_cart_api\FieldAccess
    arguments: ['@current_route_match']
