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