"use strict";define(["jquery","bootstrap","backend","table","form"],function(e,t,a,n,c){var l={select:function(){n.api.init({extend:{index_url:"wanlshop/icon/select"}});var t=[],c=e("#table");c.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table",function(a,n){"check"==a.type||"uncheck"==a.type?n=[n]:t=[],e.each(n,function(e,n){if(a.type.indexOf("uncheck")>-1){var c=t.indexOf(n.class);c>-1&&t.splice(c,1)}else-1==t.indexOf(n.class)&&t.push(n.class)})}),c.bootstrapTable({url:e.fn.bootstrapTable.defaults.extend.index_url,sortName:"id",showToggle:!1,showExport:!1,columns:[[{field:"state",checkbox:!0},{field:"class",title:__("Class")},{field:"class",title:__("Icon"),formatter:l.api.formatter.icon},{field:"name",title:__("Name")},{field:"operate",title:__("Operate"),events:{"click .btn-chooseone":function(e,t,n,c){var l=a.api.query("multiple");l="true"==l,Fast.api.close({name:n.class,multiple:l})}},formatter:function(){return' '+__("Choose")+""}}]]}),e(document).on("click",".btn-choose-multi",function(){var e=a.api.query("multiple");e="true"==e,Fast.api.close({name:t.join(","),multiple:e})}),n.api.bindevent(c)},api:{formatter:{icon:function(e,t,a){return''}}}};return l});