/**
 * 全屏展示 Icon
 */
import { Button } from '@alicloudfe/components';
import TeamixIcon from '@teamix/icon';
import { usePrefixCls } from '@teamix/utils';
import React from 'react';
import './index.scss';
var cls = usePrefixCls('teamix-pro-table-toolbar-icon');

var FullScreenIcon = function FullScreenIcon(props) {
  var actionRef = props.actionRef,
      fullScreenState = props.fullScreenState; // 点击全屏

  var allScreenHandle = function allScreenHandle() {
    setTimeout(function () {
      var _actionRef$current, _actionRef$current$fu;

      (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$fu = _actionRef$current.fullScreen) === null || _actionRef$current$fu === void 0 ? void 0 : _actionRef$current$fu.call(_actionRef$current);
    }, 0);
  };

  return /*#__PURE__*/React.createElement(Button, {
    iconSize: "small",
    className: cls(),
    onClick: allScreenHandle
  }, /*#__PURE__*/React.createElement(TeamixIcon, {
    size: "small",
    type: fullScreenState ? 'close-line' : 'full-screen-line'
  }));
};

export default FullScreenIcon;