import React, { useEffect } from 'react';
import { Overlay } from '@alicloudfe/components';
import './index.scss';

var FullScreen = function FullScreen(props) {
  var children = props.children,
      visible = props.visible,
      actionRef = props.actionRef;
  useEffect(function () {
    var _actionRef$current, _actionRef$current$se;

    actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setFullScreenState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, visible);
  }, [visible]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(Overlay, {
    canCloseByOutSideClick: false,
    align: "cc cc",
    disableScroll: true,
    animation: {
      in: 'fadeIn',
      out: 'fadeOut'
    },
    visible: visible,
    wrapperStyle: {
      zIndex: 999
    }
  }, /*#__PURE__*/React.createElement("div", {
    className: "teamix-pro-table-full-screen"
  }, children)));
};

export default FullScreen;