services:
    pim_catalog.validator.constraint.family_requirements:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyRequirementsValidator'
        arguments:
            - '@pim_catalog.repository.attribute'
            - '@pim_catalog.repository.channel'
        tags:
            - { name: validator.constraint_validator, alias: pim_family_requirements_validator }

    pim_catalog.validator.constraint.family_attribute_as_label:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeAsLabelValidator'
        tags:
            - { name: validator.constraint_validator, alias: pim_family_attribute_as_label_validator }

    pim_catalog.validator.constraint.family_attribute_as_image:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeAsImageValidator'
        arguments:
            - [ 'pim_catalog_image', 'pim_catalog_asset_collection' ]
        tags:
            - { name: validator.constraint_validator, alias: pim_family_attribute_as_image_validator }

    pim_catalog.validator.constraint.immutable_family_variant_axes:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\ImmutableVariantAxesValidator'
        arguments:
            - '@doctrine.orm.entity_manager'
        tags:
            - { name: validator.constraint_validator, alias: pim_immutable_variant_axes_validator }

    pim_catalog.validator.constraint.family_attribute_used_as_axis:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyAttributeUsedAsAxisValidator'
        tags:
            - { name: validator.constraint_validator, alias: pim_family_attribute_used_as_axis }

    pim_catalog.validator.constraint.file_allowed_extensions:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\AllowedExtensionsValidator'
        arguments:
            - '%pim_catalog_file_allowed_extensions%'
        tags:
            - { name: validator.constraint_validator, alias: pim_file_allowed_extensions_validator }

    pim_catalog.validator.constraint.image_allowed_extensions:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\AllowedExtensionsValidator'
        arguments:
            - '%pim_catalog_image_allowed_extensions%'
        tags:
            - { name: validator.constraint_validator, alias: pim_image_allowed_extensions_validator }

    pim_catalog.validator.constraint.attribute_type_for_option:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\AttributeTypeForOptionValidator'
        arguments:
            - ['pim_catalog_simpleselect', 'pim_catalog_multiselect']
        tags:
            - { name: validator.constraint_validator, alias: pim_attribute_type_for_option_validator }

    pim_catalog.validator.constraint.family_variant_axes:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\FamilyVariantValidator'
        tags:
            - { name: validator.constraint_validator, alias: pim_family_variant }

    pim_catalog.validator.constraint.is_reference_data_configured:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\IsReferenceDataConfiguredValidator'
        arguments:
            - ['pim_reference_data_multiselect', 'pim_reference_data_simpleselect']
            - '@?pim_reference_data.registry'
        tags:
            - { name: validator.constraint_validator, alias: pim_is_reference_data_configured_validator }

    pim_catalog.validator.constraint.not_null_properties:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\NotNullPropertiesValidator'
        arguments:
            - ['pim_reference_data_multiselect', 'pim_reference_data_simpleselect']
        tags:
            - { name: validator.constraint_validator, alias: pim_not_null_properties_validator }

    pim_catalog.validator.constraint.valid_metric:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\ValidMetricValidator'
        arguments:
            - '@property_accessor'
            - '@akeneo_measure.provider.measurement_provider'
        tags:
            - { name: validator.constraint_validator, alias: pim_metric_validator }

    pim_catalog.validator.constraint.single_identifier:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\SingleIdentifierAttributeValidator'
        arguments:
            - '@pim_catalog.repository.attribute'
        tags:
            - { name: validator.constraint_validator, alias: pim_single_identifier_attribute_validator }

    pim_catalog.validator.constraint.blacklisted_attribute_code:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\BlacklistedAttributeCodeValidator'
        arguments:
            - '@akeneo.pim.structure.query.is_attribute_code_blacklisted'
            - '@akeneo.pim.structure.query.get_blacklisted_attribute_job_execution_id'
            - '@translator.default'
            - '@router'
        tags:
            - { name: validator.constraint_validator, alias: pim_blacklisted_attribute_code_validator }

    pim_structure.validator.constraint.association_type.should_not_be_two_way_and_quantified:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\AssociationType\ShouldNotBeTwoWayAndQuantifiedValidator'
        tags:
            - { name: 'validator.constraint_validator', alias: 'pim_structure.validator.constraint.association_type.should_not_be_two_way_and_quantified' }

    pim_structure.validator.constraint.property_type:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\AttributePropertyTypeValidator'
        tags:
            - { name: 'validator.constraint_validator', alias: 'pim_structure_attribute_property_type_validator' }

    pim_catalog.validator.constraint.is_variant_axis_without_available_locales:
        class: 'Akeneo\Pim\Structure\Component\Validator\Constraints\IsVariantAxisWithoutAvailableLocalesValidator'
        arguments:
            - '@akeneo.pim.structure.query.attribute_is_an_family_variant_axis'
        tags:
            - { name: validator.constraint_validator, alias: 'pim_structure.validator.constraint.available_locales.is_variant_axis_without_available_locales' }
