<?xml version="1.0"?>
<!--
/**
 * @category   MagePsycho
 * @package    MagePsycho_DiscountLimit
 * @author     Raj KB <magepsycho@gmail.com>
 * @website    https://www.magepsycho.com
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <type name="MagePsycho\DiscountLimit\Logger\Handler">
        <arguments>
            <argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
        </arguments>
    </type>
    <type name="MagePsycho\DiscountLimit\Logger\Logger">
        <arguments>
            <argument name="name" xsi:type="string">MagePsychoDiscountLimitLogger</argument>
            <argument name="handlers"  xsi:type="array">
                <item name="system" xsi:type="object">MagePsycho\DiscountLimit\Logger\Handler</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\SalesRule\Model\Rule\Action\Discount\ByPercent">
        <plugin name="MagePsycho_DiscountLimit_Magento_SalesRule_Model_Rule_Action_Discount_ByPercent"
                type="MagePsycho\DiscountLimit\Plugin\Model\SalesRule\Rule\Action\SetMaxDiscountPlugin"
                sortOrder="1" disabled="false" />
    </type>
</config>
