import React, { useMemo } from "react";
import { CategoricalLegendRenderer } from "./CategoricalLegendRenderer.js";
import { SequentialLegendRenderer } from "./SequentialLegendRenderer.js";
import { ThresholdLegendRenderer } from "./ThresholdLegendRenderer.js";
import { useMapConfig } from "../../hooks/use-map-config.js";
const LEGEND_RENDERERS = {
  sequential: /* @__PURE__ */ React.createElement(SequentialLegendRenderer, null),
  categorical: /* @__PURE__ */ React.createElement(CategoricalLegendRenderer, null),
  threshold: /* @__PURE__ */ React.createElement(ThresholdLegendRenderer, null)
};
const MapLegendRenderer = () => {
  const type = useMapConfig().legend?.type ?? void 0;
  return useMemo(() => type ? LEGEND_RENDERERS[type] : null, [type]);
};
export {
  MapLegendRenderer
};
//# sourceMappingURL=MapLegendRenderer.js.map
