import { clsx } from 'clsx';
import { forwardRef } from 'react';
import { Typography } from '../common/propsValues/typography.mjs';
import { jsx } from 'react/jsx-runtime';

const DEFAULT_TYPE = Typography.BODY_DEFAULT;
const bodyTypes = new Set([Typography.BODY_DEFAULT, Typography.BODY_DEFAULT_BOLD, Typography.BODY_LARGE, Typography.BODY_LARGE_BOLD]);
const Body = /*#__PURE__*/forwardRef(function Body({
  as: Element = 'div',
  type = DEFAULT_TYPE,
  className,
  ...props
}, reference) {
  const isTypeSupported = bodyTypes.has(type);
  return /*#__PURE__*/jsx(Element, {
    ...props,
    // @ts-expect-error TODO: Remove when component could be rewritten with generics
    // See: https://fettblog.eu/typescript-react-generic-forward-refs/
    ref: reference,
    className: clsx(`np-text-${isTypeSupported ? type : DEFAULT_TYPE}`, className)
  });
});

export { Body as default };
//# sourceMappingURL=Body.mjs.map
