import classNames from 'classnames';
import { jsx as _jsx, jsxs as _jsxs } from "preact/compat/jsx-runtime";
const NoteBox = props => {
  const {
    bordered,
    children,
    className,
    heading,
    headingLevel = '2'
  } = props;
  const classes = classNames('ds-c-note-box', bordered && 'ds-c-note-box--bordered', className);
  let headingElement;
  if (typeof heading === 'string') {
    const Heading = `h${headingLevel}`;
    headingElement = /*#__PURE__*/_jsx(Heading, {
      className: "ds-c-note-box__heading",
      children: heading
    });
  } else {
    headingElement = heading;
  }
  return /*#__PURE__*/_jsx("aside", {
    className: classes,
    children: /*#__PURE__*/_jsxs("div", {
      className: "ds-c-note-box__body",
      children: [headingElement, /*#__PURE__*/_jsx("div", {
        className: heading ? 'ds-c-note-box__text' : '',
        children: children
      })]
    })
  });
};
export default NoteBox;