'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-04930e74.js');
const chunkLAFZBYO7 = require('./chunk-LAFZBYO7-25f2fb11.js');
const wallet = require('./wallet-59d2a109.js');

const NKEditionSupplyText = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.quantity = undefined;
    this.maxQuantity = undefined;
    this.editionId = undefined;
  }
  componentWillLoad() {
    this.disconnect = chunkLAFZBYO7.watchBlockNumber({ listen: true }, async () => {
      const edition = await wallet.state.diamond.apps.edition.getEdition(this.editionId);
      this.quantity = edition.quantity.toNumber();
      this.maxQuantity = edition.maxQuantity.toNumber();
    });
  }
  disconnectedCallback() {
    this.disconnect();
  }
  render() {
    return (index.h(index.Host, null, this.maxQuantity === 0
      ? this.quantity
      : `${this.quantity} / ${this.maxQuantity}`, index.h("slot", null)));
  }
};

exports.nk_edition_supply_text = NKEditionSupplyText;

//# sourceMappingURL=nk-edition-supply-text.cjs.entry.js.map