"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const randomId = require("../../../../../@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/utils/random-id/random-id.cjs");
const createUseExternalEvents = require("../../../../../@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/utils/create-use-external-events/create-use-external-events.cjs");
const [useModalsEvents, createEvent] = createUseExternalEvents.createUseExternalEvents("mantine-modals");
const openModal = (payload) => {
  const id = payload.modalId || randomId.randomId();
  createEvent("openModal")({ ...payload, modalId: id });
  return id;
};
const openConfirmModal = (payload) => {
  const id = payload.modalId || randomId.randomId();
  createEvent("openConfirmModal")({ ...payload, modalId: id });
  return id;
};
const openContextModal = (payload) => {
  const id = payload.modalId || randomId.randomId();
  createEvent("openContextModal")({ ...payload, modalId: id });
  return id;
};
const closeModal = createEvent("closeModal");
const closeAllModals = createEvent("closeAllModals");
exports.closeAllModals = closeAllModals;
exports.closeModal = closeModal;
exports.createEvent = createEvent;
exports.openConfirmModal = openConfirmModal;
exports.openContextModal = openContextModal;
exports.openModal = openModal;
exports.useModalsEvents = useModalsEvents;
