import{cG as R,cH as j,f as c,d9 as v,r as w,cK as M,T as l,j as r,cL as $,cM as N}from"./index-d895656a.js";function S(a){return j("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=w.forwardRef(function(e,u){const h=M({props:e,name:"MuiCardHeader"}),{action:C,avatar:d,className:y,component:m="div",disableTypography:p=!1,subheader:f,subheaderTypographyProps:x,title:H,titleTypographyProps:b,...g}=h,s={...h,component:m,disableTypography:p},t=P(s);let o=H;o!=null&&o.type!==l&&!p&&(o=r.jsx(l,{variant:d?"body2":"h5",className:t.title,component:"span",...b,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:$(t.root,y),as:m,ref:u,ownerState:s,...g,children:[d&&r.jsx(U,{className:t.avatar,ownerState:s,children:d}),r.jsxs(E,{className:t.content,ownerState:s,children:[o,n]}),C&&r.jsx(k,{className:t.action,ownerState:s,children:C})]})}),G=B;export{G as C};
