var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
import { d as dialogsCssUrl } from "./chunk._dialogs.js?v=6.1.0-alpha";
import { l as loadStyleSheet } from "./chunk.dcf-utility.js?v=6.1.0-alpha";
let UNLButtonToggleDialog = null;
const querySelector = ".dcf-btn-toggle-dialog:not(.dcf-btn-toggle-dialog-initialized)", pluginType = "multi", pluginLoadAfterWatch = !1;
let isInitialized = !1, initializationPromise = null;
function getQuerySelector() {
  return querySelector;
}
__name(getQuerySelector, "getQuerySelector");
function getPluginType() {
  return pluginType;
}
__name(getPluginType, "getPluginType");
function getPluginLoadAfterWatch() {
  return pluginLoadAfterWatch;
}
__name(getPluginLoadAfterWatch, "getPluginLoadAfterWatch");
function getIsInitialized() {
  return isInitialized;
}
__name(getIsInitialized, "getIsInitialized");
async function initialize() {
  return isInitialized ? UNLButtonToggleDialog : (initializationPromise !== null || (initializationPromise = (async () => (UNLButtonToggleDialog = (await import("./chunk.unl-button-toggle-dialog.js?v=6.1.0-alpha")).default, await loadStyleSheet(dialogsCssUrl), isInitialized = !0, document.dispatchEvent(new CustomEvent("UNLPluginInitialized", {
    detail: {
      pluginType,
      pluginComponent: UNLButtonToggleDialog,
      styleSheetsLoaded: [
        dialogsCssUrl
      ]
    }
  })), UNLButtonToggleDialog))()), initializationPromise);
}
__name(initialize, "initialize");
async function loadElement(element, options) {
  isInitialized || await initialize();
  const loadedElement = new UNLButtonToggleDialog(element, options);
  return document.dispatchEvent(new CustomEvent("UNLPluginLoadedElement", {
    detail: {
      loadedElement
    }
  })), loadedElement;
}
__name(loadElement, "loadElement");
async function loadElements(elements, options) {
  return await Promise.all(
    Array.from(elements).map((element) => loadElement(element, options))
  );
}
__name(loadElements, "loadElements");
async function loadElementsOnPage(options) {
  const allDialogs = document.querySelectorAll(querySelector);
  return await loadElements(allDialogs, options);
}
__name(loadElementsOnPage, "loadElementsOnPage");
export {
  getIsInitialized,
  getPluginLoadAfterWatch,
  getPluginType,
  getQuerySelector,
  initialize,
  loadElement,
  loadElements,
  loadElementsOnPage
};
//# sourceMappingURL=chunk.button-toggle-dialog.js.map
