<?php
/**
 * Copyright © 2016 Magento. 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');
?>
<div class="block block-search">
  <div class="block-search-inner">
    <div class="block block-title"><strong><?php /* @escapeNotVerified */ echo __('Search'); ?></strong></div>
    <div class="block block-content">
        <form class="form minisearch" id="search_mini_form" action="<?php /* @escapeNotVerified */ echo $helper->getResultUrl() ?>" method="get">
            <div class="field search">
                <label class="label" for="search" data-role="minisearch-label">
                    <span><?php /* @escapeNotVerified */ echo __('Search'); ?></span>
                </label>
                <div class="control">
                    <!--?php $blockObj= $block->getLayout()->createBlock('Megnor\CategoryList\Block\CategoryList')->setTemplate("CategoryList::storecategories.phtml")->toHtml();
                            echo $blockObj;
                            ?-->
                    <input id="search"
                           data-mage-init='{"quickSearch":{
                                "formSelector":"#search_mini_form",
                                "url":"<?php /* @escapeNotVerified */ echo $block->getUrl('search/ajax/suggest', ['_secure' => $block->getRequest()->isSecure()]); ?>",
                                "destinationSelector":"#search_autocomplete"}
                           }'
                           type="text"
                           name="<?php /* @escapeNotVerified */ echo $helper->getQueryParamName() ?>"
                           value="<?php /* @escapeNotVerified */ echo $helper->getEscapedQueryText() ?>"
                           placeholder="<?php /* @escapeNotVerified */ echo __('Search Your Products...'); ?>"
                           class="input-text"
                           maxlength="<?php /* @escapeNotVerified */ echo $helper->getMaxQueryLength();?>"
                           role="combobox"
                           aria-haspopup="false"
                           aria-autocomplete="both"
                           autocomplete="off"
                           aria-expanded= "true"/>
                    <!-- <div id="search_autocomplete" class="search-autocomplete"></div> -->
                    <!-- <?php //echo $block->getChildHtml() ?> -->
                </div>
            </div>
            <div class="actions">
                <button type="submit"
                        title="<?php echo $block->escapeHtml(__('Search')) ?>"
                        class="action search">
                    <span><?php /* @escapeNotVerified */ echo __('Search'); ?></span>
                </button>
            </div>
        </form>
    </div>

  </div>
</div>
