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