"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _components = require("@alicloudfe/components");
var _icon = _interopRequireDefault(require("@teamix/icon"));
var _utils = require("@teamix/utils");
var _react = _interopRequireDefault(require("react"));
require("./index.scss");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
 * 全屏展示 Icon
 */

var cls = (0, _utils.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.default.createElement(_components.Button, {
    iconSize: "small",
    className: cls(),
    onClick: allScreenHandle
  }, /*#__PURE__*/_react.default.createElement(_icon.default, {
    size: "small",
    type: fullScreenState ? 'close-line' : 'full-screen-line'
  }));
};
var _default = FullScreenIcon;
exports.default = _default;