<?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 https://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="Shopware\Storefront\Framework\Captcha\CaptchaRouteListener">
            <argument type="tagged_iterator" tag="shopware.storefront.captcha"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument type="service" id="service_container" />

            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="Shopware\Storefront\Framework\Captcha\HoneypotCaptcha">
            <argument type="service" id="validator"/>

            <tag name="shopware.storefront.captcha" priority="400"/>
        </service>

        <service id="Shopware\Storefront\Framework\Captcha\BasicCaptcha">
            <argument type="service" id="request_stack"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>

            <tag name="shopware.storefront.captcha" priority="300"/>
        </service>

        <service id="Shopware\Storefront\Framework\Captcha\BasicCaptcha\BasicCaptchaGenerator"/>

        <service id="shopware.captcha.client" class="GuzzleHttp\Client"/>

        <service id="Shopware\Storefront\Framework\Captcha\GoogleReCaptchaV2">
            <argument type="service" id="shopware.captcha.client"/>

            <tag name="shopware.storefront.captcha" priority="200"/>
        </service>

        <service id="Shopware\Storefront\Framework\Captcha\GoogleReCaptchaV3">
            <argument type="service" id="shopware.captcha.client"/>

            <tag name="shopware.storefront.captcha" priority="100"/>
        </service>

        <service id="Shopware\Storefront\Framework\Captcha\CaptchaCookieCollectListener">
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <tag name="kernel.event_listener"/>
        </service>
    </services>
</container>
