import { jsx } from "react/jsx-runtime";
import classNames from "classnames";
import { getSemanticTypeFromTextVariant, getSpacingClasses } from "../utils/utils.mjs";
import '../../styles/components/text.css';/* empty css           */
const TypographyText = ({
  children,
  as,
  size,
  variant,
  weight,
  spacing,
  className,
  ...rest
}) => {
  const BodyElement = as || getSemanticTypeFromTextVariant(variant);
  return /* @__PURE__ */ jsx(
    BodyElement,
    {
      className: classNames(
        "eds-text",
        variant && `eds-text--${variant}`,
        size && `eds-text--${size}`,
        weight && `eds-text--weight-${weight}`,
        getSpacingClasses(spacing, "eds-text"),
        className
      ),
      ...rest,
      children
    }
  );
};
const Text = TypographyText;
export {
  Text
};
//# sourceMappingURL=Text.mjs.map
