import { useEffect } from "react";
import { d as useAppDispatch, e as setComputedData, g as setChartData, h as useIsPanorama } from "./RechartsWrapper-B6DckFGn.js";
var ChartDataContextProvider = (props) => {
  var {
    chartData
  } = props;
  var dispatch = useAppDispatch();
  var isPanorama = useIsPanorama();
  useEffect(() => {
    if (isPanorama) {
      return () => {
      };
    }
    dispatch(setChartData(chartData));
    return () => {
      dispatch(setChartData(void 0));
    };
  }, [chartData, dispatch, isPanorama]);
  return null;
};
var SetComputedData = (props) => {
  var {
    computedData
  } = props;
  var dispatch = useAppDispatch();
  useEffect(() => {
    dispatch(setComputedData(computedData));
    return () => {
      dispatch(setChartData(void 0));
    };
  }, [computedData, dispatch]);
  return null;
};
export {
  ChartDataContextProvider as C,
  SetComputedData as S
};
