"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Portal", {
    enumerable: true,
    get: function() {
        return Portal;
    }
});
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
const _reactdom = /*#__PURE__*/ _interop_require_default(require("react-dom"));
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const Portal = ({ children, container, disabled = false })=>{
    const portalContainer = typeof container === 'function' ? container() : container;
    return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, disabled || !portalContainer ? children : /*#__PURE__*/ _reactdom.default.createPortal(children, portalContainer));
};
