import e from "./PlBtnSecondary/PlBtnSecondary.js";
import t from "./PlBtnPrimary/PlBtnPrimary.js";
import "./PlBtnPrimary/index.js";
import "./PlBtnSecondary/index.js";
import n from "./PlDialogModal/PlDialogModal.js";
import "./PlDialogModal/index.js";
import { createBlock as r, createTextVNode as i, createVNode as a, defineComponent as o, openBlock as s, toDisplayString as c, unref as l, withCtx as u, withModifiers as d } from "vue";
var f = /* @__PURE__ */ o({
	__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(o, { emit: f }) {
		let p = o, m = f, h = () => {
			m("confirm"), p.onConfirm?.();
		}, g = () => {
			m("cancel"), p.onCancel?.();
		};
		return (f, m) => (s(), r(l(n), {
			modelValue: p.opened,
			"onUpdate:modelValue": m[0] ||= (e) => p.opened = e,
			closable: !1,
			onClick: m[1] ||= d(() => {}, ["stop"])
		}, {
			title: u(() => [i(c(o.title), 1)]),
			default: u(() => [i(c(o.message), 1)]),
			actions: u(() => [a(l(t), { onClick: d(h, ["stop"]) }, {
				default: u(() => [i(c(p.confirmLabel), 1)]),
				_: 1
			}), a(l(e), { onClick: d(g, ["stop"]) }, {
				default: u(() => [i(c(p.cancelLabel), 1)]),
				_: 1
			})]),
			_: 1
		}, 8, ["modelValue"]));
	}
});
export { f as default };

//# sourceMappingURL=PlConfirmDialog.vue2.js.map