import { htmlToElement } from "./embedUtils.js";
import type { TIPLINK_BUILD_ENV_TYPE } from "./interfaces.js";
import { getCloseButtonUrl } from "./utils.js";
export function showDialog(buildEnv: TIPLINK_BUILD_ENV_TYPE, html: string) {
const styleDiv = htmlToElement(
""
);
window.document.head.appendChild(styleDiv);
const closeButton = htmlToElement(
``
);
closeButton.addEventListener("click", () => {
if (window.document.body.contains(notAllowedDiv)) {
notAllowedDiv.remove();
}
if (window.document.head.contains(styleDiv)) {
styleDiv.remove();
}
});
const notAllowedDiv = htmlToElement(
`${html}
`
);
notAllowedDiv.appendChild(closeButton);
window.document.body.appendChild(notAllowedDiv);
}