"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/toConsumableArray"),l=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("react/jsx-runtime"),i=require("prop-types"),u=require("@material-ui/core"),o=require("react"),a=require("./ResizableTableHeaderCell.js"),c=require("./ResizableTableCell.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=d(e),p=d(r),b=d(l),f=d(t),h=d(i),y=["children"];function j(e,r){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),l.push.apply(l,t)}return l}function v(e){for(var r=1;r<arguments.length;r++){var l=null!=arguments[r]?arguments[r]:{};r%2?j(Object(l),!0).forEach((function(r){s.default(e,r,l[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):j(Object(l)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(l,r))}))}return e}var O=function(e){var r,l,t,i,d,s=e.children,h=f.default(e,y),j=b.default(s,2),O=j[0],m=j[1],q=null==m||null===(r=m.props)||void 0===r?void 0:r.children,x=null==O||null===(l=O.props)||void 0===l||null===(t=l.children)||void 0===t||null===(i=t.props)||void 0===i||null===(d=i.children)||void 0===d?void 0:d.reduce((function(e,r){return Array.isArray(r)?e.push.apply(e,p.default(r)):e.push(r),e}),[]),P=o.useState({}),T=b.default(P,2),w=T[0],g=T[1],k=function(e){return g((function(r){return v(v({},r),e)}))};return n.jsxs(u.Table,v(v({},h),{},{children:[n.jsx(u.TableHead,{children:n.jsx(u.TableRow,{children:null==x?void 0:x.map((function(e,r){var l;return e?r===x.length-1?n.jsx(u.TableCell,v(v({},e.props),{},{children:null===(l=e.props)||void 0===l?void 0:l.children}),e.key||r):n.jsx(a,{cellName:"cell".concat(r),nextCellName:"cell".concat(r+1),handleWidthsUpdate:k,widths:w,children:e},e.key||r):null}))})}),n.jsx(u.TableBody,{children:null==q?void 0:q.map((function(e){var r,l;return n.jsx(u.TableRow,{children:null==e||null===(r=e.props)||void 0===r||null===(l=r.children)||void 0===l?void 0:l.map((function(e,r){return e&&n.jsx(c,{children:e},e.key||r)}))},e.key)}))})]}))},m={children:h.default.arrayOf(h.default.node).isRequired};O.propTypes=m,module.exports=O;
//# sourceMappingURL=ResizableTable.js.map
