Widget:DropdownSelects

!function{"use strict";var e=document.currentScript;if(e)var t=setInterval(function{var n;try{n=mw.loader.using&&$&&"loading"!==document.readyState}catch(e){return}n&&(clearInterval(t),mw.loader.using("oojs-ui-core",function{var t="All",n=$(".hero-filter-element");function a(e,n){return new OO.ui.DropdownWidget({indicator:"down",label:e,menu:{items:[t].concat(n.split(",")).map(function(e,t){return new OO.ui.MenuOptionWidget({data:(t-1).toString,label:e})})}})}var i=a("Color",e.dataset.colors),o=a("Weapon Types",e.dataset.weaponTypes),s=a("Move Types",e.dataset.moveTypes),l=a("Entry",e.dataset.titles),r=i.getMenu,d=s.getMenu,c=o.getMenu,u=l.getMenu;function m{var e=r.findSelectedItem,a=c.findSelectedItem,i=d.findSelectedItem,o=u.findSelectedItem;n.css("display",function{var n=(this.dataset.weaponProps||"").split(";"),s=(this.dataset.titles||"").split(";");return e&&e.getLabel!==t&&!(n.indexOf(e.getLabel)>-1)||a&&a.getLabel!==t&&!(n.indexOf(a.getLabel)>-1)||i&&i.getLabel!==t&&this.dataset.moveType!==i.getLabel||o&&o.getLabel!==t&&!(s.indexOf(o.getData)>-1)?"none":""})}c.$element.append(" "),c.addItems(e.dataset.weaponClasses.split(",").map(function(e){return new OO.ui.MenuOptionWidget({label:e})})),i.$element.css("max-width","9em"),o.$element.css("max-width","12em"),s.$element.css("max-width","10em"),l.$element.css("max-width","20em"),r.on("choose",m),d.on("choose",m),c.on("choose",m),u.on("choose",m),new OO.ui.HorizontalLayout({items:[i,o,s,l]}).$element.insertAfter(e)}))},1e3)};