@if($categories->isEmpty())
No categories found.
@endif
@foreach($categories as $category)
{{ $category->category_name_en }}
@if($category->brands->isNotEmpty())
Brands in {{ $category->category_name_en }}:
@foreach($category->brands as $brand)
@include('livewire.partials.brand-rule-row', ['brand' => $brand])
@endforeach
@endif
@foreach($category->subCategories as $subCat)
{{ $subCat->sub_category_name_en ?? $subCat->name_en ?? 'Sub Category '.$subCat->brands_sub_category_id }}
@if($subCat->brands->isNotEmpty())
@foreach($subCat->brands as $brand)
@include('livewire.partials.brand-rule-row', ['brand' => $brand])
@endforeach
@endif
@foreach($subCat->subSubCategories as $subSubCat)
{{ $subSubCat->sub_sub_category_name_en ?? $subSubCat->name_en ?? 'Level 3 Category' }}
@foreach($subSubCat->brands as $brand)
@include('livewire.partials.brand-rule-row', ['brand' => $brand])
@endforeach
@if($subSubCat->brands->isEmpty())
No brands
@endif
@endforeach
@endforeach
@endforeach