"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _IconButton = _interopRequireDefault(require("../../IconButton/IconButton"));
var _CarouselSt = require("../Carousel.st.css.js");
var _excluded = ["dataHook", "arrowSize", "buttonSkin", "icon", "gradientClassName", "controlsStartEnd", "onClick", "disabled", "ariaLabel"];
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Carousel/SliderArrow/SliderArrow.tsx";
var skinPriorityMap = {
  standard: 'secondary',
  inverted: 'primary',
  light: 'primary',
  transparent: 'primary',
  premium: 'primary'
};
function SliderArrow(_ref) {
  var {
      dataHook,
      arrowSize,
      buttonSkin,
      icon,
      gradientClassName,
      controlsStartEnd,
      onClick,
      disabled,
      ariaLabel
    } = _ref,
    remainingProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  if (disabled && controlsStartEnd === 'hidden') {
    return null;
  }
  var arrow = /*#__PURE__*/_react.default.createElement(_IconButton.default, {
    dataHook: "".concat(dataHook, "-element"),
    className: (0, _CarouselSt.st)(_CarouselSt.classes.controls),
    skin: buttonSkin,
    size: arrowSize,
    disabled: disabled,
    priority: skinPriorityMap[buttonSkin],
    onClick: onClick,
    ariaLabel: ariaLabel,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 5
    }
  }, icon);
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, remainingProps, {
    className: (0, _CarouselSt.st)(_CarouselSt.classes.arrowWrapper, {
      disabled
    }),
    "data-hook": dataHook,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 46,
      columnNumber: 5
    }
  }), !!gradientClassName ? /*#__PURE__*/_react.default.createElement("div", {
    className: gradientClassName,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 52,
      columnNumber: 9
    }
  }, arrow) : arrow);
}
var _default = exports.default = SliderArrow;
//# sourceMappingURL=SliderArrow.js.map