import { GaugeChart as e } from "../../charts/gauge/index.js";
import { t } from "../../utils-B7XIe3qq.js";
import * as n from "react";
import { jsx as r } from "react/jsx-runtime";
//#region src/react/primitives/chart-gauge.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 && s.current.updateConfig(a);
	}, [
		a.value,
		a.min,
		a.max,
		a.label,
		a.unit,
		a.thresholds,
		a.arcWidth,
		a.startAngle,
		a.endAngle,
		a.showValue
	]), /* @__PURE__ */ r("div", {
		ref: o,
		"data-slot": "gauge-chart",
		className: t("w-full", i)
	});
}
//#endregion
export { i as GaugeChart };

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