@extends('frontend.main_master') @section('body-class', 'panel-page') @section('no-header', true) @section('title', t('buy-package') . ' - ' . t('site-title')) @push('styles') @endpush @section('content')
{{-- Toast Notifications --}}
@if (session('success')) @endif @if (session('error')) @endif
{{-- Breadcrumb --}} {{-- Hero --}}

{{ t('token-packages') }}

{{ t('token-packages-description') }}

@if (($userCredits['chat_words'] ?? 0) > 0)

{{ t('current-balance') }}: {{ number_format($userCredits['chat_words']) }}

@endif
{{-- Package Cards --}} @php $subscriber = !empty($isSubscriber) && $isSubscriber; @endphp
@csrf
@foreach ($packages as $package) @php $baseDiscounted = $package->price_discounted; $subscriberPrice = $subscriber && !is_null($package->price_discounted_subscriber) ? $package->price_discounted_subscriber : null; $effectivePrice = $subscriberPrice ?? $baseDiscounted; $isFeatured = $package->sort_order === 2; $hasDiscount = $package->price_normal > $effectivePrice; @endphp
@endforeach
{{-- Action bar --}}
{{ t('select-package-to-cart') }}
{{ t('package-cart-description') }}
{{ t('go-to-cart') }}
{{-- Single Token Products --}} @if (!empty($commentTokenProducts))
{{ t('single-comment-tokens') }}

{{ t('single-comment-tokens-description') }}

@foreach (['natal' => t('natal-comment'), 'relationship' => t('relationship-comment'), 'annual' => t('annual-comment')] as $commentType => $commentLabel) @php $prod = $commentTokenProducts[$commentType] ?? null; if (!$prod) { continue; } @endphp
{{ $commentLabel }}
{{ number_format($prod['price'], 0, ',', '.') }} {{ t('currency') }}
@csrf
@endforeach
@endif
@endsection