<?xml version="1.0"?>
<!--
    Formulario de dirección del popup post-login social (Controller\Address\Popup).
    Mismo bloque y argumentos que customer_address_form.xml, sin página alrededor.
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <container name="root">
        <block class="Magento\Customer\Block\Address\Edit" name="elganso.social.address.form" template="Magento_Customer::address/edit.phtml" cacheable="false">
            <arguments>
                <argument name="attribute_data" xsi:type="object">Magento\Customer\Block\DataProviders\AddressAttributeData</argument>
                <argument name="post_code_config" xsi:type="object">Magento\Customer\Block\DataProviders\PostCodesPatternsAttributeData</argument>
                <argument name="view_model" xsi:type="object">Magento\Customer\ViewModel\Address</argument>
                <argument name="region_provider" xsi:type="object">Magento\Customer\ViewModel\Address\RegionProvider</argument>
            </arguments>
            <!-- La plantilla lo pinta con getBlockHtml('formkey'); en las páginas
                 normales lo declara default.xml, que este handle no carga. -->
            <block class="Magento\Framework\View\Element\FormKey" name="formkey"/>
            <!-- Género y fecha de nacimiento (datos del cliente; los guarda Controller\Address\Save) -->
            <block class="Magento\Customer\Block\Form\Edit"
                   name="elganso.social.address.customer_fields"
                   as="fieldset_address_info_additional"
                   template="Yeboyebo_SocialLogin::address-popup-customer-fields.phtml"
                   cacheable="false"/>
        </block>
    </container>
</layout>
