<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Google Rich Snippets for Magento 2
 */-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Save Breadcrumb Info -->
    <type name="Magento\Theme\Block\Html\Breadcrumbs">
        <plugin name="Amasty_SeoRichData::Block_Breadcrumbs" type="Amasty\SeoRichData\Plugin\Block\Breadcrumbs" />
    </type>

    <!-- Remove Malformed Review Rich Data -->
    <type name="\Magento\Review\Block\Product\ReviewRenderer">
        <plugin name="Amasty_SeoRichData::Block_Review" type="Amasty\SeoRichData\Plugin\Microdata\Replacer" />
    </type>
    <type name="\Magento\Framework\Pricing\Render\Amount">
        <plugin name="Amasty_SeoRichData::Price_Amount" type="Amasty\SeoRichData\Plugin\Microdata\Replacer" />
    </type>
    <type name="\Magento\Theme\Block\Html\Title">
        <plugin name="Amasty_SeoRichData::Html_Title" type="Amasty\SeoRichData\Plugin\Microdata\Replacer" />
    </type>
    <type name="\Magento\Catalog\Block\Product\View\Description">
        <plugin name="Amasty_SeoRichData::Product_Description" type="Amasty\SeoRichData\Plugin\Microdata\Replacer" />
    </type>
    <type name="\Yotpo\Yotpo\Block\Yotpo">
        <plugin name="Amasty_SeoRichData::Yotpo" type="Amasty\SeoRichData\Plugin\Microdata\Replacer" />
    </type>

    <!-- JsonLd processors -->
    <virtualType name="Amasty\SeoRichData\Model\JsonLd\DefaultProcessorProvider" type="Amasty\SeoRichData\Model\JsonLd\ProcessorProvider">
        <arguments>
            <argument name="processors" xsi:type="array">
                <item name="breadcrumbs" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\Breadcrumbs</item>
                <item name="website" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\Website</item>
                <item name="organization" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\Organization</item>
                <item name="category" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\Category</item>
                <item name="search" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\Search</item>
                <item name="social_profiles" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\Processor\SocialProfiles</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Amasty\SeoRichData\Block\JsonLd">
        <arguments>
            <argument name="processorProvider" xsi:type="object">Amasty\SeoRichData\Model\JsonLd\DefaultProcessorProvider</argument>
        </arguments>
    </type>
</config>
