import { defineComponent as C, createBlock as _, openBlock as b, unref as i, withModifiers as m, withCtx as n, createVNode as f, createTextVNode as l, toDisplayString as a } from "vue";
import k from "./PlBtnPrimary/PlBtnPrimary.vue.js";
import V from "./PlBtnSecondary/PlBtnSecondary.vue.js";
import g from "./PlDialogModal/PlDialogModal.vue.js";
const v = /* @__PURE__ */ C({
  __name: "PlConfirmDialog",
  props: {
    opened: { type: Boolean, default: !0 },
    title: {},
    message: {},
    confirmLabel: {},
    cancelLabel: {},
    onConfirm: { type: Function, default: void 0 },
    onCancel: { type: Function, default: void 0 }
  },
  emits: ["confirm", "cancel"],
  setup(r, { emit: s }) {
    const e = r, c = s, d = () => {
      var o;
      c("confirm"), (o = e.onConfirm) == null || o.call(e);
    }, u = () => {
      var o;
      c("cancel"), (o = e.onCancel) == null || o.call(e);
    };
    return (o, t) => (b(), _(i(g), {
      modelValue: e.opened,
      "onUpdate:modelValue": t[0] || (t[0] = (p) => e.opened = p),
      closable: !1,
      onClick: t[1] || (t[1] = m(() => {
      }, ["stop"]))
    }, {
      title: n(() => [
        l(a(o.title), 1)
      ]),
      default: n(() => [
        l(a(o.message), 1)
      ]),
      actions: n(() => [
        f(i(k), {
          onClick: m(d, ["stop"])
        }, {
          default: n(() => [
            l(a(e.confirmLabel), 1)
          ]),
          _: 1
        }),
        f(i(V), {
          onClick: m(u, ["stop"])
        }, {
          default: n(() => [
            l(a(e.cancelLabel), 1)
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["modelValue"]));
  }
});
export {
  v as default
};
//# sourceMappingURL=PlConfirmDialog.vue.js.map
