var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
import { l as loadStyleSheet } from "../chunks/chunk.dcf-utility.js?v=6.1.1";
const noticesCssUrl = "/wdn/templates_6.1/css/components-js/_notices.css?v=6.1.1";
let UNLNotice = null;
const querySelector = ".dcf-notice:not(.dcf-notice-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 ? UNLNotice : (initializationPromise !== null || (initializationPromise = (async () => (UNLNotice = (await import("../components/component.notice.js?v=6.1.1")).default, await loadStyleSheet(noticesCssUrl), isInitialized = !0, document.dispatchEvent(new CustomEvent("UNLPluginInitialized", {
    detail: {
      pluginType,
      pluginComponent: UNLNotice,
      styleSheetsLoaded: [
        noticesCssUrl
      ]
    }
  })), UNLNotice))()), initializationPromise);
}
__name(initialize, "initialize");
async function loadElement(element, options) {
  isInitialized || await initialize();
  const loadedElement = new UNLNotice(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 allNotices = document.querySelectorAll(querySelector);
  return await loadElements(allNotices, options);
}
__name(loadElementsOnPage, "loadElementsOnPage");
export {
  getIsInitialized,
  getPluginLoadAfterWatch,
  getPluginType,
  getQuerySelector,
  initialize,
  loadElement,
  loadElements,
  loadElementsOnPage
};
//# sourceMappingURL=plugin.notice.js.map
