Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/views/table/TableHead",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./FieldsSelectorDropdown","./TableHeadCell","./dnd_table/index"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l("@frontend-taglib-clay$clayui/form"),n=(i(l("liferay!frontend-js-react-web$prop-types")),i(l("liferay!frontend-js-react-web$react"))),r=i(l("./FieldsSelectorDropdown")),d=i(l("./TableHeadCell")),o=i(l("./dnd_table/index"));function i(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e}).apply(this,arguments)}var f=function({fields:e,items:t,schema:l,selectItems:i,selectable:f,selectedItemsKey:s,selectedItemsValue:u,selectionType:m,sorting:p,updateSorting:b}){const y=e.some((e=>e.expand));return n.default.createElement(o.default.Head,null,n.default.createElement(o.default.Row,null,f&&n.default.createElement(o.default.Cell,{className:"item-selector",columnName:"item-selector",heading:!0},t.length&&"multiple"===m?n.default.createElement(a.ClayCheckbox,{checked:!!u.length,indeterminate:!!u.length&&t.length!==u.length,name:"table-head-selector",onChange:function(){return u.length===t.length?i([]):i(t.map((e=>e[s])))}}):null),e.map((e=>n.default.createElement(d.default,c({},e,{expandableColumns:y,key:e.label,sorting:p,updateSorting:b})))),n.default.createElement(o.default.Cell,{className:"item-actions",columnName:"item-actions",heading:!0},n.default.createElement(r.default,{fields:l.fields}))))};t.default=f}}));
//# sourceMappingURL=TableHead.js.map