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