//>>built
define("dgrid/extensions/CompoundColumns",["dojo/_base/lang","dojo/_base/declare","dgrid/Grid","put-selector/put","xstyle/css!../css/extensions/CompoundColumns.css"],function(_1,_2,_3,_4){return _2("dgrid.extensions.CompoundColumns",null,{configStructure:function(){var _5=(this.subRows&&this.subRows[0])||this.columns,_6=[[]],_7=[];_6[0].className="dgrid-spacer-row";function _8(_9,_a,_b){var _c=0,_d=function(){},i,_e,_f,_10;for(i in _9){_e=_9[i];_f=_e.children;_10=_e.children&&(_e.showChildHeaders!==false);if(_f){_c+=(_e.colSpan=_8(_f,_a+1,_10));}else{_7.push(_e);_6[0].push(_1.delegate(_e,{renderHeaderCell:_d}));_c++;}if(!_10){_e=_1.delegate(_e,{rowSpan:-_a});}if(_b){(_6[_a]||(_6[_a]=[])).push(_e);}}return _c;};_8(_5,1,true);var _11=_6.length,i,j,_12,_13;for(i=0;i<_11;i++){_12=_6[i];for(j=0;j<_12.length;j++){_13=_12[j];if(_13.rowSpan<1){_13.rowSpan+=_11;}}}_7=[_7];_7.headerRows=_6;this.subRows=_7;this.inherited(arguments);}});});