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