"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IframeProvider = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const React = tslib_1.__importStar(require("react"));
const IframeContext_1 = require("./IframeContext.js");
const IframeProvider = ({ children, initialUrl = '', disableUrlField, }) => {
    const [iframeElement, setIframeElement] = React.useState();
    const [url, setUrl] = React.useState(initialUrl);
    const setIframeElementFunc = (element) => setIframeElement(element);
    return ((0, jsx_runtime_1.jsx)(IframeContext_1.IframeContext.Provider, { value: {
            url,
            setUrl,
            iframeElement,
            setIframeElement: setIframeElementFunc,
            disableUrlField,
        }, children: children }));
};
exports.IframeProvider = IframeProvider;
//# sourceMappingURL=IframeProvider.js.map
