/**
 * Triggers Telegram Mini App haptic feedback when available.
 * Use on primary actions and key interactions to mimic native Telegram behavior.
 */

import { hapticFeedbackImpactOccurred } from "@telegram-apps/sdk-react";

/**
 * Triggers light impact haptic feedback. No-op when not in Telegram or unsupported.
 */
export function triggerHapticLight(): void {
  try {
    if (hapticFeedbackImpactOccurred.isAvailable()) {
      hapticFeedbackImpactOccurred("light");
    }
  } catch {
    // SDK not available; ignore.
  }
}
