<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var \Magento\ImportExport\Block\Adminhtml\Form\After $block */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>
<fieldset class="admin__fieldset" id="export_filter_container">
    <legend class="admin__legend">
        <span><?= $block->escapeHtml(__('Entity Attributes')) ?></span>
    </legend>
    <br />
    <form id="export_filter_form" action="<?= $block->escapeUrl($block->getUrl('*/*/export')) ?>" method="post">
        <input name="form_key" type="hidden" value="<?= /* @noEscape */ $block->getFormKey() ?>" />
        <div id="export_filter_grid_container"><!-- --></div>
    </form>
    <button class="action- scalable" type="button">
        <span><?= $block->escapeHtml(__('Continue')) ?></span>
    </button>
</fieldset>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'fieldset#export_filter_container') ?>
<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
    'onclick',
    "getFile();",
    'fieldset#export_filter_container button'
) ?>
<?php $scriptString = <<<script
require(['prototype'], function(){

//<![CDATA[
   $('entity').selectedIndex = 0; // forced resetting entity selector after page refresh
//]]>

});
script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
