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