<?xml version="1.0"?>
<!--
  ~ @copyright Copyright (c) 2026 Emacom (https://emacom.pl)
  -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Emacom\BotShield\Core\Port\Config" type="Emacom\BotShield\Model\Config"/>
    <preference for="Emacom\BotShield\Core\Port\Request" type="Emacom\BotShield\Model\Port\Request"/>
    <preference for="Emacom\BotShield\Core\Port\CookieJar" type="Emacom\BotShield\Model\Port\CookieJar"/>
    <preference for="Emacom\BotShield\Core\Port\HttpClient" type="Emacom\BotShield\Model\Port\HttpClient"/>
    <preference for="Emacom\BotShield\Core\Port\FilterCounter" type="Emacom\BotShield\Model\Resolver\ActiveFilters"/>

    <type name="Emacom\BotShield\Logger\Handler">
        <arguments>
            <argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Logger\Logger">
        <arguments>
            <argument name="name" xsi:type="string">botshield</argument>
            <argument name="handlers" xsi:type="array">
                <item name="botshield" xsi:type="object">Emacom\BotShield\Logger\Handler</item>
            </argument>
        </arguments>
    </type>

    <type name="Emacom\BotShield\Core\CookieSigner">
        <arguments>
            <argument name="clock" xsi:type="object">Emacom\BotShield\Model\Port\Clock</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\Verification\Bot">
        <arguments>
            <argument name="cache" xsi:type="object">Emacom\BotShield\Model\Port\Cache</argument>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\ChallengeGuard">
        <arguments>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\ChallengeVerification">
        <arguments>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\Resolver\ClientIp">
        <arguments>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\Turnstile\Verifier">
        <arguments>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Emacom\BotShield\Core\Verification\Cookie">
        <arguments>
            <argument name="logger" xsi:type="object">Emacom\BotShield\Logger\Logger</argument>
        </arguments>
    </type>
</config>
