import type { GlideDecision } from '@/domain/glide';

/**
 * Swipe convention so the gesture builds muscle memory:
 *   • drag left  → `resistant` (yes resistance — let it soften)
 *   • drag right → `clear`     (no resistance — ready to act)
 */
export const SWIPE_DISTANCE = 96;
export const SWIPE_VELOCITY = 850;

export function resolveSwipe(translationX: number, velocityX: number): GlideDecision | null {
  'worklet';
  if (translationX < -SWIPE_DISTANCE || velocityX < -SWIPE_VELOCITY) return 'resistant';
  if (translationX > SWIPE_DISTANCE || velocityX > SWIPE_VELOCITY) return 'clear';
  return null;
}
