import { ref as u, createElementBlock as f, openBlock as a, Fragment as m, createElementVNode as o, createVNode as l, unref as r, withCtx as p } from "vue";
import { UiLayer as d, GiftForm as v } from "./components.js";
import "./composables-BAZQlC3e.js";
const g = { class: "p-2" }, B = {
  __name: "GiftButton",
  props: {
    gift: {
      type: Object,
      default: () => ({
        project: "",
        from: "",
        to: "",
        qn: 0,
        ql: ""
      })
    }
  },
  emits: ["sent"],
  setup(i) {
    const e = u();
    return (s, t) => (a(), f(m, null, [
      o("button", {
        class: "button",
        onClick: t[0] || (t[0] = (n) => e.value = !0)
      }, "Fund it now!"),
      l(r(d), {
        open: e.value,
        onClose: t[2] || (t[2] = (n) => e.value = !1)
      }, {
        default: p(() => [
          o("div", g, [
            l(r(v), {
              gift: i.gift,
              onSent: t[1] || (t[1] = (n) => {
                e.value = !1, s.$emit("sent", n);
              })
            }, null, 8, ["gift"])
          ])
        ]),
        _: 1
      }, 8, ["open"])
    ], 64));
  }
};
export {
  B as default
};
//# sourceMappingURL=GiftButton-KEdDOLxs.js.map
