"use client"; import { Loader2, RefreshCw } from "lucide-react"; import { cn } from "@/lib/utils"; interface PullToRefreshIndicatorProps { pullDistance: number; isRefreshing: boolean; threshold: number; } /** * Visual indicator for pull-to-refresh. * Renders a fixed bar at the top that grows as the user pulls down. */ export function PullToRefreshIndicator({ pullDistance, isRefreshing, threshold, }: PullToRefreshIndicatorProps) { if (pullDistance === 0 && !isRefreshing) return null; const percent = Math.min(pullDistance / threshold, 1); return (