{{-- @extends('layouts.home') --}} {{-- @section('content') --}} {{--
@livewire('shop', [ 'categories' => \App\Models\Category::all(), 'minPrice' => $inputs['min_price'] ?? null, 'maxPrice' => $inputs['max_price'] ?? null, ])
--}} {{-- --}} {{-- @endsection --}} @extends('layouts.home') @section('content') {{-- mobile filter version --}}
{{ session('lang') == 'en' ? 'Filter' : 'منقي' }}
@csrf @method('POST')

{{ session('lang') == 'en' ? 'Sort By' : 'ترتيب' }}

{{--

{{ session('lang') == 'en' ? 'colors' : 'ألوان' }}

@foreach ($colors as $color)
input('color_id'))) @foreach (request()->input('color_id') as $index) @if ($index == $color->id) checked @break @endif @endforeach @endif />
@endforeach
--}}

{{ session('lang') == 'en' ? 'Categories' : 'فئات' }}

@foreach ($categories as $cat)
input('categories'))) @foreach (request()->input('categories') as $index) @if ($index == $cat->id) checked @break @endif @endforeach @endif >
@endforeach

{{ session('lang') == 'en' ? 'Brands' : 'العلامات التجارية' }}

@foreach ($brands as $brand)
input('brands'))) @foreach (request()->input('brands') as $b) @if ($b == $brand->id) checked @break @endif @endforeach @endif>
@endforeach

{{ session('lang') == 'en' ? 'STORES' : 'المتاجر' }}

@foreach ($sections as $section)
input('sections'))) @foreach (request()->input('sections') as $b) @if ($b == $section->id) checked @break @endif @endforeach @endif>
@endforeach

{{ session('lang') == 'en' ? 'Branches' : 'الاقسام' }}

{{ session('lang') == 'en' ? 'Price I.Q.D' : 'السعر د.ع' }}

input('min_price'))) value = {{ request()->input('min_price') }} @endif /> input('max_price'))) value = {{ request()->input('max_price') }} @endif />
{{-- desktop filter version --}}
@if ($products->count() <= 0)
{{ session('lang') == 'en' ? 'No results found' : 'لم يتم العثور على نتائج' }}
@endif @foreach ($products as $item) @livewire('product', ['item' => $item], key($item->id)) {{-- --}} @endforeach
@endsection