import"../simple-modal.js";export const SimpleModalHandler=function(e){return class extends e{connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0")}constructor(){super(),setTimeout((()=>{globalThis.SimpleModal.requestAvailability(),this.addEventListener&&(this.addEventListener("click",this.__SimpleModalHandlerClick.bind(this)),this.addEventListener("keypress",this._keyPress.bind(this)))}),0)}_keyPress(e){if("Enter"===e.key)this.click()}__SimpleModalHandlerClick(e){const t=new CustomEvent("simple-modal-show",{bubbles:!0,cancelable:!0,composed:!0,detail:{title:this.modalTitle,elements:{content:this.modalContent},styles:{"--simple-modal-min-width":"50vw","--simple-modal-min-height":"50vh"},invokedBy:this,clone:!1}});this.dispatchEvent(t)}}};