import{r as l,a3 as R,a4 as $,al as A,am as P,ao as u,j,aq as M,ar as o,as as _,at as D,ay as N,aA as z,az as U}from"./index-B1H8BCL7.js";const W=l.createContext(),E=l.createContext();function L(a){return R("MuiTableCell",a)}const q=$("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),B=["align","className","component","padding","scope","size","sortDirection","variant"],I=a=>{const{classes:e,variant:i,align:s,padding:r,size:g,stickyHeader:d}=a,x={root:["root",i,d&&"stickyHeader",s!=="inherit"&&`align${o(s)}`,r!=="normal"&&`padding${o(r)}`,`size${o(g)}`]};return _(x,L,e)},J=D("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(a,e)=>{const{ownerState:i}=a;return[e.root,e[i.variant],e[`size${o(i.size)}`],i.padding!=="normal"&&e[`padding${o(i.padding)}`],i.align!=="inherit"&&e[`align${o(i.align)}`],i.stickyHeader&&e.stickyHeader]}})(({theme:a,ownerState:e})=>u({},a.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:a.vars?`1px solid ${a.vars.palette.TableCell.border}`:`1px solid
    ${a.palette.mode==="light"?N(z(a.palette.divider,1),.88):U(z(a.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(a.vars||a).palette.text.primary,lineHeight:a.typography.pxToRem(24),fontWeight:a.typography.fontWeightMedium},e.variant==="body"&&{color:(a.vars||a).palette.text.primary},e.variant==="footer"&&{color:(a.vars||a).palette.text.secondary,lineHeight:a.typography.pxToRem(21),fontSize:a.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${q.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(a.vars||a).palette.background.default})),G=l.forwardRef(function(e,i){const s=A({props:e,name:"MuiTableCell"}),{align:r="inherit",className:g,component:d,padding:x,scope:k,size:T,sortDirection:y,variant:h}=s,m=P(s,B),t=l.useContext(W),p=l.useContext(E),b=p&&p.variant==="head";let n;d?n=d:n=b?"th":"td";let c=k;n==="td"?c=void 0:!c&&b&&(c="col");const C=h||p&&p.variant,v=u({},s,{align:r,component:n,padding:x||(t&&t.padding?t.padding:"normal"),size:T||(t&&t.size?t.size:"medium"),sortDirection:y,stickyHeader:C==="head"&&t&&t.stickyHeader,variant:C}),H=I(v);let f=null;return y&&(f=y==="asc"?"ascending":"descending"),j.jsx(J,u({as:n,ref:i,className:M(H.root,g),"aria-sort":f,scope:c,ownerState:v},m))});export{G as T,W as a,E as b,q as t};
