{{-- Table (Desktop) --}} {{-- Card Grid (Mobile) --}}
@forelse ($welcomeGifts as $gift)
{{-- Card Header --}}
@if($gift->status === 'active' && (!$gift->expires_at || $gift->expires_at->isFuture()))

{{ $gift->code }}

@else

{{ $gift->code }}

@endif

{{ $gift->name }}

@php $displayStatusMobile = $gift->status === 'active' && $gift->expires_at?->isPast() ? 'expired' : ($gift->status === 'disabled' ? 'cancelled' : $gift->status); @endphp
{{-- Info Grid --}}

{{ __('Machine') }}

{{ $gift->machine?->name ?? '-' }}

{{ __('Discount Value') }}

{{ $gift->discount_label }}

{{ __('Usage Status') }}

@if($gift->usage_type === 'unlimited') {{ __('Unlimited') }} ({{ $gift->usage_count }}) @else @if($gift->usage_count > 0) {{ __('Used') }} @else {{ __('Once') }} @endif @endif

{{ __('Expires At') }}

{{ $gift->expires_at ? $gift->expires_at->format('Y-m-d H:i') : __('Permanent') }}

{{-- Action Buttons --}}
@if($gift->status === 'active' && (!$gift->expires_at || $gift->expires_at->isFuture())) @endif @if($gift->status === 'active')
@csrf @method('DELETE')
@endif
@empty
@endforelse
{{-- Pagination --}}
{{ $welcomeGifts->appends(request()->query())->links('vendor.pagination.luxury') }}