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