services:
  _defaults:
    autowire: true
    autoconfigure: true

  # /products/{product_id}/attributes_text/{attribute_id}/values
  XLite\API\Endpoint\AttributeValue\Text\Transformer\OutputTransformerInterface: '@XLite\API\Endpoint\AttributeValue\Text\Transformer\OutputTransformer'
  XLite\API\Endpoint\AttributeValue\Text\Transformer\OutputTransformer: ~
  XLite\API\Endpoint\AttributeValue\Text\Transformer\InputTransformerInterface: '@XLite\API\Endpoint\AttributeValue\Text\Transformer\InputTransformer'
  XLite\API\Endpoint\AttributeValue\Text\Transformer\InputTransformer: ~

  xcart.api.attribute_value.text.sub_extension:
    class: XLite\API\SubExtension\AttributeValue\AttributeValueSubExtension
    arguments:
      $attributeType: !php/const XLite\Model\Attribute::TYPE_TEXT
      $pathPrefix: attributes_text
      $className: XLite\Model\AttributeValue\AttributeValueText
    tags: [!php/const XLite\API\Extension\ItemSubExtension\ItemSubExtensionInterface::ITEM_SUB_EXTENSION_TAG, !php/const XLite\API\Extension\CollectionSubExtension\CollectionSubExtensionInterface::COLLECTION_SUB_EXTENSION_TAG]

  XLite\Controller\API\AttributeValue\Text\Post:
    tags: ['controller.service_arguments']

  xcart.api.attribute_value.text.sub_iri_converter:
    class: XLite\API\SubIriConverter\AttributeValue\AttributeValueSubIriConverter
    arguments:
      $routeItemName: 'api_textarea attribute values_get_item'
      $className: XLite\Model\AttributeValue\AttributeValueText
    tags: [!php/const XCart\Framework\ApiPlatform\Core\Bridge\Symfony\Routing\SubIriConverter\SubIriFromItemConverterInterface::SUB_IRI_FROM_ITEM_CONVERTER_TAG]

  XLite\API\Endpoint\AttributeValue\Text\DataProvider\ItemDataProvider: ~
