"use strict";const u=require("react/jsx-runtime"),v=require("@mui/material/Typography"),x=require("./types.cjs"),g={body:"body2",caption:"caption",overline:"overline",mono:"body2",code:"body2"},a={xs:"0.625rem",sm:"0.75rem",md:"0.875rem",lg:"1rem",xl:"1.125rem"},C={normal:400,medium:500,semibold:600,bold:700};function d({children:c,variant:o="body",color:t,size:e,weight:i,truncate:m=!1,noWrap:l=!1,lines:n,muted:p=!1,inline:k=!1,component:b,sx:r}){const f=g[o],y=o==="mono"||o==="code",s=p?"var(--ov-fg-muted)":t?x.toCssColor(t):void 0;return u.jsx(v,{variant:f,component:b??"span",noWrap:l||m,sx:{...s&&{color:s},...e&&{fontSize:a[e]},...i&&{fontWeight:C[i]},...y&&{fontFamily:"var(--ov-font-mono)",fontSize:e?a[e]:o==="code"?"0.85em":void 0},...o==="code"&&{backgroundColor:"var(--ov-bg-surface-inset)",padding:"1px 4px",borderRadius:"3px"},...n&&n>0&&{display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",overflow:"hidden"},...typeof r=="object"&&!Array.isArray(r)?r:{}},children:c})}d.displayName="Text";exports.Text=d;
