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

const NkEditionPriceText = NKEditionPriceText;
const defineCustomElement = defineCustomElement$1;

export { NkEditionPriceText, defineCustomElement };

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