<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Sylius Sp. z o.o.

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <services>
        <defaults public="true" />

        <service id="sylius.validator.has_enabled_entity" class="Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntityValidator">
            <argument type="service" id="doctrine" />
            <argument type="service" id="property_accessor" />
            <tag name="validator.constraint_validator" alias="sylius_has_enabled_entity" />
        </service>
        <service id="sylius.validator.customer_initializer" class="Sylius\Bundle\CoreBundle\Validator\Initializer\CustomerInitializer">
            <argument type="service" id="sylius.canonicalizer" />
            <tag name="validator.initializer" />
        </service>
        <service id="sylius.validator.unique.registered_user" class="Sylius\Bundle\CoreBundle\Validator\Constraints\RegisteredUserValidator">
            <argument type="service" id="sylius.repository.customer" />
            <tag name="validator.constraint_validator" alias="registered_user_validator" />
        </service>
        <service id="sylius.validator.cart_item_availability" class="Sylius\Bundle\CoreBundle\Validator\Constraints\CartItemAvailabilityValidator">
            <argument type="service" id="sylius.availability_checker" />
            <tag name="validator.constraint_validator" alias="sylius_cart_item_availability" />
        </service>
        <service id="sylius.validator.has_all_prices_defined" class="Sylius\Bundle\CoreBundle\Validator\Constraints\HasAllPricesDefinedValidator">
            <tag name="validator.constraint_validator" alias="sylius_has_all_prices_defined" />
        </service>
        <service id="sylius.validator.has_all_variant_prices_defined" class="Sylius\Bundle\CoreBundle\Validator\Constraints\HasAllVariantPricesDefinedValidator">
            <tag name="validator.constraint_validator" alias="sylius_has_all_variant_prices_defined" />
        </service>
        <service id="sylius.validator.translation_for_existing_locales" class="Sylius\Bundle\CoreBundle\Validator\Constraints\TranslationForExistingLocalesValidator">
            <argument type="service" id="sylius.repository.locale" />
            <tag name="validator.constraint_validator" alias="sylius_translation_for_existing_locales" />
        </service>
        <service id="sylius.validator.unique_reviewer_email" class="Sylius\Bundle\CoreBundle\Validator\Constraints\UniqueReviewerEmailValidator">
            <argument type="service" id="sylius.repository.shop_user" />
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="security.authorization_checker" />
            <tag name="validator.constraint_validator" alias="sylius_unique_reviewer_email_validator" />
        </service>
        <service id="sylius.validator.locales_aware_valid_attribute_value" class="Sylius\Bundle\CoreBundle\Validator\Constraints\LocalesAwareValidAttributeValueValidator">
            <argument type="service" id="sylius.registry.attribute_type" />
            <argument type="service" id="sylius.translation_locale_provider" />
            <tag name="validator.constraint_validator" alias="sylius_valid_attribute_value_validator" />
        </service>

        <service id="sylius.validator.shipping_method_integrity" class="Sylius\Bundle\CoreBundle\Validator\Constraints\OrderShippingMethodEligibilityValidator">
            <argument type="service" id="sylius.shipping_method_eligibility_checker" />
            <tag name="validator.constraint_validator" alias="sylius_order_shipping_method_eligibility_validator" />
        </service>
        <service id="sylius.validator.payment_method_integrity" class="Sylius\Bundle\CoreBundle\Validator\Constraints\OrderPaymentMethodEligibilityValidator">
            <tag name="validator.constraint_validator" alias="sylius_order_payment_method_eligibility_validator" />
        </service>
        <service id="sylius.validator.product_integrity" class="Sylius\Bundle\CoreBundle\Validator\Constraints\OrderProductEligibilityValidator">
            <tag name="validator.constraint_validator" alias="sylius_order_product_eligibility_validator" />
        </service>
        <service id="sylius.validator.channel_default_locale_enabled" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ChannelDefaultLocaleEnabledValidator">
            <tag name="validator.constraint_validator" alias="sylius_channel_default_locale_enabled" />
        </service>

        <service id="sylius.validator.channel_code_among_existing_ones" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ExistingChannelCodeValidator">
            <argument type="service" id="sylius.repository.channel" />
            <tag name="validator.constraint_validator" alias="sylius_channel_code_among_existing_ones" />
        </service>

        <service id="sylius.validator.channel_code_collection" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ChannelCodeCollectionValidator">
            <argument type="service" id="sylius.repository.channel" />
            <argument type="service" id="property_accessor" />
            <tag name="validator.constraint_validator" alias="sylius_channel_code_collection" />
        </service>

        <service id="sylius.validator.customer_group_code_exists" class="Sylius\Bundle\CoreBundle\Validator\Constraints\CustomerGroupCodeExistsValidator">
            <argument type="service" id="sylius.repository.customer_group" />
            <tag name="validator.constraint_validator" alias="sylius_customer_group_code_exists" />
        </service>

        <service id="sylius.validator.country_code_exists" class="Sylius\Bundle\CoreBundle\Validator\Constraints\CountryCodeExistsValidator">
            <argument type="service" id="sylius.repository.country" />
            <tag name="validator.constraint_validator" alias="sylius_country_code_exists" />
        </service>

        <service id="sylius.validator.taxon_code_exists" class="Sylius\Bundle\CoreBundle\Validator\Constraints\TaxonCodeExistsValidator">
            <argument type="service" id="sylius.repository.taxon" />
            <tag name="validator.constraint_validator" alias="sylius_taxon_code_exists" />
        </service>

        <service id="sylius.validator.product_code_exists" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ProductCodeExistsValidator">
            <argument type="service" id="sylius.repository.product" />
            <tag name="validator.constraint_validator" alias="sylius_product_code_exists" />
        </service>

        <service id="sylius.validator.product_variant_code_exists" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ProductVariantCodeExistsValidator">
            <argument type="service" id="sylius.repository.product_variant" />
            <tag name="validator.constraint_validator" alias="sylius_product_variant_code_exists" />
        </service>

        <service id="sylius.validator.order_confirmation_with_valid_order_state" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ResendOrderConfirmationEmailWithValidOrderStateValidator">
            <argument type="service" id="sylius.repository.order" />
            <argument>%sylius_order.resend_order_confirmation_email.order_states%</argument>
            <tag name="validator.constraint_validator" alias="sylius_order_confirmation_with_valid_order_state" />
        </service>

        <service id="sylius.validator.product_image_variants_belong_to_owner" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ProductImageVariantsBelongToOwnerValidator">
            <tag name="validator.constraint_validator" alias="sylius_product_image_variants_belong_to_owner" />
        </service>

        <service id="sylius.validator.shipment_confirmation_with_valid_order_state" class="Sylius\Bundle\CoreBundle\Validator\Constraints\ResendShipmentConfirmationEmailWithValidShipmentStateValidator">
            <argument type="service" id="sylius.repository.shipment" />
            <tag name="validator.constraint_validator" alias="sylius_shipment_confirmation_with_valid_shipment_state" />
        </service>

        <service id="Sylius\Bundle\CoreBundle\Validator\Constraints\MaxIntegerValidator">
            <argument>%sylius_core.max_int_value%</argument>
            <tag name="validator.constraint_validator" alias="sylius_max_integer" />
        </service>
    </services>
</container>
