@extends('frontend.main_master') @section('body-class', 'panel-page') @section('no-header', true) @section('title', t('subscribe') . ' - ' . t('site-title')) @push('styles') @endpush @section('content')
{{-- Toasts --}}
@if (session('success')) @endif @if (session('error')) @endif
{{-- Sepetim (sağ üst) --}} {{-- Hero --}}

{{ t('select-plan') }}

@php $isEnLocale = str_starts_with(strtolower((string) config('app.locale', env('APP_LOCALE', 'tr'))), 'en'); @endphp {{-- Abonelik Türü Sekmeleri --}}
@if ($isSubscriber)

{{ t('subscription.already_active') }}

@else
@csrf
@foreach ($tokenlessPlans as $plan) @php $isEn = $isEnLocale; $isPop = $plan['key'] === $featuredTokenlessPlanKey; $hasDsc = $plan['price_normal'] > $plan['price']; $mEq = $plan['months'] > 1 ? round($plan['price'] / $plan['months']) : null; $tokenlessPlanTitle = match ($plan['key']) { 'monthly_tokenless' => $isEn ? '1 Month Subscription' : '1 Aylık Abonelik', 'six_months_tokenless' => $isEn ? '6 Months Subscription' : '6 Aylık Abonelik', 'yearly_tokenless' => $isEn ? '12 Months Subscription' : '12 Aylık Abonelik', default => trim(str_replace(['(Tokensiz)', '(No Tokens)'], '', $plan['label'])), }; @endphp
@endforeach
{{-- Action bar --}}
{{ t('select-package-to-cart') }}
{{ t('package-cart-description') }}
{{ t('go-to-cart') }}
@endif
{{-- /#pane-plan-tokenless --}}
@if ($isSubscriber)

{{ t('subscription.already_active') }}

@else
@csrf
@foreach ($plans as $plan) @php $isEn = str_starts_with(strtolower((string) config('app.locale', env('APP_LOCALE', 'tr'))), 'en'); $package = $plan['package'] ?? null; $isPop = $plan['key'] === $featuredFullPlanKey; $hasDsc = $plan['price_normal'] > $plan['price']; $mEq = $plan['months'] > 1 ? round($plan['price'] / $plan['months']) : null; $desc = match (true) { $plan['months'] === 1 => t('beginner-plan'), $plan['months'] === 6 => t('most-popular-plan'), default => t('pro-plan'), }; $fullPlanTitle = match ($plan['key']) { 'monthly' => $isEn ? '1 Month Subscription + 32,000 Tokens' : '1 Aylık Abonelik + 32,000 Token', 'six_months' => $isEn ? '6 Months Subscription + 193,000 Tokens' : '6 Aylık Abonelik + 193,000 Token', 'yearly' => $isEn ? '12 Months Subscription + 388,000 Tokens' : '12 Aylık Abonelik + 388,000 Token', default => $plan['label'], }; $badgeText = ($plan['key'] === 'yearly' || $plan['months'] === 12) ? ($isEn ? 'Lowest Token Cost' : 'En Düşük Token Maliyeti') : t('most-popular'); @endphp
@endforeach
{{-- Action bar --}}
{{ t('select-package-to-cart') }}
{{ t('package-cart-description') }}
{{ t('go-to-cart') }}
@endif
{{-- /#pane-plan-full --}}
{{-- Puan Paketleri --}} @if (($userCredits['chat_words'] ?? 0) > 0)

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

@endif
@csrf
@foreach ($packages as $package) @php $baseDiscounted = $package->price_discounted; $subscriberPrice = $isSubscriber && !is_null($package->price_discounted_subscriber) ? $package->price_discounted_subscriber : null; $effectivePrice = $subscriberPrice ?? $baseDiscounted; $isFeatured = $package->id === $featuredPackageId; $hasDiscount = $package->price_normal > $effectivePrice; @endphp
@endforeach
{{-- Action bar --}}
{{ t('select-package-to-cart') }}
{{ t('package-cart-description') }}
{{ t('go-to-cart') }}
{{-- /#pane-plan-points --}} {{-- Yorum Paketleri (Single Token Products) --}}
@if (!empty($commentTokenProducts))
{{ $isEnLocale ? 'Reading Packages' : 'Yorum Paketleri' }}

{{ $isEnLocale ? 'Get the reading you want' : 'İstediğiniz yorumu alın' }}

@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
{{-- Action bar --}}
{{ t('select-package-to-cart') }}
{{ t('package-cart-description') }}
@endif
{{-- /#pane-plan-comments --}}
{{-- /.tab-content --}}
@endsection