import React from "react";
import ReactDOM from "react-dom";
/**
 * Вспомогательный компонент. Используется в Popup, Popover.
 * Представляет собой ReactDOM.createPortal() в форме компонента.
 */ export var Portal = function Portal(param) {
    var children = param.children, container = param.container, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled;
    var portalContainer = typeof container === 'function' ? container() : container;
    return /*#__PURE__*/ React.createElement(React.Fragment, null, disabled || !portalContainer ? children : /*#__PURE__*/ ReactDOM.createPortal(children, portalContainer));
};
