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