<?xml version="1.0" ?>

<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>

        <service id="shopware_account.address_service" class="Shopware\Bundle\AccountBundle\Service\AddressService">
            <argument type="service" id="models" />
            <argument type="service" id="shopware_account.address_validator" />
        </service>

        <service id="shopware_account.address_validator" class="Shopware\Bundle\AccountBundle\Service\Validator\AddressValidator">
            <argument type="service" id="validator" />
            <argument type="service" id="shopware_storefront.context_service" />
            <argument type="service" id="config" />
        </service>

        <service id="shopware_account.customer_service" class="Shopware\Bundle\AccountBundle\Service\CustomerService">
            <argument type="service" id="models" />
            <argument type="service" id="shopware_account.customer_validator" />
        </service>

        <service id="shopware_account.customer_validator" class="Shopware\Bundle\AccountBundle\Service\Validator\CustomerValidator">
            <argument type="service" id="validator" />
            <argument type="service" id="shopware_storefront.context_service" />
            <argument type="service" id="config" />
        </service>

        <service id="shopware_account.constraint.current_password_validator" class="Shopware\Bundle\AccountBundle\Constraint\CurrentPasswordValidator">
            <argument type="service" id="session" />
            <argument type="service" id="snippets" />
            <argument type="service" id="PasswordEncoder" />
            <argument type="service" id="models" />
            <tag name="validator.constraint_validator" alias="CurrentPasswordValidator" />
        </service>

        <service id="shopware_account.type.salutation_type" class="Shopware\Bundle\AccountBundle\Type\SalutationType">
            <argument type="service" id="config" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.addressform" class="Shopware\Bundle\AccountBundle\Form\Account\AddressFormType">
            <argument type="service" id="config" />
            <argument type="service" id="models" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.attributeform" class="Shopware\Bundle\AccountBundle\Form\Account\AttributeFormType">
            <argument type="service" id="models" />
            <argument type="service" id="shopware_attribute.crud_service" />
            <argument type="service" id="corelogger" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.profile_update_form" class="Shopware\Bundle\AccountBundle\Form\Account\ProfileUpdateFormType">
            <argument type="service" id="snippets" />
            <argument type="service" id="config" />
            <argument type="service" id="shopware_storefront.context_service" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.personalform" class="Shopware\Bundle\AccountBundle\Form\Account\PersonalFormType">
            <argument type="service" id="snippets" />
            <argument type="service" id="config" />
            <argument type="service" id="shopware_storefront.context_service" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.emailupdateform" class="Shopware\Bundle\AccountBundle\Form\Account\EmailUpdateFormType">
            <argument type="service" id="snippets" />
            <argument type="service" id="config" />
            <argument type="service" id="shopware_storefront.context_service" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.passwordupdateform" class="Shopware\Bundle\AccountBundle\Form\Account\PasswordUpdateFormType">
            <argument type="service" id="config" />
            <tag name="form.type" />
        </service>

        <service id="shopware_account.form.resetpasswordform" class="Shopware\Bundle\AccountBundle\Form\Account\ResetPasswordFormType">
            <tag name="form.type" />
        </service>

        <service id="shopware_account.constraint.password_validator" class="Shopware\Bundle\AccountBundle\Constraint\PasswordValidator">
            <argument type="service" id="snippets" />
            <argument type="service" id="config" />
            <tag name="validator.constraint_validator" alias="PasswordValidator" />
        </service>

        <service id="shopware_account.constraint.form_email_validator" class="Shopware\Bundle\AccountBundle\Constraint\FormEmailValidator">
            <argument type="service" id="snippets" />
            <argument type="service" id="shopware_account.constraint.customer_email_validator" />
            <tag name="validator.constraint_validator" alias="FormEmailValidator" />
        </service>

        <service id="shopware_account.constraint.customer_email_validator" class="Shopware\Bundle\AccountBundle\Constraint\CustomerEmailValidator">
            <argument type="service" id="snippets" />
            <argument type="service" id="dbal_connection" />
            <argument type="service" id="validator.email" />
            <tag name="validator.constraint_validator" alias="CustomerEmailValidator" />
        </service>

        <service id="shopware_account.register_service" class="Shopware\Bundle\AccountBundle\Service\RegisterService">
            <argument type="service" id="models"/>
            <argument type="service" id="shopware_account.customer_validator"/>
            <argument type="service" id="config"/>
            <argument type="service" id="PasswordEncoder"/>
            <argument type="service" id="shopware.number_range_incrementer"/>
            <argument type="service" id="dbal_connection"/>
            <argument type="service" id="shopware_account.address_service"/>
        </service>
    </services>
</container>
