import { useState } from "react";
//#region src/hooks/use-series-highlight.ts
var DIM_TRANSITION = { transition: "opacity 200ms ease-out" };
/**
* Manages legend-driven series highlighting for chart components.
* When a legend item is hovered, non-highlighted series dim to 0.2 opacity.
*/
function useSeriesHighlight(prefersReducedMotion) {
	const [highlightedSeries, setHighlightedSeries] = useState(null);
	const getOpacity = (id) => highlightedSeries && highlightedSeries !== id ? .2 : 1;
	return {
		highlightedSeries,
		setHighlightedSeries,
		getOpacity,
		dimTransition: prefersReducedMotion ? void 0 : DIM_TRANSITION
	};
}
//#endregion
export { useSeriesHighlight };

//# sourceMappingURL=index48.js.map