import e from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import t from"../../../../@babel/runtime/helpers/esm/extends.js";import*as i from"react";import a from"../../../../prop-types/index.js";import o from"../../../../clsx/dist/clsx.m.js";import n from"../styles/withStyles.js";import r from"../utils/capitalize.js";import{lighten as l,fade as d,darken as p}from"../styles/colorManipulator.js";import s from"../Table/TableContext.js";import c from"../Table/Tablelvl2Context.js";var g=function(e){return{root:t({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n    ".concat("light"===e.palette.type?l(d(e.palette.divider,1),.88):p(d(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}},m=i.forwardRef((function(a,n){var l,d,p=a.align,g=void 0===p?"inherit":p,m=a.classes,f=a.className,h=a.component,x=a.padding,y=a.scope,u=a.size,b=a.sortDirection,v=a.variant,j=e(a,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),z=i.useContext(s),T=i.useContext(c),k=T&&"head"===T.variant;h?(d=h,l=k?"columnheader":"cell"):d=k?"th":"td";var C=y;!C&&k&&(C="col");var R=x||(z&&z.padding?z.padding:"default"),N=u||(z&&z.size?z.size:"medium"),A=v||T&&T.variant,O=null;return b&&(O="asc"===b?"ascending":"descending"),i.createElement(d,t({ref:n,className:o(m.root,m[A],f,"inherit"!==g&&m["align".concat(r(g))],"default"!==R&&m["padding".concat(r(R))],"medium"!==N&&m["size".concat(r(N))],"head"===A&&z&&z.stickyHeader&&m.stickyHeader),"aria-sort":O,role:l,scope:C},j))}));"production"!==process.env.NODE_ENV&&(m.propTypes={align:a.oneOf(["center","inherit","justify","left","right"]),children:a.node,classes:a.object,className:a.string,component:a.elementType,padding:a.oneOf(["checkbox","default","none"]),scope:a.string,size:a.oneOf(["medium","small"]),sortDirection:a.oneOf(["asc","desc",!1]),variant:a.oneOf(["body","footer","head"])});var f=n(g,{name:"MuiTableCell"})(m);export default f;export{g as styles};
//# sourceMappingURL=TableCell.js.map
