import{K as P,Z as n,r as T,as as v,X as C,eZ as N,T as p,j as f,f as j,au as R,a9 as _}from"./index-4e7882bc.js";import{l as h,g as $}from"./listItemTextClasses-0d3e3a1a.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[{[`& .${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})),M=T.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}=T.useContext(N);let o=m??c,a=L;const x=n({},t,{disableTypography:i,inset:g,primary:!!o,secondary:!!a,dense:u}),d=w(x);return o!=null&&o.type!==p&&!i&&(o=f(p,n({variant:u?"body2":"body1",className:d.primary,component:l!=null&&l.variant?void 0:"span",display:"block"},l,{children:o}))),a!=null&&a.type!==p&&!i&&(a=f(p,n({variant:"body2",className:d.secondary,color:"text.secondary",display:"block"},b,{children:a}))),j(B,n({className:R(d.root,y),ownerState:x,ref:r},I,{children:[o,a]}))}),Z=M;export{Z as L};
