@extends('layouts.storefront') @section('title', __('Compare cars').' | '.Setting::get('site.name', 'Monaralk')) @section('description', __('Put up to :cap cars side by side and see the differences in one table.', ['cap' => $cap])) @section('content') @php $rows = [ __('Price') => fn ($vehicle) => $vehicle->formattedPrice, __('Year') => fn ($vehicle) => $vehicle->year, __('Mileage') => fn ($vehicle) => number_format($vehicle->mileage_km).' km', __('Condition') => fn ($vehicle) => $vehicle->condition?->label() ?? '—', __('Fuel') => fn ($vehicle) => $vehicle->fuelType?->name ?? '—', __('Transmission') => fn ($vehicle) => $vehicle->transmission?->name ?? '—', __('Body type') => fn ($vehicle) => $vehicle->bodyType?->name ?? '—', __('Exterior colour') => fn ($vehicle) => $vehicle->exteriorColor?->name ?? '—', __('Trim') => fn ($vehicle) => $vehicle->trim ?: '—', __('Location') => fn ($vehicle) => $vehicle->location ?: '—', __('Registration') => fn ($vehicle) => $vehicle->registration_number ?: '—', __('Previous owners') => fn ($vehicle) => $vehicle->owners_count ?? '—', ]; @endphp

{{ __('Your account') }}

{{ __('Compare cars') }}

{{ __('Up to :cap cars, side by side. Differences are what matter — scan the rows, not the pages.', ['cap' => $cap]) }}

{{ __('Favourites') }} {{ $counts['favourite'] }} {{ __('Compare') }} {{ $counts['compare'] }}
@if (session('status'))
{{ session('status') }}
@endif @if ($vehicles->isEmpty())

{{ __('Nothing to compare yet') }}

{{ __('Add up to :cap cars with the Compare button and they will line up here.', ['cap' => $cap]) }}

{{ __('Browse cars') }}
@else
@foreach ($vehicles as $vehicle) @endforeach @foreach ($rows as $label => $value) @foreach ($vehicles as $vehicle) @endforeach @endforeach @foreach ($vehicles as $vehicle) @endforeach
{{ __('Spec') }}
@if ($vehicle->coverImage) @if ($vehicle->coverImage->path_800w_webp) @endif {{ $vehicle->listingTitle() }} @endif {{ $vehicle->listingTitle() }} {{ $vehicle->year }} · {{ number_format($vehicle->mileage_km) }} km
{{ $label }}{{ $value($vehicle) }}
{{ __('Actions') }}
{{ __('View listing') }}
@csrf @method('DELETE')
@if (count($vehicles) >= $cap)

{{ __('Compare is full. Remove a car to add another.') }}

@endif @endif
@endsection