<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- API Implementation -->
    <preference for="PortalPeople\GetAddressAutocomplete\Api\AddressAutocompleteInterface" type="PortalPeople\GetAddressAutocomplete\Model\AddressAutocompleteManagement"/>
    
    <!-- Configuration Provider -->
    <type name="PortalPeople\GetAddressAutocomplete\Model\AddressAutocompleteManagement">
        <arguments>
            <argument name="scopeConfig" xsi:type="object">Magento\Framework\App\Config\ScopeConfigInterface</argument>
            <argument name="httpClient" xsi:type="object">Magento\Framework\HTTP\ZendClientFactory</argument>
            <argument name="logger" xsi:type="object">Psr\Log\LoggerInterface</argument>
        </arguments>
    </type>

    <!-- Checkout Config Provider -->
    <type name="Magento\Checkout\Model\CompositeConfigProvider">
        <arguments>
            <argument name="configProviders" xsi:type="array">
                <item name="getaddress_autocomplete_config" xsi:type="object">PortalPeople\GetAddressAutocomplete\Model\Checkout\ConfigProvider</item>
            </argument>
        </arguments>
    </type>
</config>
