import React from 'react'; import { useNavigate } from 'react-router-dom'; import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Building, Star, MapPin } from 'lucide-react'; import { Company } from '@/types/database'; interface OperatorCardProps { company: Company; } const OperatorCard = ({ company }: OperatorCardProps) => { const navigate = useNavigate(); const handleClick = () => { navigate(`/operators/${company.slug}`); }; const getCompanyIcon = () => { return ; }; return ( {/* Logo/Image Section */}
{(company.card_image_url || company.card_image_id) ? ( {company.name} ) : ( <>
{/* Park Operator Badge */}
Park Operator
{/* Logo Display */}
{company.logo_url ? (
{`${company.name}
) : (
{getCompanyIcon()}
)}
)}
{/* Company Name */}

{company.name}

{/* Description */} {company.description && (

{company.description}

)} {/* Company Info */}
{company.founded_year && (
Founded: {company.founded_year}
)} {company.headquarters_location && (
{company.headquarters_location}
)}
{/* Rating */} {company.average_rating > 0 && (
{company.average_rating.toFixed(1)} ({company.review_count} reviews)
)} {/* Park Count Stats */}
{(company as any).park_count > 0 && (
{(company as any).park_count} parks operated
)}
); }; export default OperatorCard;