<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* extension/dashboard/quick_search.twig */
class __TwigTemplate_781b72e6cad8b9967faaac28eac96591 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<div class=\"panel panel-default\">
  <div class=\"panel-heading\">
    <h3 class=\"panel-title\"><i class=\"fa fa-search\"></i> ";
        // line 3
        echo ($context["heading_title"] ?? null);
        echo "</h3>
  </div>
  <div class=\"panel-body\">
      <div class=\"row\">
          <div class=\"col-sm-4\">
          <div class=\"form-group\">
            <label class=\"control-label\" for=\"input-pname\">";
        // line 9
        echo ($context["entry_pname"] ?? null);
        echo "</label>
            <div class=\"input-group input-group-sm\">
              <input type=\"text\" name=\"filter_pname\" value=\"";
        // line 11
        echo ($context["filter_pname"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_pname"] ?? null);
        echo "\" id=\"input-pname\" class=\"form-control\" />
              <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('catalog/product','filter_name','filter_pname')\"><i class=\"fa fa-search\"></i></button></span>
            </div>
          </div>
        </div>
        
        <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-cname\">";
        // line 19
        echo ($context["entry_cname"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_cname\" value=\"";
        // line 21
        echo ($context["filter_cname"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_cname"] ?? null);
        echo "\" id=\"input-cname\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('catalog/category','filter_name','filter_cname')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
        
          <div class=\"col-sm-4\">
          <div class=\"form-group\">
            <label class=\"control-label\" for=\"input-manufacturer\">";
        // line 29
        echo ($context["entry_manufacturer"] ?? null);
        echo "</label>
            <div class=\"input-group input-group-sm\">
              <input type=\"text\" name=\"filter_pmanufacturer\" value=\"";
        // line 31
        echo ($context["filter_pmanufacturer"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_manufacturer"] ?? null);
        echo "\" id=\"input-manufacturer\" class=\"form-control\" />
              <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('catalog/manufacturer','filter_name','filter_pmanufacturer')\"><i class=\"fa fa-search\"></i></button></span>
            </div>
          </div>
        </div>
        
        <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-customer_name\">";
        // line 39
        echo ($context["entry_customer"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_customer_name\" value=\"";
        // line 41
        echo ($context["filter_customer_name"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_customer"] ?? null);
        echo "\" id=\"input-customer_name\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('customer/customer','filter_name','filter_customer_name')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
        
        <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-customer_email\">";
        // line 49
        echo ($context["entry_customer_email"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_customer_email\" value=\"";
        // line 51
        echo ($context["filter_customer_email"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_customer_email"] ?? null);
        echo "\" id=\"input-customer_email\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('customer/customer','filter_email','filter_customer_email')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
      
      <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-customer_telephone\">";
        // line 59
        echo ($context["entry_customer_telephone"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_customer_telephone\" value=\"";
        // line 61
        echo ($context["filter_customer_telephone"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_customer_telephone"] ?? null);
        echo "\" id=\"input-customer_telephone\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('customer/customer','filter_telephone','filter_customer_telephone')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
      
      <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-orderid\">";
        // line 69
        echo ($context["entry_orderid"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_orderid\" value=\"";
        // line 71
        echo ($context["filter_orderid"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_orderid"] ?? null);
        echo "\" id=\"input-orderid\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('sale/order','filter_order_id','filter_orderid')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
      
      <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-orderbycustomer\">";
        // line 79
        echo ($context["entry_orderbycustomer"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_orderbycustomer\" value=\"";
        // line 81
        echo ($context["filter_orderbycustomer"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_orderbycustomer"] ?? null);
        echo "\" id=\"input-orderbycustomer\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('sale/order','filter_customer','filter_orderbycustomer')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
      
      <div class=\"col-sm-4\">
        <div class=\"form-group\">
          <label class=\"control-label\" for=\"input-orderbycustomertel\">";
        // line 89
        echo ($context["entry_orderbycustomertel"] ?? null);
        echo "</label>
          <div class=\"input-group input-group-sm\">
            <input type=\"text\" name=\"filter_orderbycustomertel\" value=\"";
        // line 91
        echo ($context["filter_orderbycustomertel"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_orderbycustomertel"] ?? null);
        echo "\" id=\"input-orderbycustomertel\" class=\"form-control\" />
            <span class=\"input-group-btn\"><button class=\"btn btn-primary\" onclick=\"meadminsearch('sale/order','filter_telephone','filter_orderbycustomertel')\"><i class=\"fa fa-search\"></i></button></span>
          </div>
        </div>
      </div>
      </div>
  </div>
</div>

<script type=\"text/javascript\"><!--
\$('.search-toggle').on('click', function(event){
    event.preventDefault();
  \$('.me_dropdown_menu').toggle();
});
\$(document).on(\"click\", function(event){
  var \$trigger = \$(\"#me_admin_search\");
  if(\$trigger !== event.target && !\$trigger.has(event.target).length){
    \$('.me_dropdown_menu').css('display','none');
  }            
});

\$('#button-searchdate').on('click', function() {
  var url = '';
  
  var filter_from_date = \$('input[name=\\'filter_from_date\\']').val();

  if (filter_from_date) {
    url += '&filter_from_date=' + encodeURIComponent(filter_from_date);
  }
  
  var filter_to_date = \$('input[name=\\'filter_to_date\\']').val();

  if (filter_to_date) {
    url += '&filter_to_date=' + encodeURIComponent(filter_to_date);
  }
  
  location = 'index.php?route=sale/order&user_token=";
        // line 127
        echo ($context["user_token"] ?? null);
        echo "' + url;
});

//Category
\$('input[name=\\'filter_cname\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/category/autocomplete&user_token=";
        // line 134
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['category_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_cname\\']').val(item['label']);
  }
});

//Product Name
\$('input[name=\\'filter_pname\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/product/autocomplete&user_token=";
        // line 155
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['product_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_pname\\']').val(item['label']);
  }
});

\$('input[name=\\'filter_orderbyproduct\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/product/autocomplete&user_token=";
        // line 175
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['product_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_orderbyproduct\\']').val(item['label']);
  }
});

//Product Model
  \$('input[name=\\'filter_pmodel\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/product/autocomplete&user_token=";
        // line 196
        echo ($context["user_token"] ?? null);
        echo "&filter_model=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['model'],
            value: item['product_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_pmodel\\']').val(item['label']);
  }
});

//Product SKU
  \$('input[name=\\'filter_psku\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=extension/module/me_admin_search/pautocomplete&user_token=";
        // line 217
        echo ($context["user_token"] ?? null);
        echo "&filter_sku=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['sku'],
            value: item['product_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_psku\\']').val(item['label']);
  }
});

//Manufacturer
\$('input[name=\\'filter_pmanufacturer\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/manufacturer/autocomplete&user_token=";
        // line 238
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['manufacturer_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_pmanufacturer\\']').val(item['label']);
  }
});

//Option
\$('input[name=\\'filter_poption\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=catalog/option/autocomplete&user_token=";
        // line 259
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['option_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_poption\\']').val(item['label']);
  }
});

//Customer
\$('input[name=\\'filter_customer_name\\']').autocomplete({
    'source': function(request, response) {
      \$.ajax({
        url: 'index.php?route=customer/customer/autocomplete&user_token=";
        // line 280
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
        dataType: 'json',
        success: function(json) {
          response(\$.map(json, function(item) {
            return {
              label: item['name'],
              value: item['customer_id']
            }
          }));
        }
      });
    },
    'select': function(item) {
      \$('input[name=\\'filter_customer_name\\']').val(item['label']);
    }
});

\$('input[name=\\'filter_orderbycustomer\\']').autocomplete({
    'source': function(request, response) {
      \$.ajax({
        url: 'index.php?route=customer/customer/autocomplete&user_token=";
        // line 300
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
        dataType: 'json',
        success: function(json) {
          response(\$.map(json, function(item) {
            return {
              label: item['name'],
              value: item['customer_id']
            }
          }));
        }
      });
    },
    'select': function(item) {
      \$('input[name=\\'filter_orderbycustomer\\']').val(item['label']);
    }
});

\$('input[name=\\'filter_customer_email\\']').autocomplete({
    'source': function(request, response) {
      \$.ajax({
        url: 'index.php?route=customer/customer/autocomplete&user_token=";
        // line 320
        echo ($context["user_token"] ?? null);
        echo "&filter_email=' +  encodeURIComponent(request),
        dataType: 'json',
        success: function(json) {
          response(\$.map(json, function(item) {
            return {
              label: item['email'],
              value: item['customer_id']
            }
          }));
        }
      });
    },
    'select': function(item) {
      \$('input[name=\\'filter_customer_email\\']').val(item['label']);
    }
});

\$('input[name=\\'filter_mcoupon\\']').autocomplete({
  'source': function(request, response) {
    \$.ajax({
      url: 'index.php?route=extension/module/me_admin_search/autocomplete&user_token=";
        // line 340
        echo ($context["user_token"] ?? null);
        echo "&filter_name=' +  encodeURIComponent(request),
      dataType: 'json',
      success: function(json) {
        response(\$.map(json, function(item) {
          return {
            label: item['name'],
            value: item['coupon_id']
          }
        }));
      }
    });
  },
  'select': function(item) {
    \$('input[name=\\'filter_mcoupon\\']').val(item['label']);
  }
});

\$('#me_admin_search input').on('keydown', function(e) {
  if (e.keyCode == 13) {
    \$(this).parent().find('button').trigger('click');
  }
});

function meadminsearch(route,key,filter_key){
  var url = '';
  
  if(key == 'filter_order_status_id'){
    var filter_key_value = \$('select[name=\\''+ filter_key +'\\']').val();
  }else{
    var filter_key_value = \$('input[name=\\''+ filter_key +'\\']').val();
  }
  
  if (filter_key_value) {
    url += '&'+ key +'=' + encodeURIComponent(filter_key_value);
  }
  
  location = 'index.php?route='+ route +'&user_token=";
        // line 376
        echo ($context["user_token"] ?? null);
        echo "' + url;
}
//--></script>
<script type=\"text/javascript\"><!--
\$('.date').datetimepicker({
  language: '";
        // line 381
        echo ($context["datepicker"] ?? null);
        echo "',
  pickTime: false
});
//--></script>";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "extension/dashboard/quick_search.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  533 => 381,  525 => 376,  486 => 340,  463 => 320,  440 => 300,  417 => 280,  393 => 259,  369 => 238,  345 => 217,  321 => 196,  297 => 175,  274 => 155,  250 => 134,  240 => 127,  199 => 91,  194 => 89,  181 => 81,  176 => 79,  163 => 71,  158 => 69,  145 => 61,  140 => 59,  127 => 51,  122 => 49,  109 => 41,  104 => 39,  91 => 31,  86 => 29,  73 => 21,  68 => 19,  55 => 11,  50 => 9,  41 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "extension/dashboard/quick_search.twig", "");
    }
}
