"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const NoteBox = props => {
  const {
    bordered,
    children,
    className,
    heading,
    headingLevel = '2'
  } = props;
  const classes = (0, _classnames.default)('ds-c-note-box', bordered && 'ds-c-note-box--bordered', className);
  let headingElement;
  if (typeof heading === 'string') {
    const Heading = `h${headingLevel}`;
    headingElement = /*#__PURE__*/(0, _jsxRuntime.jsx)(Heading, {
      className: "ds-c-note-box__heading",
      children: heading
    });
  } else {
    headingElement = heading;
  }
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
    className: classes,
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: "ds-c-note-box__body",
      children: [headingElement, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: heading ? 'ds-c-note-box__text' : '',
        children: children
      })]
    })
  });
};
var _default = exports.default = NoteBox;