<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Meta\BusinessExtension\Api\SettingsWebhookListenerInterface"
                type="Meta\BusinessExtension\Model\Api\SettingsWebhookListenerImpl"/>
    <preference for="Meta\BusinessExtension\Api\SettingsWebhookRequestInterface"
                type="Meta\BusinessExtension\Model\Api\SettingsWebhookRequestImpl"/>
    <preference for="Meta\BusinessExtension\Api\CoreConfigInterface"
                type="Meta\BusinessExtension\Model\Api\CoreConfig"/>
    <preference for="Meta\BusinessExtension\Api\Data\MetaIssueNotificationInterface"
                type="Meta\BusinessExtension\Model\MetaIssueNotification"/>
    <preference for="Meta\BusinessExtension\Api\AdobeCloudConfigInterface"
                type="Meta\BusinessExtension\Model\Api\AdobeCloudConfig"/>
    <virtualType name="Meta\BusinessExtension\Model\Logger\ApiDebugger" type="Magento\Framework\Logger\Handler\Base">
        <arguments>
            <argument name="fileName" xsi:type="string">/var/log/meta/api.log</argument>
        </arguments>
    </virtualType>
    <virtualType name="Meta\BusinessExtension\Model\Logger\ApiLogger" type="Magento\Framework\Logger\Monolog">
        <arguments>
            <argument name="handlers" xsi:type="array">
                <item name="debug" xsi:type="object">Meta\BusinessExtension\Model\Logger\ApiDebugger</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Meta\BusinessExtension\Helper\GraphAPIAdapter">
        <arguments>
            <argument name="logger" xsi:type="object">Meta\BusinessExtension\Model\Logger\ApiLogger</argument>
        </arguments>
    </type>
    <type name="Meta\BusinessExtension\Logger">
        <arguments>
            <argument name="publisher" xsi:type="object">Magento\Framework\MessageQueue\PublisherInterface</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\MessageQueue\MergerFactory">
        <arguments>
            <argument name="mergers" xsi:type="array">
                <item name="persist.meta.telemetry.logs.consumer" xsi:type="string">
                    Meta\BusinessExtension\Model\PersistMetaTelemetryLogsMerger
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Meta\BusinessExtension\Controller\Adminhtml\ApiKey\Index">
        <arguments>
            <argument name="configWriter" xsi:type="object">Magento\Framework\App\Config\Storage\WriterInterface;
            </argument>
        </arguments>
    </type>
</config>
