import e from "../components/PlConfirmDialog.js";
import { h as t, render as n } from "vue";
function r(r) {
	return () => new Promise((i) => {
		let a = t(e, {
			opened: !0,
			title: r.title,
			message: r.message,
			confirmLabel: r.confirmLabel ?? "Confirm",
			cancelLabel: r.cancelLabel ?? "Cancel",
			onConfirm: () => s(!0),
			onCancel: () => s(!1)
		}), o = document.createElement("div");
		document.body.appendChild(o), n(a, o);
		function s(e) {
			i(e), n(null, o), o.remove();
		}
	});
}
export { r as useConfirm };

//# sourceMappingURL=useConfirm.js.map