import{unmountComponentAtNode as e}from"react-dom";let rootDialogId="root-dialog-portal";function getOrCreateRootDialog(e){let o=e??rootDialogId,t=document.getElementById(o);if(t)return t;let d=document.createElement("div");return d.setAttribute("id",o),d.setAttribute("aria-modal","true"),d.setAttribute("role","dialog"),document.body.appendChild(d),d}function removeElementReconfirm(o){let t=o??rootDialogId,d=document.getElementById(t);d&&(e(d),d.parentNode?.removeChild(d))}function addBodyClass(){document.body.classList.add("confirm-dialog-body-element")}function removeBodyClass(){document.body.classList.remove("confirm-dialog-body-element")}export{addBodyClass,getOrCreateRootDialog,removeBodyClass,removeElementReconfirm};
