'use strict';

var clsx = require('clsx');
var ActionButton = require('../actionButton/ActionButton.js');
require('../common/theme.js');
require('../common/direction.js');
var control = require('../common/propsValues/control.js');
require('../common/propsValues/breakpoint.js');
require('../common/propsValues/size.js');
require('../common/propsValues/typography.js');
require('../common/propsValues/width.js');
require('../common/propsValues/type.js');
require('../common/propsValues/dateMode.js');
require('../common/propsValues/monthFormat.js');
require('../common/propsValues/position.js');
require('../common/propsValues/layouts.js');
require('../common/propsValues/status.js');
require('../common/propsValues/sentiment.js');
require('../common/propsValues/profileType.js');
require('../common/propsValues/variant.js');
require('../common/propsValues/scroll.js');
require('../common/propsValues/markdownNodeType.js');
require('../common/fileType.js');
require('@transferwise/icons');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
var Option = require('../common/Option/Option.js');

const ActionOption = ({
  action,
  priority = control.Priority.PRIMARY,
  disabled,
  onClick,
  media,
  title,
  content,
  complex,
  className,
  showMediaAtAllSizes,
  showMediaCircle,
  isContainerAligned,
  as
}) => {
  const sharedProps = {
    media,
    title,
    content,
    complex,
    disabled,
    showMediaAtAllSizes,
    showMediaCircle,
    className: clsx.clsx('tw-action-option', className),
    isContainerAligned,
    as
  };
  const getAriaLabel = () => {
    const labels = [];
    if (typeof title === 'string') {
      labels.push(title);
    }
    if (typeof action === 'string') {
      labels.push(action);
    }
    return labels.join(', ') || undefined;
  };
  return /*#__PURE__*/jsxRuntime.jsx(Option, {
    ...sharedProps,
    button: /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
      priority: priority,
      disabled: disabled,
      "aria-label": getAriaLabel(),
      onClick: onClick,
      children: action
    })
  });
};

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