import { useContext } from "react";
import { _getTabIndexValue as getTabIndexValue } from "@dynatrace/strato-components-preview/charts";
import { A11yToolbarTabIndexContext } from "../../../contexts/a11y-toolbar-tab-index.context.js";
import { getTabIndexKey } from "../functions/a11y-toolbar-controls.js";
const useA11yToolbarTabIndex = (type) => {
  const tabIndexContext = useContext(
    A11yToolbarTabIndexContext
  );
  const toolbarTabIndex = tabIndexContext.find(
    (tab) => getTabIndexKey(tab) === type
  );
  return toolbarTabIndex ? getTabIndexValue(toolbarTabIndex) : -1;
};
export {
  useA11yToolbarTabIndex
};
//# sourceMappingURL=use-a11y-toolbar-tab-index.js.map
