import { ArrowUpDown, Clock, TrendingUp, MapPin, Zap, Shield } from 'lucide-react'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { cn } from '@/lib/utils'; export type SortOption = | 'recent' | 'trust' | 'proximity' | 'popular' | 'zaps'; interface SortDropdownProps { value: SortOption; onChange: (value: SortOption) => void; className?: string; showProximity?: boolean; // Only show if geolocation available contentType?: 'spots' | 'events' | 'coaches' | 'generic'; } const SORT_OPTIONS = { recent: { label: 'Most Recent', icon: Clock, description: 'Newest first', }, trust: { label: 'Highest Trust', icon: Shield, description: 'Most trusted creators', }, proximity: { label: 'Closest to Me', icon: MapPin, description: 'Nearest locations', }, popular: { label: 'Most Popular', icon: TrendingUp, description: 'Most comments/reactions', }, zaps: { label: 'Most Zapped', icon: Zap, description: 'Highest value received', }, }; export function SortDropdown({ value, onChange, className, showProximity = false, }: SortDropdownProps) { const selectedOption = SORT_OPTIONS[value]; const Icon = selectedOption.icon; // Determine which sort options to show based on content type const availableOptions: SortOption[] = ['recent', 'trust']; if (showProximity) { availableOptions.push('proximity'); } // Popular sorting available for all content types availableOptions.push('popular'); // Zaps available for all content availableOptions.push('zaps'); return ( ); }