export { default as Highcharts } from "highcharts";

export const loadMore = async () => {
  await import("highcharts/highcharts-more");
};

export const loadModule = async (moduleName) => {
  const moduleLoader = {
    accessibility: () => import("highcharts/modules/accessibility"),
    annotations: () => import("highcharts/modules/annotations"),
    "annotations-advanced": () => import("highcharts/modules/annotations-advanced"),
    "arc-diagram": () => import("highcharts/modules/arc-diagram"),
    "arrow-symbols": () => import("highcharts/modules/arrow-symbols"),
    boost: () => import("highcharts/modules/boost"),
    "boost-canvas": () => import("highcharts/modules/boost-canvas"),
    "broken-axis": () => import("highcharts/modules/broken-axis"),
    bullet: () => import("highcharts/modules/bullet"),
    coloraxis: () => import("highcharts/modules/coloraxis"),
    "current-date-indicator": () => import("highcharts/modules/current-date-indicator"),
    cylinder: () => import("highcharts/modules/cylinder"),
    data: () => import("highcharts/modules/data"),
    "data-tools": () => import("highcharts/modules/data-tools"),
    datagrouping: () => import("highcharts/modules/datagrouping"),
    debugger: () => import("highcharts/modules/debugger"),
    "dependency-wheel": () => import("highcharts/modules/dependency-wheel"),
    dotplot: () => import("highcharts/modules/dotplot"),
    "drag-panes": () => import("highcharts/modules/drag-panes"),
    "draggable-points": () => import("highcharts/modules/draggable-points"),
    drilldown: () => import("highcharts/modules/drilldown"),
    dumbbell: () => import("highcharts/modules/dumbbell"),
    "export-data": () => import("highcharts/modules/export-data"),
    exporting: () => import("highcharts/modules/exporting"),
    flowmap: () => import("highcharts/modules/flowmap"),
    "full-screen": () => import("highcharts/modules/full-screen"),
    funnel: () => import("highcharts/modules/funnel"),
    funnel3d: () => import("highcharts/modules/funnel3d"),
    gantt: () => import("highcharts/modules/gantt"),
    geoheatmap: () => import("highcharts/modules/geoheatmap"),
    "grid-axis": () => import("highcharts/modules/grid-axis"),
    heatmap: () => import("highcharts/modules/heatmap"),
    heikinashi: () => import("highcharts/modules/heikinashi"),
    "histogram-bellcurve": () => import("highcharts/modules/histogram-bellcurve"),
    hollowcandlestick: () => import("highcharts/modules/hollowcandlestick"),
    "item-series": () => import("highcharts/modules/item-series"),
    lollipop: () => import("highcharts/modules/lollipop"),
    map: () => import("highcharts/modules/map"),
    "marker-clusters": () => import("highcharts/modules/marker-clusters"),
    "mouse-wheel-zoom": () => import("highcharts/modules/mouse-wheel-zoom"),
    navigator: () => import("highcharts/modules/navigator"),
    networkgraph: () => import("highcharts/modules/networkgraph"),
    "no-data-to-display": () => import("highcharts/modules/no-data-to-display"),
    "non-cartesian-zoom": () => import("highcharts/modules/non-cartesian-zoom"),
    "offline-exporting": () => import("highcharts/modules/offline-exporting"),
    organization: () => import("highcharts/modules/organization"),
    "parallel-coordinates": () => import("highcharts/modules/parallel-coordinates"),
    pareto: () => import("highcharts/modules/pareto"),
    pathfinder: () => import("highcharts/modules/pathfinder"),
    "pattern-fill": () => import("highcharts/modules/pattern-fill"),
    pictorial: () => import("highcharts/modules/pictorial"),
    pointandfigure: () => import("highcharts/modules/pointandfigure"),
    "price-indicator": () => import("highcharts/modules/price-indicator"),
    pyramid3d: () => import("highcharts/modules/pyramid3d"),
    renko: () => import("highcharts/modules/renko"),
    sankey: () => import("highcharts/modules/sankey"),
    "series-label": () => import("highcharts/modules/series-label"),
    "series-on-point": () => import("highcharts/modules/series-on-point"),
    "solid-gauge": () => import("highcharts/modules/solid-gauge"),
    sonification: () => import("highcharts/modules/sonification"),
    "static-scale": () => import("highcharts/modules/static-scale"),
    stock: () => import("highcharts/modules/stock"),
    "stock-tools": () => import("highcharts/modules/stock-tools"),
    streamgraph: () => import("highcharts/modules/streamgraph"),
    sunburst: () => import("highcharts/modules/sunburst"),
    textpath: () => import("highcharts/modules/textpath"),
    tiledwebmap: () => import("highcharts/modules/tiledwebmap"),
    tilemap: () => import("highcharts/modules/tilemap"),
    timeline: () => import("highcharts/modules/timeline"),
    treegraph: () => import("highcharts/modules/treegraph"),
    treegrid: () => import("highcharts/modules/treegrid"),
    treemap: () => import("highcharts/modules/treemap"),
    "variable-pie": () => import("highcharts/modules/variable-pie"),
    variwide: () => import("highcharts/modules/variwide"),
    vector: () => import("highcharts/modules/vector"),
    venn: () => import("highcharts/modules/venn"),
    windbarb: () => import("highcharts/modules/windbarb"),
    wordcloud: () => import("highcharts/modules/wordcloud"),
    xrange: () => import("highcharts/modules/xrange"),
  };
  await moduleLoader[moduleName]();
};
