@props(['product', 'size' => 'sm']) @php $isUpvoted = auth()->check() && $product->isUpvotedBy(auth()->user()); $upvotesCount = isset($product->upvotes_count) ? $product->upvotes_count : $product->upvotes()->count(); $sizeClasses = match($size) { 'lg' => 'h-12 w-12 text-base', 'md' => 'h-10 w-10 text-sm', default => 'h-8 w-8 text-xs', }; @endphp