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