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