YUI.add("button-group",function(o,t){var e="contentBox",n=o.ButtonCore.CLASS_NAMES;function s(){s.superclass.constructor.apply(this,arguments)}o.ButtonGroup=o.extend(s,o.Widget,{renderUI:function(){this.getButtons().plug(o.Plugin.Button)},bindUI:function(){var t=this;t.get(e).delegate("click",t._handleClick,o.ButtonGroup.BUTTON_SELECTOR,t),t.after("disabledChange",t._afterDisabledChange)},_afterDisabledChange:function(t){this.getButtons().each(t.newVal?o.ButtonCore.prototype.disable:o.ButtonCore.prototype.enable)},getButtons:function(){return this.get(e).all(o.ButtonGroup.BUTTON_SELECTOR)},getSelectedButtons:function(){var e=[],t=this.getButtons(),n=s.CLASS_NAMES.SELECTED;return t.each(function(t){t.hasClass(n)&&e.push(t)}),e},getSelectedValues:function(){var e,t=this.getSelectedButtons(),n=[];return o.Array.each(t,function(t){e=t.getContent(),n.push(e)}),n},_handleClick:function(t){var e=this,n=t.target.ancestor("."+s.CLASS_NAMES.BUTTON,!0),o=e.get("type"),u=s.CLASS_NAMES.SELECTED,i=n.hasClass(u);"checkbox"===o?(n.toggleClass(u,!i),e.fire("selectionChange",{originEvent:t})):"radio"!==o||i||(e.getButtons().removeClass(u),n.addClass(u),e.fire("selectionChange",{originEvent:t}))}},{NAME:"buttongroup",ATTRS:{type:{writeOnce:"initOnly",value:"radio"}},CLASS_NAMES:n,BUTTON_SELECTOR:"button, input[type=button], input[type=reset], input[type=submit], input[type=radio], input[type=checkbox]"})},"patched-v3.18.7",{requires:["button-plugin","cssbutton","widget"]});