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

// @codingStandardsIgnoreFile
?>
<?php
/** @var $block \Magento\Framework\View\Element\Template */
/** @var $helper \Magento\Search\Helper\Data */
$helper = $this->helper(\Magento\Search\Helper\Data::class);
?>
<div class="block block-search">
    <div class="block block-title"><strong><?= /* @escapeNotVerified */ __('Search') ?></strong></div>
    <div class="block block-content">
        <form class="form minisearch" id="search_mini_form" action="<?= /* @escapeNotVerified */ $helper->getResultUrl() ?>" method="get">
            <div class="field search">
                <label class="label" for="search" data-role="minisearch-label">
                    <span><?= /* @escapeNotVerified */ __('Search') ?></span>
                </label>
                <div class="control">
                    <input id="search"
                           data-mage-init='{"quickSearch":{
                                "formSelector":"#search_mini_form",
                                "url":"<?= /* @escapeNotVerified */ $helper->getSuggestUrl()?>",
                                "destinationSelector":"#search_autocomplete"}
                           }'
                           type="text"
                           name="<?= /* @escapeNotVerified */ $helper->getQueryParamName() ?>"
                           value="<?= /* @escapeNotVerified */ $helper->getEscapedQueryText() ?>"
                           placeholder="<?= /* @escapeNotVerified */ __('Search entire store here...') ?>"
                           class="input-text"
                           maxlength="<?= /* @escapeNotVerified */ $helper->getMaxQueryLength() ?>"
                           role="combobox"
                           aria-haspopup="false"
                           aria-autocomplete="both"
                           autocomplete="off"/>
                    <div id="search_autocomplete" class="search-autocomplete"></div>
                    <?= $block->getChildHtml() ?>
                </div>
            </div>
            <div class="actions">
                <button type="submit"
                        title="<?= $block->escapeHtml(__('Search')) ?>"
                        class="action search">
                    <span><?= /* @escapeNotVerified */ __('Search') ?></span>
                </button>
                <div class="search-loader">
                    <svg width="200" height="200" viewBox="0 0 200 200">
                        <circle r="35" cx="100" cy="100" class="search-loader__outer"></circle>
                        <circle r="35" cx="100" cy="100" class="search-loader__background"></circle>
                        <line x1="130" y1="100" x2="175" y2="100" class="search-loader__grip"></line>
                    </svg>
                </div>
            </div>
        </form>
    </div>
</div>

