Liferay.Loader.define("@liferay/analytics-settings-web@5.0.51/js/components/table/Content",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/table","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../utils/filter","./Context","./types"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l("@frontend-taglib-clay$clayui/form"),n=_interopRequireDefault(l("@frontend-taglib-clay$clayui/icon")),r=_interopRequireDefault(l("@frontend-taglib-clay$clayui/table")),u=_interopRequireDefault(l("liferay!frontend-js-react-web$classnames")),d=_interopRequireDefault(l("liferay!frontend-js-react-web$react")),o=l("../../utils/filter"),c=l("./Context"),f=l("./types");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=({columns:e,disabled:t,showCheckbox:l})=>{const{filter:i,formattedItems:s,rows:m}=(0,c.useData)(),y=(0,c.useDispatch)();return d.default.createElement(r.default,{className:"compose-table",hover:!t},d.default.createElement(r.default.Head,null,d.default.createElement(r.default.Row,null,l&&d.default.createElement(r.default.Cell,null),e.map((({align:e=f.EColumnAlign.Left,expanded:t=!1,id:l,label:a,show:u=!0})=>u&&d.default.createElement(r.default.Cell,{columnTextAlignment:e,expanded:t,headingCell:!0,key:l},d.default.createElement("span",null,a),i.value===l&&d.default.createElement("span",null,d.default.createElement(n.default,{symbol:i.type===o.OrderBy.Asc?"order-arrow-up":"order-arrow-down"}))))))),d.default.createElement(r.default.Body,null,m.map((n=>{const{checked:o=!1,columns:i,disabled:m=!1}=s[n];return d.default.createElement(r.default.Row,{className:(0,u.default)({"table-active":o}),"data-testid":i[0].value,key:n},l&&d.default.createElement(r.default.Cell,{className:(0,u.default)({"text-muted":t||m})},d.default.createElement(a.ClayCheckbox,{checked:o,disabled:t||m,id:n,onChange:()=>{t||m||y({payload:n,type:c.Events.ChangeItems})}})),i.map((({cellRenderer:l,id:a,value:o},c)=>{const{align:i=f.EColumnAlign.Left,show:y=!0}=e[c];return y&&d.default.createElement(r.default.Cell,{className:(0,u.default)({"text-muted":t||m}),columnTextAlignment:i,key:a,role:n},l?l(s[n]):o)})))}))))};t.default=_default}}));
//# sourceMappingURL=Content.js.map