import { useState, useCallback } from 'react';
import { verifyOTP } from 'react-native-cloud-ca';
const useVerifyOTP = () => {
  const [result, setResult] = useState(null);
  const [error, setError] = useState(null);
  const [isLoading, setIsLoading] = useState(false);
  const verifyOTPFunc = useCallback(async params => {
    try {
      setIsLoading(true);
      const response = await verifyOTP(params);
      setResult(response);
    } catch (e) {
      setError(e);
    } finally {
      setIsLoading(false);
    }
  }, []);
  return [result, error, verifyOTPFunc, isLoading];
};
export default useVerifyOTP;
//# sourceMappingURL=useVerifyOTP.js.map