services:
  _defaults:
    autowire: true
    autoconfigure: true

  # get one by id (compact)
  xcart.api.storefront.product.compact.data_provider.item.get_one_by_id:
    class: XCart\Bundle\APIPlatformBridgeBundle\API\DataProvider\Item\DataProvider
    arguments:
      $classes: [XCart\API\Entity\Storefront\Product\Compact]
      $action: '@xcart.logic.storefront.product.get_one_by_id.action'
      $requestAssembler: '@xcart.api.storefront.product.compact.data_provider.item.request.assembler'
      $responseAssembler: '@xcart.api.storefront.product.compact.data_provider.item.response.assembler'
      $operationNames: [get]

  # get one by id (detailed)
  xcart.api.storefront.product.detailed.data_provider.item.get_one_by_id:
    class: XCart\Bundle\APIPlatformBridgeBundle\API\DataProvider\Item\DataProvider
    arguments:
      $classes: [XCart\API\Entity\Storefront\Product\Detailed]
      $action: '@xcart.logic.storefront.product.get_one_by_id.action'
      $requestAssembler: '@xcart.api.storefront.product.detailed.data_provider.item.request.assembler'
      $responseAssembler: '@xcart.api.storefront.product.detailed.data_provider.item.response.assembler'
      $operationNames: [get]

  # get detailed one by clean url
  xcart.api.storefront.product.detailed.data_provider.item.get_by_clean_url:
    class: XCart\Bundle\APIPlatformBridgeBundle\API\DataProvider\Item\DataProvider
    arguments:
      $classes: [XCart\API\Entity\Storefront\Product\Detailed]
      $action: '@xcart.logic.storefront.product.get_one_by_clean_url.action'
      $requestAssembler: '@xcart.api.storefront.product.detailed.data_provider.item.request.assembler.get_one_by_clean_url'
      $responseAssembler: '@xcart.api.storefront.product.detailed.data_provider.item.response.assembler'
      $operationNames: [getByCleanURL]

  xcart.api.storefront.product.detailed.data_provider.item.request.assembler.get_one_by_clean_url:
    class: XCart\API\Endpoint\Storefront\Product\Detailed\GetOneByCleanURL\Assembler\RequestAssembler
    arguments:
      $requestFactory: '@XCart\Factory\Logic\Action\Storefront\Product\Detailed\GetOneByCleanURL\DTO\RequestInterface'

  XCart\Factory\Logic\Action\Storefront\Product\Detailed\GetOneByCleanURL\DTO\RequestInterface: '@XCart\Factory\Logic\Action\Storefront\Product\Detailed\GetOneByCleanURL\DTO\Request'
  XCart\Factory\Logic\Action\Storefront\Product\Detailed\GetOneByCleanURL\DTO\Request:
    class: XCart\Factory\Logic\Action\Storefront\Product\Detailed\GetOneByCleanURL\DTO\Request

