import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { t as watchBlockNumber } from './chunk-LAFZBYO7.js';
import { s as state } from './wallet.js';
import { f as formatEther } from './index2.js';

const NKDropPriceText = /*@__PURE__*/ proxyCustomElement(class NKDropPriceText extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    this.price = undefined;
  }
  componentWillLoad() {
    this.disconnect = watchBlockNumber({ listen: true }, async () => {
      this.price = formatEther(await state.diamond.apps.drop.price());
    });
  }
  disconnectedCallback() {
    this.disconnect();
  }
  render() {
    return (h(Host, null, this.price, h("slot", null)));
  }
}, [1, "nk-drop-price-text", {
    "price": [32]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["nk-drop-price-text"];
  components.forEach(tagName => { switch (tagName) {
    case "nk-drop-price-text":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, NKDropPriceText);
      }
      break;
  } });
}

const NkDropPriceText = NKDropPriceText;
const defineCustomElement = defineCustomElement$1;

export { NkDropPriceText, defineCustomElement };

//# sourceMappingURL=nk-drop-price-text.js.map