import { defineComponent as i, computed as d, openBlock as n, createElementBlock as u, createVNode as m, Transition as _, withCtx as r, createBlock as p, resolveDynamicComponent as f, mergeProps as v, toHandlers as M, createSlots as x, renderList as h, createElementVNode as L, createCommentVNode as k } from "vue";
import y from "./useModals.js";
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const B = { class: "stash-modals" }, H = ["innerHTML"], N = /* @__PURE__ */ i({
  __name: "Modals",
  setup(b) {
    const t = y(), e = d(() => t.current);
    function c(s) {
      var o;
      return (o = s.options) != null && o.disableDefaultListeners ? {} : {
        dismiss: () => t.close({ index: 0 }),
        close: () => t.close({ index: 0 }),
        cancel: () => t.close({ index: 0 })
      };
    }
    return (s, o) => (n(), u("div", B, [
      m(_, {
        name: "modals",
        mode: "out-in"
      }, {
        default: r(() => [
          e.value ? (n(), p(f(e.value.component), v({ key: 0 }, e.value.attributes, { "is-open": !0 }, M(c(e.value))), x({ _: 2 }, [
            h(e.value.slots, (l, a) => ({
              name: a,
              fn: r(() => [
                L("div", { innerHTML: l }, null, 8, H)
              ])
            }))
          ]), 1040)) : k("", !0)
        ]),
        _: 1
      })
    ]));
  }
}), T = {}, V = {
  $style: T
}, w = /* @__PURE__ */ C(N, [["__cssModules", V]]);
export {
  w as default
};
//# sourceMappingURL=Modals.js.map
