const can = 'vibrate' in navigator;

export const haptics = {
  tap() { can && navigator.vibrate(10); },
  heavy() { can && navigator.vibrate(30); },
  success() { can && navigator.vibrate([20, 50, 20]); },
  error() { can && navigator.vibrate([50, 30, 50, 30, 50]); },
  selection() { can && navigator.vibrate(5); },
};
