@if ($data->show) @php add_js_src(theme_asset('components/common/script.js')); $hasList = false; $args = []; $sets = []; if($data->list_type=='tagged'){ $args['id'] = $data->style_sets?$data->style_sets:[0]; }elseif($data->list_type=='database'){ $args['@sorttype'] = $data->sorttype; $args['@limit'] = $data->limit && $data->limit > 0? $data->limit:4; } if($args){ $args['@withProducts'] = [ '@withPromoAvailable' => true ]; $sets = $helper->getStyleSets($args); } add_js_src(theme_asset('components/home/style-sets/script.js')); @endphp @if ($data->list_type=='custom' || $args)

{{$data->title}}

{{-- --}}
@if ($data->list_type == 'custom') {!! $children !!} @elseif (count($sets)) @foreach ($sets as $item)
@if ($item->products && count($item->products)) @foreach ($item->products as $prod) @if ($loop->index >= 2) @break @endif @endforeach @else @endif
@if ($item->has_discount)
{{$item->priceFormat('total')}} -{{$item->down_percent}}%
{{$item->priceFormat('final')}} @else {{$item->priceFormat('final')}} @endif
@endforeach @endif
@if ($data->list_type == 'custom') {!! $children !!} @elseif (count($sets)) @foreach ($sets as $item)
@if ($item->products && count($item->products)) @foreach ($item->products as $prod) @if ($loop->index >= 2) @break @endif @endforeach @else @endif
@if ($item->has_discount)
{{$item->priceFormat('total')}} -{{$item->down_percent}}%
{{$item->priceFormat('discount')}} @else {{$item->priceFormat('total')}} @endif
@endforeach @endif
@endif @endif