"use strict";var KTDatatableJsonRemoteDemo={init:function(){var t;t=$("#kt_datatable").KTDatatable({data:{type:"remote",source:HOST_URL+"/api/?file=datatables/datasource/default.json",pageSize:10},layout:{scroll:!1,footer:!1},sortable:!0,pagination:!0,search:{input:$("#kt_datatable_search_query"),key:"generalSearch"},columns:[{field:"RecordID",title:"#",sortable:!1,width:20,type:"number",selector:{class:""},textAlign:"center"},{field:"OrderID",title:"Order ID"},{field:"Country",title:"Country",template:function(t){return t.Country+" "+t.ShipCountry}},{field:"ShipAddress",title:"Ship Address"},{field:"ShipDate",title:"Ship Date",type:"date",format:"MM/DD/YYYY"},{field:"Status",title:"Status",template:function(t){var a={1:{title:"Pending",class:" label-light-success"},2:{title:"Delivered",class:" label-light-primary"},3:{title:"Canceled",class:" label-light-primary"},4:{title:"Success",class:" label-light-success"},5:{title:"Info",class:" label-light-info"},6:{title:"Danger",class:" label-light-danger"},7:{title:"Warning",class:" label-light-warning"}};return''+a[t.Status].title+""}},{field:"Type",title:"Type",autoHide:!1,template:function(t){var a={1:{title:"Online",state:"danger"},2:{title:"Retail",state:"primary"},3:{title:"Direct",state:"success"}};return''+a[t.Type].title+""}},{field:"Actions",title:"Actions",sortable:!1,width:125,autoHide:!1,overflow:"visible",template:function(){return' '}}]}),$("#kt_datatable_search_status").on("change",function(){t.search($(this).val().toLowerCase(),"Status")}),$("#kt_datatable_search_type").on("change",function(){t.search($(this).val().toLowerCase(),"Type")}),$("#kt_datatable_search_status, #kt_datatable_search_type").selectpicker()}};jQuery(document).ready(function(){KTDatatableJsonRemoteDemo.init()});