import{bi as D,bh as I,d as u,bB as v,r as q,bk as z,bl as r,T as c,j as s,bn as G}from"./index-60a3c753.js";function J(n){return I("MuiCardHeader",n)}const K=D("MuiCardHeader",["root","avatar","action","content","title","subheader"]),p=K,L=n=>{const{classes:e}=n;return G({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},J,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=q.forwardRef(function(e,m){const y=z({props:e,name:"MuiCardHeader"}),{action:b,avatar:i,component:C="div",disableTypography:h=!1,subheader:x,subheaderTypographyProps:g,title:H,titleTypographyProps:P,slots:S={},slotProps:f={},...T}=y,t={...y,component:C,disableTypography:h},a=L(t),o={slots:S,slotProps:{title:P,subheader:g,...f}};let l=H;const[j,R]=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,{...R,children:l}));let d=x;const[$,M]=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($,{...M,children:d}));const[w,A]=r("root",{ref:m,className:a.root,elementType:O,externalForwardedProps:{...o,...T,component:C},ownerState:t}),[N,U]=r("avatar",{className:a.avatar,elementType:Q,externalForwardedProps:o,ownerState:t}),[k,B]=r("content",{className:a.content,elementType:W,externalForwardedProps:o,ownerState:t}),[E,F]=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(k,{...B,children:[l,d]}),b&&s.jsx(E,{...F,children:b})]})}),Z=X;export{Z as C};
