import { jsx as _jsx } from "react/jsx-runtime";
import { useEffect } from "react";
function WormholeBridge(_a) {
    var config = _a.config;
    useEffect(function () {
        var script = document.createElement("script");
        script.src =
            "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.js";
        script.async = true;
        var link = document.createElement("link");
        link.href =
            "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.12/dist/main.css";
        document.body.appendChild(script);
        document.body.appendChild(link);
        return function () {
            script.remove();
            link.remove();
        };
    }, []);
    return (_jsx("div", { id: "wormhole-connect", 
        //@ts-ignore
        config: config ? JSON.stringify(config) : null }));
}
export * from "./theme";
export * from "./types";
export default WormholeBridge;
