<?php
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_AbandonedCart
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */

use Mageplaza\AbandonedCart\Helper\Data as HelperData;

/**
 * @var Mageplaza\AbandonedCart\Block\Menu $block
 */
$gridName       = $block->getGridName();
$date           = $block->getDateRange();
$menu           = $block->getMenuUrls() ? $block->getMenuUrls() : [];
$storeFilterUrl = $block->getUrl('abandonedcart/details/storefilter', ['form_key' => $block->getFormKey()]);
?>
<div id="menu" class="mp_menu"
     data-mage-init='{"Mageplaza_AbandonedCart/js/menu":
     {"gridName":"<?=/* @noEscape */ $gridName ?>",
     "date":<?= /* @noEscape */ HelperData::jsonEncode($date) ?>,
     "storeUrl":"<?=/* @noEscape */ $storeFilterUrl ?>"}}'>
    <div class="admin__action-dropdown-wrap menu-select">
        <a href="#" class="admin__action-dropdown"
           title="Menu"
           data-mage-init='{"dropdown":{"autoPosition":true}}'
           data-toggle="dropdown">
            <i class="fa fa-bars"></i>
        </a>
        <ul class="admin__action-dropdown-menu">
            <?php foreach ($menu as $item): ?>
                <li><a href="<?= $block->escapeUrl($item['path']) ?>"><?= $block->escapeHtml($item['label']) ?></a></li>
            <?php endforeach; ?>
        </ul>
    </div>
    <div class="date-range-picker">
        <div id="daterange">
            <i class="fa fa-calendar"></i>
            <span></span>
            <i class="fa fa-caret-down"></i>
        </div>
    </div>
    <div class="mp-rp-store-switcher">
        <?= $block->getChildHtml('mp.checkout.report.store_switcher') ?>
    </div>
    <div class="customer-group">
        <label for="customer-group-id"> </label>
        <select id="customer-group-id">
            <?php foreach ($block->getCustomerGroup() as $group): ?>
                <option value="<?=  /* @noEscape */ $group['value'] ?>">
                    <?= $block->escapeHtml($group['label']) ?>
                </option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="period">
        <span><strong><?= $block->escapeHtml(__('Group By')) ?></strong></span>
        <label for="period"></label>
        <select id="period">
            <option value="day"><?= $block->escapeHtml(__('Day')) ?></option>
            <option value="week"><?= $block->escapeHtml(__('Week')) ?></option>
            <option value="month"><?= $block->escapeHtml(__('Month')) ?></option>
            <option value="year"><?= $block->escapeHtml(__('Year')) ?></option>
        </select>
    </div>
</div>




