import{cG as D,cF as G,f as u,d0 as v,r as I,cJ as J,cK as r,T as c,j as s,cM as K}from"./index-5768b108.js";function q(n){return G("MuiCardHeader",n)}const z=D("MuiCardHeader",["root","avatar","action","content","title","subheader"]),p=z,L=n=>{const{classes:e}=n;return K({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},q,e)},O=u("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(n,e)=>[{[`& .${p.title}`]:e.title},{[`& .${p.subheader}`]:e.subheader},e.root]})({display:"flex",alignItems:"center",padding:16}),Q=u("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),V=u("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),W=u("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${v.root}:where(& .${p.title})`]:{display:"block"},[`.${v.root}:where(& .${p.subheader})`]:{display:"block"}}),X=I.forwardRef(function(e,m){const y=J({props:e,name:"MuiCardHeader"}),{action:C,avatar:i,component:b="div",disableTypography:h=!1,subheader:x,subheaderTypographyProps:f,title:g,titleTypographyProps:H,slots:P={},slotProps:S={},...T}=y,t={...y,component:b,disableTypography:h},a=L(t),o={slots:P,slotProps:{title:H,subheader:f,...S}};let l=g;const[j,M]=r("title",{className:a.title,elementType:c,externalForwardedProps:o,ownerState:t,additionalProps:{variant:i?"body2":"h5",component:"span"}});l!=null&&l.type!==c&&!h&&(l=s.jsx(j,{...M,children:l}));let d=x;const[R,$]=r("subheader",{className:a.subheader,elementType:c,externalForwardedProps:o,ownerState:t,additionalProps:{variant:i?"body2":"body1",color:"textSecondary",component:"span"}});d!=null&&d.type!==c&&!h&&(d=s.jsx(R,{...$,children:d}));const[w,A]=r("root",{ref:m,className:a.root,elementType:O,externalForwardedProps:{...o,...T,component:b},ownerState:t}),[N,U]=r("avatar",{className:a.avatar,elementType:Q,externalForwardedProps:o,ownerState:t}),[F,k]=r("content",{className:a.content,elementType:W,externalForwardedProps:o,ownerState:t}),[E,B]=r("action",{className:a.action,elementType:V,externalForwardedProps:o,ownerState:t});return s.jsxs(w,{...A,children:[i&&s.jsx(N,{...U,children:i}),s.jsxs(F,{...k,children:[l,d]}),C&&s.jsx(E,{...B,children:C})]})}),Z=X;export{Z as C};
