"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.ToggleButton = void 0;
var _react = _interopRequireDefault(require("react"));
var _Tooltip = _interopRequireDefault(require("../../Tooltip"));
var _IconButton = _interopRequireDefault(require("../../IconButton"));
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _constants = require("../constants");
var _ToggleButtonSt = require("./ToggleButton.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/SidebarNext/components/ToggleButton.tsx";
var ToggleButton = _ref => {
  var {
    minimized,
    minimizeToggleTooltip,
    onMinimizeToggleClick,
    skin
  } = _ref;
  return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
    className: (0, _ToggleButtonSt.st)(_ToggleButtonSt.classes.root, {
      skin
    }),
    size: "small",
    placement: "right-start",
    moveBy: {
      x: 12,
      y: -3
    },
    disabled: !minimizeToggleTooltip,
    content: minimizeToggleTooltip,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 22,
      columnNumber: 3
    }
  }, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
    size: "tiny",
    onClick: onMinimizeToggleClick,
    dataHook: _constants.dataHooks.minimizeButton,
    className: (0, _ToggleButtonSt.st)(_ToggleButtonSt.classes.iconButton, {
      skin
    }),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 5
    }
  }, minimized ? /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.ChevronRightSmall, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 36,
      columnNumber: 20
    }
  }) : /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.ChevronLeftSmall, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 36,
      columnNumber: 44
    }
  })));
};
exports.ToggleButton = ToggleButton;
//# sourceMappingURL=ToggleButton.js.map