import { createBlock as u, openBlock as o, Transition as f, withCtx as r, withDirectives as d, createElementVNode as i, createVNode as c, TransitionGroup as m, createElementBlock as a, createCommentVNode as n, normalizeStyle as p, renderSlot as y, vShow as k } from "vue";
import { _export_sfc as b } from "./_plugin-vue_export-helper-DueaC3du.js";
const v = { class: "fixed w-full h-full top-0 left-0 z-500 flex flex-col items-center" }, B = {
  __name: "UiLayer",
  props: {
    open: { type: Boolean, default: !1 },
    offset: { type: String, default: "" },
    closeButton: { type: Boolean, default: !0 },
    back: { type: Boolean, default: !0 }
  },
  emits: ["close"],
  setup(e, { emit: g }) {
    return (l, t) => (o(), u(f, { name: "fade" }, {
      default: r(() => [
        d(i("div", v, [
          c(m, { name: "fade" }, {
            default: r(() => [
              e.open && e.back ? (o(), a("div", {
                class: "bg-dark-200 bg-opacity-30 w-full h-full absolute z-2 cursor-pointer backdrop-filter backdrop-blur-sm",
                key: "bg",
                onClick: t[0] || (t[0] = (s) => l.$emit("close"))
              })) : n("", !0),
              e.open ? (o(), a("div", {
                class: "layer",
                key: "layer",
                style: p({ top: e.offset || "10vh" })
              }, [
                e.closeButton ? (o(), a("button", {
                  key: 0,
                  class: "button fixed right-4 top-4",
                  onClick: t[1] || (t[1] = (s) => l.$emit("close"))
                }, t[2] || (t[2] = [
                  i("div", { class: "i-la-times" }, null, -1)
                ]))) : n("", !0),
                y(l.$slots, "default", {}, void 0, !0)
              ], 4)) : n("", !0)
            ]),
            _: 3
          })
        ], 512), [
          [k, e.open]
        ])
      ]),
      _: 3
    }));
  }
}, $ = /* @__PURE__ */ b(B, [["__scopeId", "data-v-4114d342"]]);
export {
  $ as default
};
//# sourceMappingURL=UiLayer-CqTsv8Ia.js.map
