@extends("layout.app") @section("content") @include('partial.slider_style')

{{$sub_category->title}}

@php if($tab_specs){ $tapSpec = $tab_specs->first(); $showItemsCondition = ($tab && $tab_specs->count() == 1 && $tapSpec); $showItemsInTapsCondition = ($tab && $tab_specs->count()>1); }else{ $showItemsCondition = false; $showItemsInTapsCondition =false; } @endphp @if($showItemsCondition) @php $items = $tapSpec->items()->where('category_id', $sub_category->id)->orderBy("items.price",'asc')->where("is_active",1)->get(); $class = "custom-flex-distribution-items"; @endphp
@include("components.one_tab_items", compact('items', 'class'))
@elseif($showItemsInTapsCondition) @include("components.multiple_tab_items", compact('tab_specs')) @endif @if(false)
@includeWhen($tab && $tab_specs->count()>1,"components.multiple_tab_items",compact('tab_specs')) @includeWhen($tab && $tab_specs->count()==1 && $tab_specs->first(),"components.one_tab_items",['tab_spec'=>$tab_specs->first()])
@endif
@endsection @section("scripts") @include('partial.slider_script') @endsection