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