"use strict";var reactDom=require("react-dom");const rootDialogId="root-dialog-portal";function getOrCreateRootDialog(e){let o=e??rootDialogId,t=document.getElementById(o);if(t)return t;let r=document.createElement("div");return r.setAttribute("id",o),r.setAttribute("aria-modal","true"),r.setAttribute("role","dialog"),document.body.appendChild(r),r}function removeElementReconfirm(e){let o=e??rootDialogId,t=document.getElementById(o);t&&(reactDom.unmountComponentAtNode(t),t.parentNode?.removeChild(t))}function addBodyClass(){document.body.classList.add("confirm-dialog-body-element")}function removeBodyClass(){document.body.classList.remove("confirm-dialog-body-element")}exports.addBodyClass=addBodyClass,exports.getOrCreateRootDialog=getOrCreateRootDialog,exports.removeBodyClass=removeBodyClass,exports.removeElementReconfirm=removeElementReconfirm;
