import{a5 as P,gf as g,ah as n,r as h,aU as v,af as C,gg as N,w as p,j as T,o as j,au as R,ar as w,gh as U}from"./index-e717fda1.js";const _=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],$=e=>{const{classes:s,inset:r,primary:t,secondary:c,dense:y}=e;return w({root:["root",r&&"inset",y&&"dense",t&&c&&"multiline"],primary:["primary"],secondary:["secondary"]},U,s)},k=P("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:r}=e;return[{[`& .${g.primary}`]:s.primary},{[`& .${g.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})),B=h.forwardRef(function(s,r){const t=v({props:s,name:"MuiListItemText"}),{children:c,className:y,disableTypography:i=!1,inset:f=!1,primary:m,primaryTypographyProps:l,secondary:L,secondaryTypographyProps:b}=t,I=C(t,_),{dense:u}=h.useContext(N);let a=m??c,o=L;const x=n({},t,{disableTypography:i,inset:f,primary:!!a,secondary:!!o,dense:u}),d=$(x);return a!=null&&a.type!==p&&!i&&(a=T(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=T(p,n({variant:"body2",className:d.secondary,color:"text.secondary",display:"block"},b,{children:o}))),j(k,n({className:R(d.root,y),ownerState:x,ref:r},I,{children:[a,o]}))}),W=B;export{W as L};
