import { defineComponent as y, mergeModels as i, useModel as c, watch as v, resolveComponent as d, createBlock as g, openBlock as b, withCtx as n, createElementVNode as B, createVNode as m, renderSlot as V, createTextVNode as C, toDisplayString as w } from "vue";
const k = /* @__PURE__ */ y({
  __name: "BaseDialog",
  props: /* @__PURE__ */ i({
    title: {
      type: String,
      default: "Title"
    },
    primaryButtonLabel: {
      type: String,
      default: "Confirm"
    },
    secondaryButtonLabel: {
      type: String,
      default: "Cancel"
    }
  }, {
    modelValue: { type: Boolean, required: !0 },
    modelModifiers: {}
  }),
  emits: /* @__PURE__ */ i(["confirm"], ["update:modelValue"]),
  setup(a, { emit: u }) {
    const t = c(a, "modelValue"), o = a, s = u;
    return v(t, () => {
      t.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
    }), (p, e) => {
      const r = d("FmButton"), f = d("FmDialog");
      return b(), g(f, {
        modelValue: t.value,
        "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value = l),
        overlay: ""
      }, {
        "dialog-header": n(() => [
          C(w(o.title), 1)
        ]),
        default: n(() => [
          V(p.$slots, "content")
        ]),
        "dialog-footer": n(() => [
          e[3] || (e[3] = B("div", { class: "grow" }, null, -1)),
          m(r, {
            label: o.secondaryButtonLabel,
            variant: "tertiary",
            onClick: e[0] || (e[0] = (l) => t.value = !1)
          }, null, 8, ["label"]),
          m(r, {
            label: o.primaryButtonLabel,
            variant: "primary",
            onClick: e[1] || (e[1] = (l) => s("confirm"))
          }, null, 8, ["label"])
        ]),
        _: 3
      }, 8, ["modelValue"]);
    };
  }
});
export {
  k as _
};
