import { useFormContext as p } from "react-hook-form";
import { useStepper as a } from "../useStepper/index.js";
import { shallow as l } from "zustand/shallow";
import { isLastVisibleValidStep as m } from "../../helpers/isLastVisibleValidStep/index.js";
const b = () => {
  const { getValues: i } = p(), { currentStep: s, steps: e, visibilityData: r } = a(
    (t) => ({
      currentStep: t.currentStep,
      steps: t.steps,
      visibilityData: t.visibilityData
    }),
    l
  ), o = i();
  return m(
    s,
    e || [],
    o,
    r
  );
};
export {
  b as useIsLastVisibleValidStep
};
