import { RadarChart as e } from "../../charts/radar/index.js";
import { t } from "../../utils-BC9GT6Pr.js";
import * as n from "react";
import { jsx as r } from "react/jsx-runtime";
//#region src/react/primitives/chart-radar.tsx
function i({ className: i, ...a }) {
	let o = n.useRef(null), s = n.useRef(null);
	return n.useEffect(() => {
		if (o.current) return s.current = new e({
			...a,
			container: o.current
		}), () => {
			s.current?.destroy(), s.current = null;
		};
	}, []), n.useEffect(() => {
		s.current && a.datasets && s.current.update(a.datasets);
	}, [a.datasets]), /* @__PURE__ */ r("div", {
		ref: o,
		"data-slot": "radar-chart",
		className: t("w-full", i)
	});
}
//#endregion
export { i as RadarChart };

//# sourceMappingURL=chart-radar.js.map