"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),l=require("react/jsx-runtime"),r=require("prop-types"),i=require("@material-ui/core"),n=require("react"),d=require("./ResizableTableHeaderCell.js"),u=require("./ResizableTableCell.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(r),a=function(r){var o,s,a,t,c,p=r.children,v=e.__rest(r,["children"]),h=p,f=h[0],b=h[1],j=null===(o=null==b?void 0:b.props)||void 0===o?void 0:o.children,_=null===(c=null===(t=null===(a=null===(s=null==f?void 0:f.props)||void 0===s?void 0:s.children)||void 0===a?void 0:a.props)||void 0===t?void 0:t.children)||void 0===c?void 0:c.reduce((function(e,l){return Array.isArray(l)?e.push.apply(e,l):e.push(l),e}),[]),y=n.useState({}),x=y[0],m=y[1],T=function(l){return m((function(r){return e.__assign(e.__assign({},r),l)}))};return l.jsxs(i.Table,e.__assign({},v,{children:[l.jsx(i.TableHead,{children:l.jsx(i.TableRow,{children:null==_?void 0:_.map((function(r,n){var u;return r?n===_.length-1?l.jsx(i.TableCell,e.__assign({},r.props,{children:null===(u=r.props)||void 0===u?void 0:u.children}),r.key||n):l.jsx(d,e.__assign({cellName:"cell".concat(n),nextCellName:"cell".concat(n+1),handleWidthsUpdate:T,widths:x},{children:r}),r.key||n):null}))})}),l.jsx(i.TableBody,{children:null==j?void 0:j.map((function(e){var r,n;return l.jsx(i.TableRow,{children:null===(n=null===(r=null==e?void 0:e.props)||void 0===r?void 0:r.children)||void 0===n?void 0:n.map((function(e,r){return e&&l.jsx(u,{children:e},e.key||r)}))},e.key)}))})]}))},t={children:s.default.arrayOf(s.default.node).isRequired};a.propTypes=t,module.exports=a;
