import { useI18n } from '../../../i18n';
import { FcrIcon } from '../../icon';
import { FcrIconType } from '../../icon/type';
import { FcrToolTip } from '../../tooltip';
import { jsx as _jsx } from "react/jsx-runtime";
export var TransferPosition = /*#__PURE__*/function (TransferPosition) {
  TransferPosition[TransferPosition["TOP"] = 0] = "TOP";
  TransferPosition[TransferPosition["BOTTOM"] = 1] = "BOTTOM";
  TransferPosition[TransferPosition["CENTER"] = 2] = "CENTER";
  return TransferPosition;
}({});
export var TransferPositionIcon = function TransferPositionIcon(props) {
  var currentPosition = props.currentPosition,
    onTransferPositionButtonClick = props.onTransferPositionButtonClick;
  var t = useI18n();
  var handlerTransferPositionClick = function handlerTransferPositionClick() {
    if (currentPosition === TransferPosition.BOTTOM) {
      onTransferPositionButtonClick(TransferPosition.TOP);
      return;
    }
    onTransferPositionButtonClick(TransferPosition.BOTTOM);
  };
  return /*#__PURE__*/_jsx(FcrToolTip, {
    content: currentPosition === TransferPosition.TOP ? t('fmt_uimanager_option_Movebottom') : t('fmt_uimanager_option_Movetop'),
    mouseEnterDelay: 0,
    children: /*#__PURE__*/_jsx("div", {
      className: "share-action-nav__not-draggable share-state-nav__transfer-position",
      onClick: handlerTransferPositionClick,
      children: /*#__PURE__*/_jsx(FcrIcon, {
        type: currentPosition === TransferPosition.TOP ? FcrIconType.FCR_SHARINGBAR_DOWN : FcrIconType.FCR_SHARINGBAR_UP,
        className: "share-state-nav__transfer-position-button",
        colors: {
          iconPrimary: 'var(--fcr_ui_scene_black8)'
        },
        size: 20
      })
    })
  });
};