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