UNPKG

807 BJavaScriptView Raw
1!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self).htwoo=e.htwoo||{},e.htwoo.dialog={}))}(this,(function(e){"use strict";let o,t;const i=e=>{let o=e.target.parentElement.querySelector(".hoo-mdldialog-outer");o.classList.remove("is-hidden"),o.classList.add("is-visible")},l=e=>{let o=e.target.closest(".hoo-mdldialog-outer");o.classList.remove("is-visible"),o.classList.add("is-hidden")};e.registerDialog=()=>{o=document.querySelectorAll(".show-dialog"),t=document.querySelectorAll(".hoo-dlgheader-closer"),o&&o.forEach((e=>{e.addEventListener("click",i)})),t&&t.forEach((e=>{e.addEventListener("click",l)}))},Object.defineProperty(e,"__esModule",{value:!0})}));