services:
  _defaults:
    autowire: true
    autoconfigure: true

  # /attributes_hidden/{attribute_id}/options
  XLite\API\Endpoint\AttributeOption\Hidden\Transformer\OutputTransformerInterface: '@XLite\API\Endpoint\AttributeOption\Hidden\Transformer\OutputTransformer'
  XLite\API\Endpoint\AttributeOption\Hidden\Transformer\OutputTransformer: ~
  XLite\API\Endpoint\AttributeOption\Hidden\Transformer\InputTransformerInterface: '@XLite\API\Endpoint\AttributeOption\Hidden\Transformer\InputTransformer'
  XLite\API\Endpoint\AttributeOption\Hidden\Transformer\InputTransformer: ~

  xcart.api.attribute_option.hidden.global_sub_extension:
    class: XLite\API\SubExtension\AttributeOption\GlobalAttributeOptionSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $operationNames: ['get_option_hidden', 'post_option_hidden', 'put_option_hidden', 'delete_option_hidden', 'get_option_hiddens']
      $pathPrefix: 'attributes_hidden'
    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.attribute_option.hidden.global_sub_iri_converter:
    class: XLite\API\SubIriConverter\AttributeOption\GlobalAttributeOptionSubIriConverter
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $itemRouteName: 'api_attribute options_get_option_hidden_item'
    tags: [!php/const XCart\Framework\ApiPlatform\Core\Bridge\Symfony\Routing\SubIriConverter\SubIriFromItemConverterInterface::SUB_IRI_FROM_ITEM_CONVERTER_TAG]

  xcart.api.attribute_option.hidden.controller:
    class: XLite\Controller\API\AttributeOption\Post
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
    tags: ['controller.service_arguments']

  # /product_classes/{class_id}/attributes_hidden/{attribute_id}/options
  xcart.api.attribute_option.hidden.product_class_controller:
    class: XLite\Controller\API\AttributeOption\ProductClassBasedPost
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
    tags: ['controller.service_arguments']

  xcart.api.attribute_option.hidden.product_class_sub_extension:
    class: XLite\API\SubExtension\AttributeOption\ProductClassBasedAttributeOptionSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $operationNames: ['product_class_based_get_option_hidden', 'product_class_based_post_option_hidden', 'product_class_based_put_option_hidden', 'product_class_based_delete_option_hidden', 'product_class_based_get_option_hiddens']
      $pathPrefix: 'attributes_hidden'
    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.attribute_option.hidden.product_class_sub_iri_converter:
    class: XLite\API\SubIriConverter\AttributeOption\ProductClassBasedAttributeOptionSubIriConverter
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $itemRouteName: 'api_attribute options_product_class_based_get_option_hidden_item'
    tags: [!php/const XCart\Framework\ApiPlatform\Core\Bridge\Symfony\Routing\SubIriConverter\SubIriFromItemConverterInterface::SUB_IRI_FROM_ITEM_CONVERTER_TAG]

  # /products/{product_id}/attributes_hidden/{attribute_id}/options
  xcart.api.attribute_option.hidden.product_controller:
    class: XLite\Controller\API\AttributeOption\ProductBasedPost
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
    tags: ['controller.service_arguments']

  xcart.api.attribute_option.hidden.product_sub_extension:
    class: XLite\API\SubExtension\AttributeOption\ProductBasedAttributeOptionSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $operationNames: ['product_based_get_option_hidden', 'product_based_post_option_hidden', 'product_based_put_option_hidden', 'product_based_delete_option_hidden', 'product_based_get_option_hiddens']
      $pathPrefix: 'attributes_hidden'
    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.attribute_option.hidden.product_sub_iri_converter:
    class: XLite\API\SubIriConverter\AttributeOption\ProductBasedAttributeOptionSubIriConverter
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_HIDDEN
      $itemRouteName: 'api_attribute options_product_based_get_option_hidden_item'
    tags: [!php/const XCart\Framework\ApiPlatform\Core\Bridge\Symfony\Routing\SubIriConverter\SubIriFromItemConverterInterface::SUB_IRI_FROM_ITEM_CONVERTER_TAG]
