import { jsx as E } from "react/jsx-runtime";
import e from "react";
import P from "./SystemColors.js";
import a from "./PlainColor.js";
import j from "./ManualColors.js";
import { isSequentialColorScheme as G, isCategoricalColorScheme as R } from "@nivo/colors";
import V from "./SequentialColors.js";
import _ from "./CategoricalColors.js";
const K = ({
  app: m,
  type: C,
  colorBy: i,
  scheme: r,
  barColor: S,
  manualColors: s,
  locale: p,
  overallLabel: g,
  customLabels: q,
  options: { data: l, keys: n, indexBy: t, dimensionsMetadata: u, measuresMetadata: w },
  children: v
}) => {
  let o;
  return l ? (r === "system" ? o = new P(m, C, i, r, l, n, t, u, w, p) : r === "plain_color" ? o = new a(S) : r === "manual" ? o = new j(m, C, i, r, l, u, w, n, t, s, p, g, q) : (G(r) && (o = new V(i, r, l, n, t)), R(r) && (o = new _(i, r, l, n, t))), /* @__PURE__ */ E("div", { children: e.Children.map(v, (f) => e.isValidElement(f) ? e.cloneElement(f, {
    colorGenerator: o
  }) : f) })) : null;
};
export {
  K as default
};
