services:
    oro_tax.importexport.data_converter.tax_rule:
        parent: oro_importexport.data_converter.configurable

    oro_tax.importexport.strategy.tax_rule.add_or_replace:
        parent: oro_importexport.strategy.configurable_add_or_replace

    oro_tax.importexport.processor.export.tax_rule:
        parent: oro_importexport.processor.export_abstract
        calls:
            - [setDataConverter, ['@oro_tax.importexport.data_converter.tax_rule']]
        tags:
            - name: oro_importexport.processor
              type: export
              entity: 'Oro\Bundle\TaxBundle\Entity\TaxRule'
              alias:  oro_tax_tax_rule

    oro_tax.importexport.processor.import.tax_rule:
        parent: oro_importexport.processor.import_abstract
        calls:
            - [setDataConverter, ['@oro_tax.importexport.data_converter.tax_rule']]
            - [setStrategy, ['@oro_tax.importexport.strategy.tax_rule.add_or_replace']]
        tags:
            - name: oro_importexport.processor
              type: import
              entity: 'Oro\Bundle\TaxBundle\Entity\TaxRule'
              alias:  oro_tax_tax_rule
            - name: oro_importexport.processor
              type: import_validation
              entity: 'Oro\Bundle\TaxBundle\Entity\TaxRule'
              alias: oro_tax_tax_rule

    oro_tax.importexport.data_converter.tax:
        parent: oro_importexport.data_converter.configurable

    oro_tax.importexport.strategy.tax.add_or_replace:
        parent: oro_importexport.strategy.configurable_add_or_replace

    oro_tax.importexport.processor.export.tax:
        parent: oro_importexport.processor.export_abstract
        calls:
            - [setDataConverter, ['@oro_tax.importexport.data_converter.tax']]
        tags:
            - name: oro_importexport.processor
              type: export
              entity: 'Oro\Bundle\TaxBundle\Entity\Tax'
              alias:  oro_tax_tax

    oro_tax.importexport.processor.import.tax:
        parent: oro_importexport.processor.import_abstract
        calls:
            - [setDataConverter, ['@oro_tax.importexport.data_converter.tax']]
            - [setStrategy, ['@oro_tax.importexport.strategy.tax.add_or_replace']]
        tags:
            - name: oro_importexport.processor
              type: import
              entity: 'Oro\Bundle\TaxBundle\Entity\Tax'
              alias:  oro_tax_tax
            - name: oro_importexport.processor
              type: import_validation
              entity: 'Oro\Bundle\TaxBundle\Entity\Tax'
              alias:  oro_tax_tax

    oro_tax.importexport.configuration_provider.tax_rule:
        class: 'Oro\Bundle\TaxBundle\ImportExport\Configuration\TaxRuleImportExportConfigurationProvider'
        tags:
            - { name: oro_importexport.configuration, alias: oro_tax_rule }

    oro_tax.importexport.configuration_provider.tax:
        class: 'Oro\Bundle\TaxBundle\ImportExport\Configuration\TaxImportExportConfigurationProvider'
        tags:
            - { name: oro_importexport.configuration, alias: oro_tax }

    oro_tax.importexport.normalizer.tax_code:
        class: 'Oro\Bundle\TaxBundle\ImportExport\Serializer\TaxCodeNormalizer'
        tags:
            - { name: oro_importexport.normalizer, priority: 20 }
