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