"use client";
import { createSelector as r } from "../../../../reselect/dist/reselect.js";
import d from "../../../../../_virtual/sortBy.js";
import { useAppSelector as u } from "../hooks.js";
import { selectChartDataWithIndexes as T } from "./dataSelectors.js";
import { selectTooltipDisplayedData as y, selectTooltipAxisTicks as a } from "./tooltipSelectors.js";
import { selectChartName as h } from "./rootPropsSelectors.js";
import { selectChartLayout as I } from "../../context/chartLayoutContext.js";
import { selectChartOffsetInternal as x } from "./selectChartOffsetInternal.js";
import { selectChartWidth as C, selectChartHeight as A } from "./containerSelectors.js";
import { combineActiveLabel as b } from "./combiners/combineActiveLabel.js";
import { combineTooltipInteractionState as D } from "./combiners/combineTooltipInteractionState.js";
import { combineActiveTooltipIndex as S } from "./combiners/combineActiveTooltipIndex.js";
import { combineCoordinateForDefaultIndex as _ } from "./combiners/combineCoordinateForDefaultIndex.js";
import { combineTooltipPayloadConfigurations as k } from "./combiners/combineTooltipPayloadConfigurations.js";
import { selectTooltipPayloadSearcher as p } from "./selectTooltipPayloadSearcher.js";
import { selectTooltipState as l } from "./selectTooltipState.js";
import { combineTooltipPayload as K } from "./combiners/combineTooltipPayload.js";
import { selectTooltipAxisDataKey as g } from "./selectTooltipAxis.js";
var X = () => u(h), c = (t, e) => e, s = (t, e, o) => o, n = (t, e, o, i) => i;
r(a, (t) => d(t, (e) => e.coordinate));
var m = r([l, c, s, n], D), v = r([m, y], S), Y = (t, e, o) => {
  if (e != null) {
    var i = l(t);
    return e === "axis" ? o === "hover" ? i.axisInteraction.hover.dataKey : i.axisInteraction.click.dataKey : o === "hover" ? i.itemInteraction.hover.dataKey : i.itemInteraction.click.dataKey;
  }
}, f = r([l, c, s, n], k), P = r([C, A, I, x, a, n, f, p], _), Z = r([m, P], (t, e) => {
  var o;
  return (o = t.coordinate) !== null && o !== void 0 ? o : e;
}), L = r(a, v, b), $ = r([f, v, T, g, L, p, c], K), tt = r([m], (t) => ({
  isActive: t.active,
  activeIndex: t.index
}));
export {
  Z as selectActiveCoordinate,
  v as selectActiveIndex,
  L as selectActiveLabel,
  P as selectCoordinateForDefaultIndex,
  tt as selectIsTooltipActive,
  Y as selectTooltipDataKey,
  m as selectTooltipInteractionState,
  $ as selectTooltipPayload,
  f as selectTooltipPayloadConfigurations,
  X as useChartName
};
