<?php
if (!defined('ABSPATH')) exit; // Exit if accessed directly 
?>

<div class="iwbvel-top-nav-filters">
    <div class="iwbvel-top-nav-filters-left">
        <?php $iwbvel_quick_search_input = (isset($last_filter_data) && !empty($last_filter_data['search_type']) && $last_filter_data['search_type'] == 'quick_search') ? $last_filter_data : ''; ?>
        <div class="iwbvel-top-nav-filters-search">
            <input type="text" id="iwbvel-quick-search-text" placeholder="<?php esc_html_e('Quick Search ...', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>" title="Quick Search" value="<?php echo (isset($iwbvel_quick_search_input['quick_search_text'])) ? esc_attr($iwbvel_quick_search_input['quick_search_text']) : '' ?>">
            <select id="iwbvel-quick-search-field" title="Select Field">
                <option value="title" <?php echo (isset($iwbvel_quick_search_input['quick_search_field']) && $iwbvel_quick_search_input['quick_search_field'] == 'title') ? 'selected' : '' ?>>
                    <?php esc_html_e('Title', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="sku" <?php echo (isset($iwbvel_quick_search_input['quick_search_field']) && $iwbvel_quick_search_input['quick_search_field'] == 'sku') ? 'selected' : '' ?>>
                    <?php esc_html_e('SKU', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="id" <?php echo (isset($iwbvel_quick_search_input['quick_search_field']) && $iwbvel_quick_search_input['quick_search_field'] == 'id') ? 'selected' : '' ?>>
                    <?php esc_html_e('ID', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
            </select>
            <select id="iwbvel-quick-search-operator" title="Select Operator">
                <option value="like" <?php echo (isset($iwbvel_quick_search_input['quick_search_operator']) && $iwbvel_quick_search_input['quick_search_operator'] == 'like') ? 'selected' : '' ?>>
                    <?php esc_html_e('Like', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="exact" <?php echo (isset($iwbvel_quick_search_input['quick_search_operator']) && $iwbvel_quick_search_input['quick_search_operator'] == 'exact') ? 'selected' : '' ?>>
                    <?php esc_html_e('Exact', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="not" <?php echo (isset($iwbvel_quick_search_input['quick_search_operator']) && $iwbvel_quick_search_input['quick_search_operator'] == 'not') ? 'selected' : '' ?>>
                    <?php esc_html_e('Not', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="begin" <?php echo (isset($iwbvel_quick_search_input['quick_search_operator']) && $iwbvel_quick_search_input['quick_search_operator'] == 'begin') ? 'selected' : '' ?>>
                    <?php esc_html_e('Begin', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
                <option value="end" <?php echo (isset($iwbvel_quick_search_input['quick_search_operator']) && $iwbvel_quick_search_input['quick_search_operator'] == 'end') ? 'selected' : '' ?>>
                    <?php esc_html_e('End', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>
                </option>
            </select>
            <button type="button" id="iwbvel-quick-search-button" class="iwbvel-filter-form-action" data-search-action="quick_search">
                <i class="iwbvel-icon-filter1"></i>
            </button>
            <button type="button" id="iwbvel-quick-search-reset" class="iwbvel-button iwbvel-button-blue" style="<?php echo (empty($iwbvel_quick_search_input)) ? 'display:none' : 'display:inline-table'; ?>">
                <svg width="16px" height="16px" fill="#fff" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
                    <path d="M524.8 106.666667c-106.666667 0-209.066667 42.666667-285.866667 110.933333l-8.533333-68.266667c0-25.6-21.333333-42.666667-46.933333-38.4-25.6 0-42.666667 21.333333-38.4 46.933334l8.533333 115.2c4.266667 55.466667 51.2 98.133333 106.666667 98.133333h8.533333L384 362.666667c25.6 0 42.666667-21.333333 38.4-46.933334 0-25.6-21.333333-42.666667-46.933333-38.4l-85.333334 4.266667c64-55.466667 145.066667-89.6 230.4-89.6 187.733333 0 341.333333 153.6 341.333334 341.333333s-153.6 341.333333-341.333334 341.333334-341.333333-153.6-341.333333-341.333334c0-25.6-17.066667-42.666667-42.666667-42.666666s-42.666667 17.066667-42.666666 42.666666c0 234.666667 192 426.666667 426.666666 426.666667s426.666667-192 426.666667-426.666667c4.266667-234.666667-187.733333-426.666667-422.4-426.666666z" />
                </svg>
            </button>
        </div>
        <div class="iwbvel-top-nav-divider"></div>

        <div class="iwbvel-status-filter-container">
            <button type="button" class="iwbvel-status-filter-button" title="<?php esc_attr_e('Status Filter', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?>">
                <?php esc_html_e('Statuses', 'ithemeland-bulk-variation-editing-for-woocommerce'); ?> <span class="iwbvel-status-filter-selected-name"></span>
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
                    <path d="M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z" />
                </svg>
            </button>

            <div class="iwbvel-top-nav-status-filter"></div>
        </div>
    </div>
</div>