"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useSpringPressProgressValue = void 0;
var _react = require("react");
var _reactNativeReanimated = require("react-native-reanimated");
var _core = require("../../core");
const useSpringPressProgressValue = (springValue = "button") => {
  const isPressed = (0, _reactNativeReanimated.useSharedValue)(0);
  const progress = (0, _reactNativeReanimated.useDerivedValue)(() => (0, _reactNativeReanimated.withSpring)(isPressed.value, _core.IOSpringValues[springValue]));
  const onPressIn = (0, _react.useCallback)(() => {
    // eslint-disable-next-line functional/immutable-data
    isPressed.value = 1;
  }, [isPressed]);
  const onPressOut = (0, _react.useCallback)(() => {
    // eslint-disable-next-line functional/immutable-data
    isPressed.value = 0;
  }, [isPressed]);
  return {
    onPressIn,
    onPressOut,
    progress
  };
};
exports.useSpringPressProgressValue = useSpringPressProgressValue;
//# sourceMappingURL=useSpringPressProgressValue.js.map