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