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