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