<?xml version="1.0" ?>
<!--
/**
 * BSS Commerce Co.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://bsscommerce.com/Bss-Commerce-License.txt
 *
 * @category   BSS
 * @package    Bss_B2bRegistration
 * @author     Extension Team
 * @copyright  Copyright (c) 2017-2020 BSS Commerce Co. ( http://bsscommerce.com )
 * @license    http://bsscommerce.com/Bss-Commerce-License.txt
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Customer\Block\Account\AuthenticationPopup">
        <plugin name="bss_b2b_register_button" type="Bss\B2bRegistration\Plugin\Block\Account\AuthenticationPopup" sortOrder="11"/>
    </type>
    <type name="Magento\Customer\Model\Customer">
        <plugin name="bss_b2b_update_group_customer" type="Bss\B2bRegistration\Plugin\Model\Customer" sortOrder="11"/>
    </type>
    <type name="Magento\Customer\Api\AccountManagementInterface">
        <plugin name="bss_b2b_form_remove_company" type="Bss\B2bRegistration\Model\Plugin\AccountManagement" sortOrder="40" />
    </type>
    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="customroute" xsi:type="array">
                    <item name="class" xsi:type="string">Bss\B2bRegistration\Controller\Router\Custom</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">31</item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Customer\Block\Widget\Dob">
        <plugin name="bss_b2bregistration_dob_field" type="Bss\B2bRegistration\Plugin\Block\Widget\Dob" sortOrder="10"/>
    </type>
    <type name="Magento\Customer\Block\Widget\Gender">
        <plugin name="bss_b2bregistration_gender_field" type="Bss\B2bRegistration\Plugin\Block\Widget\Gender" sortOrder="10"/>
    </type>
    <type name="Magento\Customer\Block\Widget\Taxvat">
        <plugin name="bss_b2bregistration_taxvat_field" type="Bss\B2bRegistration\Plugin\Block\Widget\Taxvat" sortOrder="10"/>
    </type>
    <type name="Magento\Customer\Block\Widget\Name">
        <plugin name="bss_b2bregistration_name_field" type="Bss\B2bRegistration\Plugin\Block\Widget\Name" sortOrder="10"/>
    </type>
    <type name="Magento\Customer\Model\CustomerExtractor">
        <plugin name="bss_b2bregistration_customer_extractor" type="Bss\B2bRegistration\Plugin\Model\CustomerExtractor" sortOrder="10"/>
    </type>
</config>
