services:
  _defaults:
    autowire: true
    autoconfigure: true

  # /attributes_checkbox
  XLite\API\Endpoint\Attribute\Checkbox\Transformer\OutputTransformerInterface: '@XLite\API\Endpoint\Attribute\Checkbox\Transformer\OutputTransformer'
  XLite\API\Endpoint\Attribute\Checkbox\Transformer\OutputTransformer: ~
  XLite\API\Endpoint\Attribute\Checkbox\Transformer\InputTransformerInterface: '@XLite\API\Endpoint\Attribute\Checkbox\Transformer\InputTransformer'
  XLite\API\Endpoint\Attribute\Checkbox\Transformer\InputTransformer: ~

  xcart.api.attribute.checkbox.controller:
    class: XLite\Controller\API\Attribute\Post
    arguments:
      $type: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
    tags: ['controller.service_arguments']

  xcart.api.attribute.checkbox.global_sub_extension:
    class: XLite\API\SubExtension\Attribute\GlobalAttributeSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
      $operationNames: ['get_checkbox', 'post_checkbox', 'put_checkbox', 'delete_checkbox', 'get_checkboxes']
    tags: [!php/const XLite\API\Extension\ItemSubExtension\ItemSubExtensionInterface::ITEM_SUB_EXTENSION_TAG, !php/const XLite\API\Extension\CollectionSubExtension\CollectionSubExtensionInterface::COLLECTION_SUB_EXTENSION_TAG]

  # /product_classes/{class_id}/attributes_checkbox
  xcart.api.attribute.checkbox.product_class_based_sub_extension:
    class: XLite\API\SubExtension\Attribute\ProductClassBasedAttributeSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
      $operationNames: ['product_class_based_get_checkbox', 'product_class_based_post_checkbox', 'product_class_based_put_checkbox', 'product_class_based_delete_checkbox', 'product_class_based_get_checkboxes']
    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.checkbox.product_class_based_controller:
    class: XLite\Controller\API\Attribute\ProductClassBasedPost
    arguments:
      $type: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
    tags: ['controller.service_arguments']

  # /products/{product_id}/attributes_checkbox
  XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\OutputTransformerInterface: '@XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\OutputTransformer'
  XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\OutputTransformer: ~
  XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\InputTransformerInterface: '@XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\InputTransformer'
  XLite\API\Endpoint\ProductAttribute\Checkbox\Transformer\InputTransformer: ~

  xcart.api.attribute.checkbox.product_based_sub_extension:
    class: XLite\API\SubExtension\Attribute\ProductBasedAttributeSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
      $operationNames: ['product_based_get_checkbox', 'product_based_post_checkbox', 'product_based_put_checkbox', 'product_based_delete_checkbox', 'product_based_get_checkboxes']
    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.checkbox.product_based_controller:
    class: XLite\Controller\API\Attribute\ProductBasedPost
    arguments:
      $type: !php/const XLite\Model\Attribute::TYPE_CHECKBOX
    tags: ['controller.service_arguments']
