@extends('layouts.public') @section('title', __('Properties')) @section('meta_description', __('Houses, apartments, land and commercial property for sale and to rent.')) @section('content') @php($isWide = in_array($criteria->view, ['map', 'split'], true))
! $isWide, ])> {{-- The filter panel is a plain GET form, so every filtered view is a real URL that can be shared, bookmarked and reloaded. Alpine swaps the results in without a reload where it can; without JavaScript the form still submits and the page still works. --}}
! $isWide])>

{{ trans_choice('One property|:count properties', $listings->total(), ['count' => number_format($listings->total())]) }}

{{-- The view is a query-string key, so a link opens on the same one the sender was looking at. --}}
@foreach ([ 'grid' => ['grid', __('Grid')], 'list' => ['menu', __('List')], 'map' => ['map', __('Map')], 'split' => ['layers', __('Split')], ] as $value => [$icon, $label]) $criteria->view === $value, 'text-text-secondary hover:bg-surface-muted hover:text-text' => $criteria->view !== $value, ]) @if ($criteria->view === $value) aria-current="true" @endif> @endforeach
@include('public.partials.query-inputs', [ 'params' => request()->except(['sort', 'page']), 'prefix' => '', ])
{{-- Saving the search posts the page's own query string, so what is stored reproduces exactly what the buyer is looking at — no re-entering, and no drift between the two. --}} @if ($hasFilters)
@auth
@csrf @include('public.partials.query-inputs', [ 'params' => request()->except(['page', 'view']), 'prefix' => 'criteria', ])
@else

{{ __('Sign in') }} {{ __('to save this search and be told when something new matches it.') }}

@endauth
@endif @if ($activeFilters)
@foreach ($activeFilters as $filter) {{ $filter['label'] }}: {{ $filter['value'] }} @endforeach
@endif
@include('public.partials.listing-results', ['listings' => $listings, 'criteria' => $criteria])
@endsection