@extends('admin.layouts.app') @section('title', admin_trans('carousels')) @section('page-title', admin_trans('carousels')) @section('content')
@if(request('type'))@endif @if(request('status'))@endif
@if(request('search'))@endif @if(request('status'))@endif
@if(request('search'))@endif @if(request('type'))@endif
@if(request()->hasAny(['search', 'type', 'status'])) {{ admin_trans('clear_filters') }} @endif
{{ admin_trans('add_carousel') }}
{{ admin_trans('activate') }} {{ admin_trans('deactivate') }} {{ admin_trans('delete') }} {{ admin_trans('clear') }}
@forelse ($carousels as $carousel)

{{ $carousel->name }}

{{ $carousel->type }} {{ $carousel->slug }} @if($carousel->country) {{ $carousel->country->name }} @endif
{{ $carousel->slides->count() }} {{ admin_trans('slides') }}
@if($carousel->slides->count() > 0)
@foreach($carousel->slides->take(3) as $slide) @if($slide->getFirstMediaUrl('image')) Slide @endif @endforeach @if($carousel->slides->count() > 3)
+{{ $carousel->slides->count() - 3 }}
@endif
@else

{{ admin_trans('no_slides_yet') }}

@endif
@csrf @method('PATCH')
@empty
{{ admin_trans('add_carousel') }}
@endforelse
@if ($carousels->hasPages())
@endif

{{ admin_trans('add_carousel') }}

@csrf @if($currentCountry)
{{ admin_trans('will_be_created_for') }}: {{ $currentCountry->name }}
@else {{ admin_trans('please_select_country_from_navbar_first') }} @endif
{{ admin_trans('cancel') }} {{ admin_trans('create') }}

{{ admin_trans('edit_carousel') }}

@csrf @method('PUT')
{{ admin_trans('cancel') }} {{ admin_trans('update') }}
@endsection @push('scripts') @endpush