import{f as C,dn as T,r as h,t as $,T as c,j as y,v as b,w}from"./index-5ae5cc5e.js";import{e as j}from"./Select-6f375e89.js";import{l as p,g as R}from"./listItemTextClasses-2547faff.js";const N=e=>{const{classes:s,inset:t,primary:a,secondary:l,dense:m}=e;return w({root:["root",t&&"inset",m&&"dense",a&&l&&"multiline"],primary:["primary"],secondary:["secondary"]},R,s)},P=C("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,s)=>{const{ownerState:t}=e;return[{[`& .${p.primary}`]:s.primary},{[`& .${p.secondary}`]:s.secondary},s.root,t.inset&&s.inset,t.primary&&t.secondary&&s.multiline,t.dense&&s.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${T.root}:where(& .${p.primary})`]:{display:"block"},[`.${T.root}:where(& .${p.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),S=h.forwardRef(function(s,t){const a=$({props:s,name:"MuiListItemText"}),{children:l,className:m,disableTypography:n=!1,inset:g=!1,primary:x,primaryTypographyProps:i,secondary:L,secondaryTypographyProps:v,...I}=a,{dense:u}=h.useContext(j);let r=x??l,o=L;const f={...a,disableTypography:n,inset:g,primary:!!r,secondary:!!o,dense:u},d=N(f);return r!=null&&r.type!==c&&!n&&(r=y.jsx(c,{variant:u?"body2":"body1",className:d.primary,component:i!=null&&i.variant?void 0:"span",...i,children:r})),o!=null&&o.type!==c&&!n&&(o=y.jsx(c,{variant:"body2",className:d.secondary,color:"textSecondary",...v,children:o})),y.jsxs(P,{className:b(d.root,m),ownerState:f,ref:t,...I,children:[r,o]})}),M=S;export{M as L};
