"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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireDefault(require("react"));
var _IconButton = _interopRequireDefault(require("../../IconButton"));
var _Tooltip = _interopRequireDefault(require("../../Tooltip"));
var _Text = _interopRequireDefault(require("../../Text"));
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _constants = require("../constants");
var _ModalPreviewLayoutSt = require("../ModalPreviewLayout.st.css.js");
var _classnames = _interopRequireDefault(require("classnames"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/ModalPreviewLayout/NavigationButton/NavigationButton.jsx",
  _this = void 0;
var tooltipProps = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants.arrowsDirection.rightArrow, {
  dataHook: _constants.dataHooks.nextNavigationButtonTooltip,
  placement: 'right'
}), _constants.arrowsDirection.leftArrow, {
  dataHook: _constants.dataHooks.prevNavigationButtonTooltip,
  placement: 'left'
});
var iconButtonProps = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants.arrowsDirection.leftArrow, {
  dataHook: _constants.dataHooks.modalPreviewLeftArrow,
  children: /*#__PURE__*/_react["default"].createElement(_wixUiIconsCommon.ChevronLeft, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 24,
      columnNumber: 15
    }
  })
}), _constants.arrowsDirection.rightArrow, {
  dataHook: _constants.dataHooks.modalPreviewRightArrow,
  children: /*#__PURE__*/_react["default"].createElement(_wixUiIconsCommon.ChevronRight, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28,
      columnNumber: 15
    }
  })
});
var NavigationButton = function NavigationButton(_ref) {
  var direction = _ref.direction,
    tooltipText = _ref.tooltipText,
    onClick = _ref.onClick;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])(_ModalPreviewLayoutSt.classes.navigationButton, _ModalPreviewLayoutSt.classes[direction]),
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 33,
      columnNumber: 3
    }
  }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], (0, _extends2["default"])({
    disabled: !tooltipText,
    className: _ModalPreviewLayoutSt.classes.modalTooltip,
    appendTo: "scrollParent",
    content: /*#__PURE__*/_react["default"].createElement(_Text["default"], {
      children: tooltipText,
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 38,
        columnNumber: 16
      }
    })
  }, tooltipProps[direction], {
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 34,
      columnNumber: 5
    }
  }), /*#__PURE__*/_react["default"].createElement(_IconButton["default"], (0, _extends2["default"])({
    as: "button",
    skin: "transparent",
    onClick: onClick
  }, iconButtonProps[direction], {
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 7
    }
  }))));
};
var _default = exports["default"] = NavigationButton;