@php $slides = $slides ?? collect(); $isSingle = $slides->count() <= 1; @endphp
@forelse ($slides as $slide) @php $hasTitle = $slide->show_title && !empty($slide->title); $hasSubtitle = $slide->show_subtitle && !empty($slide->subtitle); $hasButton = $slide->show_button && !empty($slide->button_text) && !empty($slide->button_url); $hasContent = $hasTitle || $hasSubtitle || $hasButton; $altText = $hasTitle ? __($slide->title) : __('Слайд на главной странице'); @endphp
{{ $altText }}
@if ($hasContent)
@if ($hasTitle)

{{ __($slide->title) }}

@endif @if ($hasSubtitle)

{{ __($slide->subtitle) }}

@endif @if ($hasButton) {{ __($slide->button_text) }} @endif
@endif
@empty

{{ __($fallbackTitle ?? 'Собирайте ПК быстрее') }}

{{ __($fallbackText ?? 'Загрузите баннеры в админке, чтобы вывести акции и подборки товаров на главной странице.') }}

@if (!empty($fallbackUrl)) {{ __($fallbackButton ?? 'Открыть каталог') }} @endif
@endforelse