import {
  appInit
} from "./chunk-QNETLNPB.js";
import "./chunk-HKSNADSX.js";
import "./chunk-SKMFMGCD.js";
import "./chunk-BDIKFVWZ.js";
import "./chunk-FFEIP5CT.js";
import "./chunk-DR6H3QAA.js";
import "./chunk-MYF2BWKC.js";
import "./chunk-CXQ6KS3Z.js";
import "./chunk-4KY4XKJV.js";
import "./chunk-OEDZHPBJ.js";
import "./chunk-PCZNTK74.js";
import "./chunk-PRZWSBMA.js";
import "./chunk-SA7APTJR.js";
import "./chunk-HJ6L54YS.js";
import "./chunk-LSEFWW72.js";
import "./chunk-SKREEF3H.js";
import "./chunk-HYOEWQ5P.js";
import "./chunk-HBW42TDT.js";
import "./chunk-G6O3URDN.js";
import "./chunk-FN5XPUPH.js";
import "./chunk-IIT367QZ.js";
import "./chunk-RZGEKL77.js";
import "./chunk-UI7OCM2A.js";
import "./chunk-YZK37YCC.js";
import "./chunk-7EMWHCVW.js";
import "./chunk-7IYJZZQI.js";
import "./chunk-M3J4MINX.js";
import "./chunk-PF4DSFDR.js";
import "./chunk-QH6W3NVF.js";
import "./chunk-NOEAT6CX.js";
import "./chunk-4UWS5Y3N.js";
import "./chunk-DD4R5P6W.js";
import "./chunk-JNITUVXP.js";
import "./chunk-KSGA62R2.js";
import "./chunk-LOZEKOES.js";
import "./chunk-TOU7EVFQ.js";
import "./chunk-OAWQ6LOO.js";
import "./chunk-TLT4YIG3.js";
import "./chunk-KYBIQBXE.js";
import "./chunk-I6Y4O3RR.js";
import "./chunk-OMR2DT66.js";
import "./chunk-DQC5FFGV.js";
import "./chunk-HFNDKYVF.js";

// gdc/correlation.ts
async function init(arg, holder, genomes) {
  const useGenome = arg.genome || "hg38";
  const useDslabel = arg.dslabel || "GDC";
  if (!genomes[useGenome]) throw useGenome + " missing";
  const massApi = await appInit({
    //debug: arg.debugmode, // is debug accepted?
    genome: genomes[useGenome],
    holder,
    state: {
      genome: useGenome,
      dslabel: useDslabel,
      termfilter: { filter0: arg.filter0 },
      nav: { activeTab: 1, header_mode: window.location.pathname.includes("example.gdc") ? void 0 : "only_buttons" },
      plots: arg.state?.plots || [
        { chartType: "summaryInput" }
        // default shows summaryInput ui, can change
        //{ chartType: 'barchart', term: {id: 'case.demographic.gender'} }, // uncomment for quicker testing
      ]
    },
    opts: Object.assign(
      {
        // todo additional customizations
        // dictionary:{header:'Select a variable to build Correlation Plot'}
        // some way to make gene exp violin/boxplot to use log scale by default, but numeric dict term should not
      },
      arg.opts || {}
    ),
    app: arg.opts?.app || {}
  });
  const api = {
    update: async (updateArg) => {
      if (!massApi) return;
      if ("filter0" in updateArg) {
        massApi.dispatch({
          type: "app_refresh",
          subactions: [
            {
              type: "filter_replace",
              filter0: updateArg.filter0
            }
          ]
        });
      }
    },
    triggerAbort: (reason = "") => massApi.triggerAbort(reason)
  };
  return api;
}
export {
  init
};
//# sourceMappingURL=correlation-AOSSSSL3.js.map
