'use strict';

var clsx = require('clsx');
var React = require('react');
var Body = require('../../body/Body.js');
var jsxRuntime = require('react/jsx-runtime');

const Option = /*#__PURE__*/React.forwardRef(({
  media = '',
  title,
  content,
  as: component,
  button,
  decision = true,
  disabled = false,
  complex,
  inverseMediaCircle = true,
  className,
  showMediaAtAllSizes,
  showMediaCircle = true,
  isContainerAligned = false,
  ...rest
}, reference) => {
  const Element = component ?? 'label';
  return /*#__PURE__*/jsxRuntime.jsx(Element, {
    ...rest,
    ref: reference,
    className: clsx.clsx('np-option', className, {
      'decision-complex': complex,
      decision,
      disabled,
      'np-option__sm-media': showMediaAtAllSizes,
      'np-option__container-aligned': isContainerAligned
    }),
    disabled: disabled && Element === 'button',
    children: /*#__PURE__*/jsxRuntime.jsxs("div", {
      className: "media",
      children: [media && /*#__PURE__*/jsxRuntime.jsx("div", {
        className: "media-left",
        children: showMediaCircle ? /*#__PURE__*/jsxRuntime.jsx("div", {
          className: clsx.clsx('circle circle-sm text-primary', {
            'circle-inverse': inverseMediaCircle
          }),
          children: media
        }) : /*#__PURE__*/jsxRuntime.jsx("div", {
          className: "np-option__no-media-circle",
          children: media
        })
      }), /*#__PURE__*/jsxRuntime.jsxs("div", {
        className: "media-body",
        children: [/*#__PURE__*/jsxRuntime.jsx("h4", {
          className: "np-text-body-large-bold text-primary np-option__title",
          children: title
        }), content && /*#__PURE__*/jsxRuntime.jsx(Body, {
          className: "d-block np-option__body",
          children: content
        })]
      }), /*#__PURE__*/jsxRuntime.jsx("div", {
        className: "media-right",
        children: button
      })]
    })
  });
});

module.exports = Option;
//# sourceMappingURL=Option.js.map
