const customElement = (tagName) => (classOrTarget, context) => {
  if (context !== void 0) {
    context.addInitializer(() => {
      if (customElements.get(tagName)) {
        if (process.env.NODE_ENV === "development") {
          console.error(`Element ${tagName} is already registered`);
        }
        return;
      }
      customElements.define(
        tagName,
        classOrTarget
      );
    });
  } else {
    if (customElements.get(tagName)) {
      if (process.env.NODE_ENV === "development") {
        console.error(`Element ${tagName} is already registered`);
      }
      return;
    }
    customElements.define(tagName, classOrTarget);
  }
};
export {
  customElement
};
//# sourceMappingURL=decorator.js.map
