#
# Module services
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.

api_platform:
  mapping:
    paths:
      - '%kernel.project_dir%/var/run/classes/QSL/Roulette/Model'

services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: true

  # API

  # /profiles/{profile_id}/roulette_spins
  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\OutputTransformerInterface: '@QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\OutputTransformer'
  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\OutputTransformer: ~
  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\InputTransformerInterface: '@QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\InputTransformer'
  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\Transformer\InputTransformer: ~

  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\SubExtension\SubExtension:
    tags: [!php/const XLite\API\Extension\ItemSubExtension\ItemSubExtensionInterface::ITEM_SUB_EXTENSION_TAG, !php/const XLite\API\Extension\CollectionSubExtension\CollectionSubExtensionInterface::COLLECTION_SUB_EXTENSION_TAG]

  xcart.api.roulette_spin.controller:
    class: QSL\Roulette\Controller\API\RouletteSpin\Post
    arguments:
      $repository: '@xcart.repository.profile'

  QSL\Roulette\API\Endpoint\ProfileRouletteSpin\SubIriConverter\SubIriConverter:
    tags: [!php/const XCart\Framework\ApiPlatform\Core\Bridge\Symfony\Routing\SubIriConverter\SubIriFromItemConverterInterface::SUB_IRI_FROM_ITEM_CONVERTER_TAG]
