<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\LoginAsCustomerAssistance\Api\ConfigInterface"
                type="Magento\LoginAsCustomerAssistance\Model\Config"/>
    <preference for="Magento\LoginAsCustomerAssistance\Api\IsAssistanceEnabledInterface"
                type="Magento\LoginAsCustomerAssistance\Model\IsAssistanceEnabled"/>
    <preference for="Magento\LoginAsCustomerAssistance\Api\SetAssistanceInterface"
                type="Magento\LoginAsCustomerAssistance\Model\SetAssistance"/>
    <type name="Magento\LoginAsCustomerApi\Model\IsLoginAsCustomerEnabledForCustomerChain">
        <arguments>
            <argument name="resolvers" xsi:type="array">
                <item name="is_allowed" xsi:type="object">
                    Magento\LoginAsCustomerAssistance\Model\Processor\IsLoginAsCustomerAllowedResolver
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Customer\Api\CustomerRepositoryInterface">
        <plugin name="login_as_customer_customer_repository_plugin"
                type="Magento\LoginAsCustomerAssistance\Plugin\CustomerPlugin"/>
    </type>
</config>
