import{a0 as P,f_ as T,a9 as n,r as f,aL as v,a7 as C,f$ as j,T as p,j as h,l as N,am as R,aj as _,g0 as $}from"./index-91e9700c.js";const k=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],w=e=>{const{classes:s,inset:r,primary:t,secondary:c,dense:y}=e;return _({root:["root",r&&"inset",y&&"dense",t&&c&&"multiline"],primary:["primary"],secondary:["secondary"]},$,s)},B=P("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:r}=e;return[{[`& .${T.primary}`]:s.primary},{[`& .${T.secondary}`]:s.secondary},s.root,r.inset&&s.inset,r.primary&&r.secondary&&s.multiline,r.dense&&s.dense]}})(({ownerState:e})=>n({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),M=f.forwardRef(function(s,r){const t=v({props:s,name:"MuiListItemText"}),{children:c,className:y,disableTypography:i=!1,inset:g=!1,primary:m,primaryTypographyProps:l,secondary:L,secondaryTypographyProps:b}=t,I=C(t,k),{dense:u}=f.useContext(j);let a=m??c,o=L;const x=n({},t,{disableTypography:i,inset:g,primary:!!a,secondary:!!o,dense:u}),d=w(x);return a!=null&&a.type!==p&&!i&&(a=h(p,n({variant:u?"body2":"body1",className:d.primary,component:l!=null&&l.variant?void 0:"span",display:"block"},l,{children:a}))),o!=null&&o.type!==p&&!i&&(o=h(p,n({variant:"body2",className:d.secondary,color:"text.secondary",display:"block"},b,{children:o}))),N(B,n({className:R(d.root,y),ownerState:x,ref:r},I,{children:[a,o]}))}),W=M;export{W as L};
