import {
  appInit
} from "./chunk-SA7APTJR.js";
import {
  TermTypes
} from "./chunk-NOEAT6CX.js";

// termdb/handlers/ssGSEA.ts
var SearchHandler = class {
  async init(opts) {
    this.callback = opts.callback;
    this.app = opts.app;
    const genesetDbName = Object.keys(opts.genomeObj.termdbs || {})[0];
    if (!genesetDbName) throw "genesetDbName missing";
    await appInit({
      holder: opts.holder,
      state: {
        dslabel: genesetDbName,
        genome: opts.genomeObj.name,
        nav: { header_mode: "search_only" }
      },
      tree: {
        click_term: (term) => {
          this.callback({ id: term.id, type: TermTypes.SSGSEA, name: term.name });
        }
      }
    });
  }
};

export {
  SearchHandler
};
//# sourceMappingURL=chunk-W6ME65LV.js.map
