"use strict";

import { useCallback } from "react";
import { useDerivedValue, useSharedValue, withSpring } from "react-native-reanimated";
import { IOSpringValues } from "../../core";
export const useSpringPressProgressValue = (springValue = "button") => {
  const isPressed = useSharedValue(0);
  const progress = useDerivedValue(() => withSpring(isPressed.value, IOSpringValues[springValue]));
  const onPressIn = useCallback(() => {
    // eslint-disable-next-line functional/immutable-data
    isPressed.value = 1;
  }, [isPressed]);
  const onPressOut = useCallback(() => {
    // eslint-disable-next-line functional/immutable-data
    isPressed.value = 0;
  }, [isPressed]);
  return {
    onPressIn,
    onPressOut,
    progress
  };
};
//# sourceMappingURL=useSpringPressProgressValue.js.map