"use strict";

require("core-js/modules/es.object.define-property.js");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TransferPositionIcon = exports.TransferPosition = void 0;
var _i18n = require("../../../i18n");
var _icon = require("../../icon");
var _type = require("../../icon/type");
var _tooltip = require("../../tooltip");
var _jsxRuntime = require("react/jsx-runtime");
var TransferPosition = exports.TransferPosition = /*#__PURE__*/function (TransferPosition) {
  TransferPosition[TransferPosition["TOP"] = 0] = "TOP";
  TransferPosition[TransferPosition["BOTTOM"] = 1] = "BOTTOM";
  TransferPosition[TransferPosition["CENTER"] = 2] = "CENTER";
  return TransferPosition;
}({});
var TransferPositionIcon = exports.TransferPositionIcon = function TransferPositionIcon(props) {
  var currentPosition = props.currentPosition,
    onTransferPositionButtonClick = props.onTransferPositionButtonClick;
  var t = (0, _i18n.useI18n)();
  var handlerTransferPositionClick = function handlerTransferPositionClick() {
    if (currentPosition === TransferPosition.BOTTOM) {
      onTransferPositionButtonClick(TransferPosition.TOP);
      return;
    }
    onTransferPositionButtonClick(TransferPosition.BOTTOM);
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
    content: currentPosition === TransferPosition.TOP ? t('fmt_uimanager_option_Movebottom') : t('fmt_uimanager_option_Movetop'),
    mouseEnterDelay: 0,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: "share-action-nav__not-draggable share-state-nav__transfer-position",
      onClick: handlerTransferPositionClick,
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
        type: currentPosition === TransferPosition.TOP ? _type.FcrIconType.FCR_SHARINGBAR_DOWN : _type.FcrIconType.FCR_SHARINGBAR_UP,
        className: "share-state-nav__transfer-position-button",
        colors: {
          iconPrimary: 'var(--fcr_ui_scene_black8)'
        },
        size: 20
      })
    })
  });
};