@extends('admin.layouts.app') @section('title', admin_trans('occasions')) @section('page-title', admin_trans('occasions')) @section('content')
@if(request('locale_id'))@endif @if(request('status'))@endif @if(request('featured'))@endif
@if($currentCountry && $availableLocales->count() > 1)
@if(request('search'))@endif @if(request('status'))@endif @if(request('featured'))@endif
@endif
@if(request('search'))@endif @if(request('locale_id'))@endif @if(request('featured'))@endif
@if(request('search'))@endif @if(request('locale_id'))@endif @if(request('status'))@endif
@if(request()->hasAny(['search', 'locale_id', 'status', 'featured'])) {{ admin_trans('clear_filters') }} @endif
{{ admin_trans('add_occasion') }}
{{ admin_trans('activate') }} {{ admin_trans('deactivate') }} {{ admin_trans('feature') }} {{ admin_trans('unfeature') }} {{ admin_trans('delete') }} {{ admin_trans('clear') }}
@if ($occasions->isEmpty()) @if($currentCountry) {{ admin_trans('add_occasion') }} @else

{{ admin_trans('use_country_filter_navbar') }}

@endif @else @foreach ($occasions as $occasion)
{{ $occasion->order ?? 0 }}
@if ($occasion->getFirstMediaUrl('icon')) Icon @else
@endif
@php $translation = $occasion->translations->first(); @endphp
{{ $translation->name ?? 'Occasion #' . $occasion->id }} @if ($translation && $translation->description)
{!! strip_tags(Str::limit($translation->description, 60)) !!}
@endif
@foreach($occasion->translations->take(3) as $trans) {{ $trans->locale->code ?? 'N/A' }} @endforeach @if($occasion->translations->count() > 3) +{{ $occasion->translations->count() - 3 }} @endif
@csrf @method('PATCH')
@csrf @method('PATCH')
@endforeach
@if ($occasions->hasPages())
@endif @endif

{{ admin_trans('add_occasion') }}

@if($currentCountry && $availableLocales->count() > 0)
@csrf @if(request('locale_id')) @endif
{{ $currentCountry->flag_emoji }}

{{ admin_trans('creating_occasion_for') }}

{{ $currentCountry->getName() }}

@if(request('locale_id')) @php $selectedLocale = $availableLocales->find(request('locale_id')); @endphp @if($selectedLocale)

{{ admin_trans('language') }}: {{ $selectedLocale->language->name ?? $selectedLocale->name }}

@endif @endif
@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale)
direction === 'rtl') dir="rtl" @endif> {{ admin_trans('description') }}
@endforeach
{{ admin_trans('cancel') }} {{ admin_trans('create') }}
@else {{ admin_trans('close') }} @endif

{{ admin_trans('edit_occasion') }}

@csrf @method('PUT') @if($availableLocales->count() > 0)
@foreach($availableLocales as $locale) @endforeach
@foreach($availableLocales as $locale) @php $isRTL = $locale->direction === 'rtl'; @endphp
{{-- FIXED: TinyMCE with proper data binding --}}
{{ admin_trans('description') }}
@endforeach
@endif

{{ admin_trans('no_icon') }}

{{ admin_trans('no_banner') }}

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