import { clsx } from 'clsx';
import ActionButton from '../actionButton/ActionButton.mjs';
import '../common/theme.mjs';
import '../common/direction.mjs';
import { Priority } from '../common/propsValues/control.mjs';
import '../common/propsValues/breakpoint.mjs';
import '../common/propsValues/size.mjs';
import '../common/propsValues/typography.mjs';
import '../common/propsValues/width.mjs';
import '../common/propsValues/type.mjs';
import '../common/propsValues/dateMode.mjs';
import '../common/propsValues/monthFormat.mjs';
import '../common/propsValues/position.mjs';
import '../common/propsValues/layouts.mjs';
import '../common/propsValues/status.mjs';
import '../common/propsValues/sentiment.mjs';
import '../common/propsValues/profileType.mjs';
import '../common/propsValues/variant.mjs';
import '../common/propsValues/scroll.mjs';
import '../common/propsValues/markdownNodeType.mjs';
import '../common/fileType.mjs';
import '@transferwise/icons';
import 'react';
import 'react-intl';
import '../common/closeButton/CloseButton.messages.mjs';
import { jsx } from 'react/jsx-runtime';
import Option from '../common/Option/Option.mjs';

const ActionOption = ({
  action,
  priority = Priority.PRIMARY,
  disabled,
  onClick,
  media,
  title,
  content,
  complex,
  className,
  showMediaAtAllSizes,
  showMediaCircle,
  isContainerAligned,
  as
}) => {
  const sharedProps = {
    media,
    title,
    content,
    complex,
    disabled,
    showMediaAtAllSizes,
    showMediaCircle,
    className: 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__*/jsx(Option, {
    ...sharedProps,
    button: /*#__PURE__*/jsx(ActionButton, {
      priority: priority,
      disabled: disabled,
      "aria-label": getAriaLabel(),
      onClick: onClick,
      children: action
    })
  });
};

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