import{r as T,j as B}from"./index-CjxF8fgu.js";import{a as C,g as S,s as j,e as l,m as w,u as W,c as M,D as P,d as R,f as O}from"./createSimplePaletteValueFilter-CMy-QZ_W.js";function U(r){return C("MuiTypography",r)}S("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const A={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},D=P(),E=r=>{const{align:e,gutterBottom:t,noWrap:a,paragraph:s,variant:i,classes:n}=r,o={root:["root",i,r.align!=="inherit"&&`align${l(e)}`,t&&"gutterBottom",a&&"noWrap",s&&"paragraph"]};return R(o,U,n)},$=j("span",{name:"MuiTypography",slot:"Root",overridesResolver:(r,e)=>{const{ownerState:t}=r;return[e.root,t.variant&&e[t.variant],t.align!=="inherit"&&e[`align${l(t.align)}`],t.noWrap&&e.noWrap,t.gutterBottom&&e.gutterBottom,t.paragraph&&e.paragraph]}})(w(({theme:r})=>{var e;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(r.typography).filter(([t,a])=>t!=="inherit"&&a&&typeof a=="object").map(([t,a])=>({props:{variant:t},style:a})),...Object.entries(r.palette).filter(O()).map(([t])=>({props:{color:t},style:{color:(r.vars||r).palette[t].main}})),...Object.entries(((e=r.palette)==null?void 0:e.text)||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${l(t)}`},style:{color:(r.vars||r).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}})),f={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},z=T.forwardRef(function(e,t){const{color:a,...s}=W({props:e,name:"MuiTypography"}),i=!A[a],n=D({...s,...i&&{color:a}}),{align:o="inherit",className:g,component:h,gutterBottom:x=!1,noWrap:d=!1,paragraph:y=!1,variant:p="body1",variantMapping:c=f,...u}=n,m={...n,align:o,color:a,className:g,component:h,gutterBottom:x,noWrap:d,paragraph:y,variant:p,variantMapping:c},b=h||(y?"p":c[p]||f[p])||"span",v=E(m);return B.jsx($,{as:b,ref:t,className:M(v.root,g),...u,ownerState:m,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...u.style}})});export{z as T};
