import { MapPin, Star, Building2, Calendar, Globe } from 'lucide-react'; import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Company } from '@/types/database'; import { cn } from '@/lib/utils'; interface OperatorListViewProps { operators: (Company & { park_count?: number })[]; onOperatorClick: (operator: Company) => void; } export function OperatorListView({ operators, onOperatorClick }: OperatorListViewProps) { return (
{operators.map((operator, index) => ( onOperatorClick(operator)} >
{/* Logo */}
{operator.logo_url ? ( {operator.name} ) : (
)}
{/* Content */}
{/* Header */}

{operator.name}

{operator.headquarters_location && (
{operator.headquarters_location}
)}
{/* Rating */} {operator.average_rating && operator.average_rating > 0 && (
{operator.average_rating.toFixed(1)} {operator.review_count && operator.review_count > 0 && ( ({operator.review_count}) )}
)}
{/* Description */} {operator.description && (

{operator.description}

)} {/* Tags */}
{operator.founded_year && ( Founded {operator.founded_year} )} {operator.park_count !== undefined && operator.park_count > 0 && ( {operator.park_count} {operator.park_count === 1 ? 'park' : 'parks'} )}
{/* Actions */}
))}
); }