import{D as a}from"./app-B4kV47qU.js";const o=a({id:"modal",state:()=>({states:{}}),actions:{validateKey(t){return/^[a-zA-Z0-9-]+$/.test(t)?t:t.replace(/[^a-zA-Z0-9-]/g,"-").toLowerCase()},open(t){const e=this.validateKey(t);if(this.states.hasOwnProperty(e)&&this.states[e])return this.states[e]=!1;this.states[e]=!0,document.body.style.overflow="hidden"},close(t=null){if(document.body.style.overflow="",typeof t!="string")return this.$reset();if(t){const e=this.validateKey(t);if(this.states.hasOwnProperty(e))return this.states[e]=!1}else this.$reset()}},getters:{getState:t=>e=>{let s=e;return/^[a-zA-Z0-9-]+$/.test(s)||(s=e.replace(/[^a-zA-Z0-9-]/g,"-").toLowerCase()),t.states.hasOwnProperty(s)&&t.states[s]||!1}}});export{o as u};
