import{d as B,bD as g,r as b,bk as D,bl as u,bm as E,T as l,j as T,bn as F}from"./index-d2b25495.js";import{a as M}from"./List-863f013e.js";import{l as y,g as U}from"./listItemTextClasses-cadd4b00.js";const W=e=>{const{classes:s,inset:o,primary:a,secondary:c,dense:m}=e;return F({root:["root",o&&"inset",m&&"dense",a&&c&&"multiline"],primary:["primary"],secondary:["secondary"]},U,s)},q=B("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:o}=e;return[{[`& .${y.primary}`]:s.primary},{[`& .${y.secondary}`]:s.secondary},s.root,o.inset&&s.inset,o.primary&&o.secondary&&s.multiline,o.dense&&s.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${g.root}:where(& .${y.primary})`]:{display:"block"},[`.${g.root}:where(& .${y.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),z=b.forwardRef(function(s,o){const a=D({props:s,name:"MuiListItemText"}),{children:c,className:m,disableTypography:n=!1,inset:P=!1,primary:f,primaryTypographyProps:L,secondary:I,secondaryTypographyProps:S,slots:v={},slotProps:C={},...$}=a,{dense:h}=b.useContext(M);let r=f??c,t=I;const i={...a,disableTypography:n,inset:P,primary:!!r,secondary:!!t,dense:h},d=W(i),x={slots:v,slotProps:{primary:L,secondary:S,...C}},[w,R]=u("root",{className:E(d.root,m),elementType:q,externalForwardedProps:{...x,...$},ownerState:i,ref:o}),[j,p]=u("primary",{className:d.primary,elementType:l,externalForwardedProps:x,ownerState:i}),[N,k]=u("secondary",{className:d.secondary,elementType:l,externalForwardedProps:x,ownerState:i});return r!=null&&r.type!==l&&!n&&(r=T.jsx(j,{variant:h?"body2":"body1",component:p!=null&&p.variant?void 0:"span",...p,children:r})),t!=null&&t.type!==l&&!n&&(t=T.jsx(N,{variant:"body2",color:"textSecondary",...k,children:t})),T.jsxs(w,{...R,children:[r,t]})}),J=z;export{J as L};
