@extends('frontend.main_master') @section('body-class', 'panel-page panel-scrollable') @section('title', t('balance') . ' - ' . t('site-title')) @push('styles') @endpush @section('content')
{{ t('balance-hero-title') }}

{{ t('hi') }} {{ $user->name ?? 'Üyemiz' }} {{ t('balance-hero-subtitle') }}

{{ t('balance-hero-description') }}
{{ t('buy-package') }} @if ($isSubscriber) @else {{ t('subscribe') }} @endif
{{ t('token') }}
{{ number_format($chatWordsRemaining) }}
{{ t('remaining-tokens') }}
{{ t('report-limit-modal-title') }}
{{ $reportCreditsRemaining }}
{{ t('remaining-report-credits') }}
{{ t('map-credit') }}
{{ $mapCreditsRemaining }}
{{ t('remaining-map-credits') }}
{{ t('daily-free') }}
@if ($isSubscriber)
∞
{{ t('unlimited-reports') }}
@elseif ($hasDailyFreeReport)
1
{{ t('daily-free-report-available') }}
@else
0
{{ t('daily-free-report-used') }}
@endif
{{ t('subscription-status') }} @if ($isSubscriber) {{ t('active') }} @else {{ t('inactive') }} @endif
@if ($activeSubscription) {{ optional($activeSubscription->starts_at)->format('d.m.Y') }} - {{ optional($activeSubscription->ends_at)->format('d.m.Y') }} @if (!is_null($subscriptionDaysLeft)) · @if ($subscriptionDaysLeft >= 0) @php $daysLeftInt = (int) floor($subscriptionDaysLeft); @endphp @if ($daysLeftInt === 0) {{ t('expires-today') }} @elseif ($daysLeftInt === 1) {{ t('expires-tomorrow') }} @else {{ $daysLeftInt }} {{ t('expires-in-days') }} @endif @else {{ t('subscription-expired') }} @endif @endif @else {{ t('no-active-subscription') }} @endif

{{ t('usage-summary') }}

@if ($usage)
{{ t('my-ai-comments') }} {{ $usage->comment_count }}
{{ t('total-reports') }} {{ $usage->report_count }}
{{ t('total-tokens-used') }} {{ number_format($usage->chat_words_total) }}
@else

{{ t('no-usage-data') }}

@endif

{{ t('recent-purchases') }}

@if ($recentPurchases->isEmpty())

{{ t('no-recent-purchases') }}

@else
@foreach ($recentPurchases as $purchase) @endforeach
{{ t('date') }} {{ t('product') }} {{ t('type') }} {{ t('amount') }}
{{ $purchase->created_at?->format('d.m.Y H:i') }} @if ($purchase->package) {{ $purchase->package->name }} @else @php $labelMap = [ 'subscription' => t('subscription-purchase'), 'single_comment' => t('single-comment'), 'single_chat' => t('single-chat'), 'single_report' => t('single-report'), 'single_comment_tokens' => t('single-comment-tokens'), ]; @endphp {{ $labelMap[$purchase->purchase_type] ?? ucfirst($purchase->purchase_type) }} @endif @switch($purchase->purchase_type) @case('package') {{ t('packages') }} @break @case('subscription') {{ t('subscriptions') }} @break @case('single_comment') {{ t('single-comment') }} @break @case('single_chat') {{ t('single-chat') }} @break @case('single_report') {{ t('single-report') }} @break @case('single_comment_tokens') {{ t('single-comment-tokens') }} @break @default {{ $purchase->purchase_type }} @endswitch {{ number_format($purchase->amount_paid, 2) }} {{ t('currency') }}
@endif

{{ t('recent-gifts') }}

@if (($recentGiftItems ?? collect())->isEmpty())

{{ t('no-recent-gifts') }}

@else
@foreach ($recentGiftItems as $gift) @endforeach
{{ t('date') }} {{ t('gift') }} {{ t('validity') }}
{{ optional($gift->date)->format('d.m.Y H:i') }} {{ $gift->label }} {{ optional($gift->valid_from)->format('d.m.Y') }} - {{ optional($gift->valid_to)->format('d.m.Y') }}
@endif
@endsection