/**
 * 刷新
 */
import { Button, Balloon } from '@alicloudfe/components';
import TeamixIcon from '@teamix/icon';
import { usePrefixCls, getMessage } from '@teamix/utils';
import React from 'react';
import './index.scss';
var cls = usePrefixCls('teamix-pro-table-toolbar-icon');
var LayoutIcon = function LayoutIcon(props) {
  var actionRef = props.actionRef;
  // const [fullscreen, setFullscreen] = useState<boolean>(false);
  // // 销毁监听函数
  // useEffect(() => {
  //   return () => {
  //     actionRef.current?.off?.('refreshIcon');
  //   };
  // }, []);
  // // 监听全屏变化
  // actionRef.current?.on?.(
  //   (state: boolean) => {
  //     setFullscreen(state);
  //   },
  //   'fullScreenState',
  //   'refreshIcon',
  // );
  return /*#__PURE__*/React.createElement(Balloon.Tooltip, {
    trigger: /*#__PURE__*/React.createElement(Button, {
      iconSize: "small",
      className: cls(),
      onClick: function onClick() {
        var _actionRef$current, _actionRef$current$re;
        return (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$re = _actionRef$current.refresh) === null || _actionRef$current$re === void 0 ? void 0 : _actionRef$current$re.call(_actionRef$current);
      }
    }, /*#__PURE__*/React.createElement(TeamixIcon, {
      size: "small",
      type: "refresh-line"
    })),
    align: "t"
  }, getMessage('refresh'));
};
export default LayoutIcon;