'use strict';

var Icons = require('@transferwise/icons');
var clsx = require('clsx');
require('../common/theme.js');
require('../common/direction.js');
require('../common/propsValues/control.js');
require('../common/propsValues/breakpoint.js');
var size = 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('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');

const CONTAINER_SIZE = {
  [size.Size.EXTRA_SMALL]: 10,
  [size.Size.SMALL]: 16,
  [size.Size.MEDIUM]: 24
};
const ExtraSmallChevron = ({
  className
}) => {
  return /*#__PURE__*/jsxRuntime.jsx("span", {
    className: clsx.clsx('tw-icon', 'tw-icon-chevron', className),
    role: "presentation",
    "aria-hidden": true,
    children: /*#__PURE__*/jsxRuntime.jsx("svg", {
      width: "10",
      height: "10",
      viewBox: "0 0 10 10",
      fill: "currentColor",
      focusable: "false",
      children: /*#__PURE__*/jsxRuntime.jsx("path", {
        fillRule: "evenodd",
        d: "M4.9995 2.0865L0.0635004 6.7645L1.2745 7.9125L4.9995 4.3835L8.7245 7.9135L9.9355 6.7645L4.9995 2.0865Z"
      })
    })
  });
};
const Chevron = ({
  orientation = position.Position.BOTTOM,
  size: size$1 = size.Size.SMALL,
  disabled = false,
  className
}) => {
  const classNameValue = clsx.clsx('tw-chevron', {
    'chevron-color': !disabled
  }, orientation, className);
  if (size$1 === size.Size.EXTRA_SMALL) {
    return /*#__PURE__*/jsxRuntime.jsx(ExtraSmallChevron, {
      className: classNameValue
    });
  }
  const sizeValue = CONTAINER_SIZE[size$1];
  return /*#__PURE__*/jsxRuntime.jsx(Icons.ChevronUp, {
    className: classNameValue,
    size: sizeValue
  });
};

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