import { forwardRef } from 'react';
import { clsx } from 'clsx';
import { getSentimentSurfaceClassName } from './classMap.mjs';
import { jsx } from 'react/jsx-runtime';

const SentimentSurface = /*#__PURE__*/forwardRef(function SentimentSurface({
  as,
  sentiment,
  emphasis = 'base',
  className,
  style,
  children,
  id,
  testId,
  ...props
}, ref) {
  const Element = as ?? 'div';
  const classNames = clsx(getSentimentSurfaceClassName(sentiment, emphasis), className);
  const sentimentProps = {
    ref,
    id,
    'data-testid': testId,
    className: classNames,
    style,
    ...props
  };
  return (
    /*#__PURE__*/
    // @ts-expect-error - Generic forwardRef limitation. See: https://fettblog.eu/typescript-react-generic-forward-refs/
    jsx(Element, {
      ...sentimentProps,
      children: children
    })
  );
});
SentimentSurface.displayName = 'SentimentSurface';

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