/* eslint-disable @next/next/no-img-element */ import React from 'react'; import { cn } from "@/lib/utils"; import { Button } from '@/components/ui/button'; import PlaceholderImage from './placeholder-image'; interface Location { lat: number; lng: number; } interface Photo { thumbnail: string; small: string; medium: string; large: string; original: string; caption?: string; } interface Place { name: string; location: Location; place_id: string; vicinity: string; rating?: number; reviews_count?: number; price_level?: string; description?: string; photos?: Photo[]; is_closed?: boolean; next_open_close?: string; type?: string; cuisine?: string; source?: string; phone?: string; website?: string; hours?: string[]; distance?: string; bearing?: string; } interface PlaceCardProps { place: Place; onClick: () => void; variant?: 'overlay' | 'list'; } const PlaceCard: React.FC = ({ place, onClick, variant = 'list' }) => { const isOverlay = variant === 'overlay'; return (
{place.photos?.[0]?.medium ? ( {place.name} ) : ( )}

{place.name}

{place.is_closed ? "Closed" : "Open now"} {place.next_open_close && ( <> · until {place.next_open_close} )} {place.type && ( <> · {place.type} )}
{place.rating && ( {place.rating.toFixed(1)} )} {place.reviews_count && ( ({place.reviews_count} reviews) )} {place.price_level && ( <> · {place.price_level} )}
{place.description && (

{place.description}

)}
{place.website && ( )} {place.phone && ( )} {place.place_id && ( )}
); }; export default PlaceCard;