@if(isset($mode) && $mode === 'view')
    <div>
        @if(Arr::get($slide, 'link')) <a href="{{ webLinkUrl($slide['link'], $alternateLogId ?? false) }}" aria-label="{{ webLinkTitle($slide['link']) }}"> @endif
            @include('partials.webpImage', [
                'webpUrl' => webAssetUrl($slide['webAssetId']) . '?webp=1',
                'jpgUrl' => webAssetUrl($slide['webAssetId']),
                'attributes' => [
                    'alt' => isset($alttag) ? trim($alttag) : webLinkTitle(['type' => 'webAsset', 'target' => $slide['webAssetId']]),
                ]
            ])
            @if(Arr::get($slide, 'link')) </a> @endif
    </div>
@else
    <div data-view-id="{{$slideId}}" data-link-type="{{ Arr::get($slide, 'link.type') }}" data-link-target="{{ Arr::get($slide, 'link.target') }}" data-web-asset-id="{{ $slide['webAssetId'] }}" @if(isset($slide['alttag'])) data-img-alttag="{{ trim($slide['alttag']) }}" @else data-img-alttag="{{ webLinkTitle(['type' => 'webAsset', 'target' => $slide['webAssetId']]) }}" @endif data-target-customers="@if(isset($targetCustomers))  {{json_encode($targetCustomers)}} @endif" data-visible-dates="@if(isset($visibleDates))  {{json_encode($visibleDates)}} @endif" data-default-visibility="@if(isset($slide['defaultVisibility']))  {{$slide['defaultVisibility']}} @else Visible @endif" class="slide-container view-container {{$default? 'default visible' : 'alternate hidden'}}">
        <div style="margin: 5px; padding: 5px; border: 1px solid black; clear: both;">
            <img class="center-block img-responsive slide-thumbnail" src="{{ webAssetUrl($slide['webAssetId']) }}" @if(isset($slide['alttag'])) alt="{{ trim($slide['alttag']) }}" @else alt="{{ webLinkTitle(['type' => 'webAsset', 'target' => $slide['webAssetId']]) }}" @endif>
            @lang('hilco::app.destination_colon') <a href="#" class="slide-url">{!! strlen(webLinkTitle(Arr::get($slide, 'link', []))) ? webLinkTitle($slide['link']) : '<em>'.trans('hilco::app.none').'</em>' !!}</a><br>
            @lang('hilco::app.alternate_tag') <a href="#" class="slide-alttag">@if(isset($slide['alttag']) && trim($slide['alttag']) != "") {{ trim($slide['alttag']) }} @else {{ webLinkTitle(['type' => 'webAsset', 'target' => $slide['webAssetId']]) }} @endif</a><br>
            @include('hilco::components.targetCustomer.visibilityControls', ['default' => $default ?? true, 'defaultVisibility' => $slide['defaultVisibility'] ?? '', 'targetCustomersFormatted' => $targetCustomersFormatted ?? '', 'visibleDatesFormatted' => $visibleDatesFormatted ?? '', 'deleteButtonClass' => 'delete-slide-button delete-view-button'])
        </div>
    </div>
@endif