import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { IframeContext } from "./IframeContext.js";
export const IframeProvider = ({ children, initialUrl = '', disableUrlField, }) => {
    const [iframeElement, setIframeElement] = React.useState();
    const [url, setUrl] = React.useState(initialUrl);
    const setIframeElementFunc = (element) => setIframeElement(element);
    return (_jsx(IframeContext.Provider, { value: {
            url,
            setUrl,
            iframeElement,
            setIframeElement: setIframeElementFunc,
            disableUrlField,
        }, children: children }));
};
//# sourceMappingURL=IframeProvider.js.map
