import { defineComponent as p, createBlock as _, openBlock as b, unref as c, withModifiers as m, withCtx as n, createVNode as r, 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 $ = /* @__PURE__ */ p({
  __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(i, { emit: d }) {
    const e = i, f = d, s = () => {
      var o;
      f("confirm"), (o = e.onConfirm) == null || o.call(e);
    }, u = () => {
      var o;
      f("cancel"), (o = e.onCancel) == null || o.call(e);
    };
    return (o, t) => (b(), _(c(g), {
      modelValue: e.opened,
      "onUpdate:modelValue": t[0] || (t[0] = (C) => e.opened = C),
      closable: !1,
      onClick: t[1] || (t[1] = m(() => {
      }, ["stop"]))
    }, {
      title: n(() => [
        l(a(i.title), 1)
      ]),
      default: n(() => [
        l(a(i.message), 1)
      ]),
      actions: n(() => [
        r(c(k), {
          onClick: m(s, ["stop"])
        }, {
          default: n(() => [
            l(a(e.confirmLabel), 1)
          ]),
          _: 1
        }),
        r(c(V), {
          onClick: m(u, ["stop"])
        }, {
          default: n(() => [
            l(a(e.cancelLabel), 1)
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["modelValue"]));
  }
});
export {
  $ as default
};
//# sourceMappingURL=PlConfirmDialog.vue.js.map
