import{__rest as e,__assign as r}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import o from"./TableElements/Table.js";import a from"./TableElements/TableBody.js";import l from"./TableElements/TableCell.js";import m from"./TableElements/TableDefaultParagraph.js";import n from"./TableElements/TableHeader.js";import s from"./TableElements/TableRow.js";import{TableElementTypes as d}from"./TableTypes.js";import i from"../../../node_modules/@material-ui/core/esm/styles/makeStyles.js";var p=function(e){var o=e.attributes,a=e.children;return e.leaf.bold&&(a=t.createElement("strong",null,a)),t.createElement("span",r({},o),a)};export default function(p){var b=p.addRowAfter,f=p.element,c=p.addColumnAfter,u=p.removeColumn,T=p.removeRow,w=p.properties,E=void 0===w?{tableData:[]}:w,C=e(p,["addRowAfter","element","addColumnAfter","removeColumn","removeRow","properties"]),v=E.table,g=void 0===v?{width:70}:v,y={border:"1px solid #fff !important",borderCollapse:"collapse !important"},h=i({headerCell:r({backgroundColor:"rgba(37,193,111,.05) !important",color:"#25c16f",padding:"20px !important",textTransform:"uppercase",fontWeight:"bold"},y),body:{},cell:r(r({backgroundColor:"#fff !important",padding:"15px !important",color:"#4d4d4d"},y),{borderBottom:"1px solid rgba(112,112,112,0.2) !important"}),row:{},table:{width:g.width+"%",margin:"auto"}}),j=f.type,R=f.children,x=void 0===R?[]:R,A=f.row,G=f.column;switch(j){case d.Table:return t.createElement(o,r({},C,{styleGenerator:h}));case d.TableHead:return t.createElement(n,r({},C,{styleGenerator:h}));case d.TableBody:return t.createElement(a,r({},C));case d.TableRow:return t.createElement(s,r({addRowAfter:b,removeRow:T,row:parseInt(A),totalColumns:x.length,styleGenerator:h},C));case d.TableCell:return t.createElement(l,r({addColumnAfter:c,column:parseInt(G),row:parseInt(A),removeColumn:u,styleGenerator:h},C));default:return t.createElement(m,r({},C))}}export{p as Leaf};
//# sourceMappingURL=TableElementsRenderer.js.map
