import { jsx as t, Fragment as n } from "react/jsx-runtime";
import { useMemo as c } from "react";
import e from "./enums/ChartVariant.js";
import o from "../../utils/extractProps.js";
import h from "./components/radial-chart/RadialChart.js";
import f from "./components/pie-chart/PieChart.js";
import u from "./components/line-chart/LineChart.js";
import s from "./components/area-chart/AreaChart.js";
import d from "./components/bar-chart/BarChart.js";
const g = ({ type: i, ...a }) => {
  const m = c(() => {
    let r;
    switch (i) {
      case e.Bar:
        return r = o(a), /* @__PURE__ */ t(d, { ...r });
      case e.Area:
        return r = o(a), /* @__PURE__ */ t(s, { ...r });
      case e.Line:
        return r = o(a), /* @__PURE__ */ t(u, { ...r });
      case e.Pie:
        return r = o(a), /* @__PURE__ */ t(f, { ...r });
      case e.Radial:
        return r = o(a), /* @__PURE__ */ t(h, { ...r });
      default:
        return /* @__PURE__ */ t("div", { children: "Unsupported chart type" });
    }
  }, [i, a]);
  return /* @__PURE__ */ t(n, { children: m });
};
export {
  g as default
};
//# sourceMappingURL=Chart.js.map
