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