import{a3 as y,a4 as v,r as u,al as m,am as T,ao as n,j as d,aq as f,as as C,at as R,aA as x}from"./index-B1H8BCL7.js";import{a as j,b as g}from"./TableCell-D8CotAsC.js";function U(e){return y("MuiTable",e)}v("MuiTable",["root","stickyHeader"]);const B=["className","component","padding","size","stickyHeader"],S=e=>{const{classes:o,stickyHeader:t}=e;return C({root:["root",t&&"stickyHeader"]},U,o)},_=R("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.stickyHeader&&o.stickyHeader]}})(({theme:e,ownerState:o})=>n({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":n({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},o.stickyHeader&&{borderCollapse:"separate"})),h="table",X=u.forwardRef(function(o,t){const a=m({props:o,name:"MuiTable"}),{className:c,component:s=h,padding:l="normal",size:r="medium",stickyHeader:i=!1}=a,p=T(a,B),b=n({},a,{component:s,padding:l,size:r,stickyHeader:i}),w=S(b),k=u.useMemo(()=>({padding:l,size:r,stickyHeader:i}),[l,r,i]);return d.jsx(j.Provider,{value:k,children:d.jsx(_,n({as:s,role:s===h?null:"table",ref:t,className:f(w.root,c),ownerState:b},p))})});function O(e){return y("MuiTableBody",e)}v("MuiTableBody",["root"]);const P=["className","component"],A=e=>{const{classes:o}=e;return C({root:["root"]},O,o)},z=R("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"table-row-group"}),E={variant:"body"},M="tbody",Y=u.forwardRef(function(o,t){const a=m({props:o,name:"MuiTableBody"}),{className:c,component:s=M}=a,l=T(a,P),r=n({},a,{component:s}),i=A(r);return d.jsx(g.Provider,{value:E,children:d.jsx(z,n({className:f(i.root,c),as:s,ref:t,role:s===M?null:"rowgroup",ownerState:r},l))})});function q(e){return y("MuiTableHead",e)}v("MuiTableHead",["root"]);const D=["className","component"],L=e=>{const{classes:o}=e;return C({root:["root"]},q,o)},W=R("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,o)=>o.root})({display:"table-header-group"}),F={variant:"head"},$="thead",Z=u.forwardRef(function(o,t){const a=m({props:o,name:"MuiTableHead"}),{className:c,component:s=$}=a,l=T(a,D),r=n({},a,{component:s}),i=L(r);return d.jsx(g.Provider,{value:F,children:d.jsx(W,n({as:s,className:f(i.root,c),ref:t,role:s===$?null:"rowgroup",ownerState:r},l))})});function G(e){return y("MuiTableRow",e)}const H=v("MuiTableRow",["root","selected","hover","head","footer"]),I=["className","component","hover","selected"],J=e=>{const{classes:o,selected:t,hover:a,head:c,footer:s}=e;return C({root:["root",t&&"selected",a&&"hover",c&&"head",s&&"footer"]},G,o)},K=R("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.head&&o.head,t.footer&&o.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${H.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${H.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:x(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:x(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),N="tr",ee=u.forwardRef(function(o,t){const a=m({props:o,name:"MuiTableRow"}),{className:c,component:s=N,hover:l=!1,selected:r=!1}=a,i=T(a,I),p=u.useContext(g),b=n({},a,{component:s,hover:l,selected:r,head:p&&p.variant==="head",footer:p&&p.variant==="footer"}),w=J(b);return d.jsx(K,n({as:s,ref:t,className:f(w.root,c),role:s===N?null:"row",ownerState:b},i))});export{X as T,Y as a,ee as b,Z as c};
