<?xml version="1.0"?>
<!--
/**
 * Magezon
 *
 * This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license.
 * Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
 * If you wish to customize this module for your needs.
 * Please refer to https://www.magezon.com for more information.
 *
 * @category  Magezon
 * @package   Magezon_Core
 * @copyright Copyright (C) 2019 Magezon (https://www.magezon.com)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
	<type name="Magento\Backend\Block\Menu">
        <plugin name="remove_empty_item" type="Magezon\Core\Plugin\Block\Menu" />
    </type>

    <!--
        Adminhtml-only on purpose: `_processUrlKeys` is a backend concern, and
        the storefront never posts JSON into a Magento controller.
    -->
    <type name="Magento\Backend\App\AbstractAction">
        <plugin name="magezon_core_json_request_body" type="Magezon\Core\Plugin\App\JsonRequestBody" sortOrder="10" />
    </type>

    <!--
        Two generations of one product installed without the layer that
        arbitrates between them: they BOTH mount on the same field and which one
        opens is undefined.

        The message class holds no product knowledge. Each gen2 module declares
        its own `pairs` entry in ITS OWN di.xml, so a product with nothing to
        arbitrate (Magezon_PopupBuilder — its gen2 removes the predecessor's
        block by name, which is a removal, not contention) declares nothing and
        is never asked about.
    -->
    <type name="Magento\Framework\Notification\MessageList">
        <arguments>
            <argument name="messages" xsi:type="array">
                <item name="magezonCompatModuleRequired" xsi:type="string">Magezon\Core\Model\Message\CompatModuleRequired</item>
            </argument>
        </arguments>
    </type>
</config>