'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
var React = require('react');
var Chevron = require('../chevron/Chevron.js');
require('../common/theme.js');
require('../common/direction.js');
require('@transferwise/neptune-tokens');
require('../common/propsValues/control.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');
var position = 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/formatting');
require('@transferwise/icons');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
var Option = require('../common/Option/Option.js');

const NavigationOption = /*#__PURE__*/React.forwardRef(({
  as: component = 'button',
  disabled = false,
  onClick,
  className,
  ...rest
}, reference) => {
  if ('href' in rest && rest.href) {
    component = 'a';
  }
  return /*#__PURE__*/jsxRuntime.jsx(Option.default, {
    ...rest,
    ref: reference,
    as: component,
    className: clsx.clsx('np-navigation-option', className),
    button: /*#__PURE__*/jsxRuntime.jsx(Chevron.default, {
      orientation: position.Position.RIGHT,
      disabled: disabled,
      className: "d-block"
    }),
    disabled: disabled,
    onClick: event => {
      if (disabled) {
        event.preventDefault();
        return;
      }
      if (onClick) {
        onClick(event);
      }
    }
  });
});

exports.default = NavigationOption;
//# sourceMappingURL=NavigationOption.js.map
