import { Host, h } from "@stencil/core";
import { watchBlockNumber } from "@wagmi/core";
import state from "../../stores/wallet";
import { ethers } from "ethers";
export class NKDropPriceText {
  constructor() {
    this.price = undefined;
  }
  componentWillLoad() {
    this.disconnect = watchBlockNumber({ listen: true }, async () => {
      this.price = ethers.utils.formatEther(await state.diamond.apps.drop.price());
    });
  }
  disconnectedCallback() {
    this.disconnect();
  }
  render() {
    return (h(Host, null, this.price, h("slot", null)));
  }
  static get is() { return "nk-drop-price-text"; }
  static get encapsulation() { return "shadow"; }
  static get states() {
    return {
      "price": {}
    };
  }
}
//# sourceMappingURL=nk-drop-price-text.js.map
