@if($badgeText)
{{-- Plan identity --}}
{{-- Pricing --}}
{{-- Trial / grace pills --}}
@if($plan->trial_days > 0 || $plan->grace_days > 0)
@endif
{{-- Features --}}
{{-- /.sp-card-wrap --}}
@endforeach
@if($badgeCheck)
@elseif($isFeatured)
@endif
{{ $badgeText }}
@endif
{{ $plan->name }}
{{ $plan->description ?: __('Access to core platform features.') }}
@if($isFree)
{{ __('Free') }}
{{ __('forever') }}
@else
{{ $currencyCode }}
{{ number_format($monthlyAmt, siteDecimalPlaces()) }}
/{{ __('mo') }}
@endif
@if($plan->features->isNotEmpty())
{{-- Call to action --}}
{{ __("What's included") }}
-
@foreach($plan->features as $feature)
- {{ $feature->feature_label }} @if(! $feature->isToggle()) {{ $feature->isUnlimited() ? __('Unlimited') : $feature->feature_value }} @endif @endforeach
@if($isCurrent)
{{ __('Active Plan') }}
@else
@php
// Prorated charge / credit per cycle for switch CTAs.
$planProration = $proration[$plan->id] ?? null;
$isSwitch = (bool) ($current && $current->isActive());
$isUpgrade = $isSwitch && (int) $plan->sort_order > (int) $current->plan->sort_order;
$isDowngrade = $isSwitch && (int) $plan->sort_order < (int) $current->plan->sort_order;
if ($isUpgrade) {
$switchLabel = __('Upgrade to :name', ['name' => $plan->name]);
} elseif ($isDowngrade) {
$switchLabel = __('Switch to :name', ['name' => $plan->name]);
} else {
$switchLabel = $ctaLabel;
}
$protoData = $planProration ? [
'monthly_charge' => $planProration['monthly']['charge'] ?? 0,
'monthly_credit' => $planProration['monthly']['credit'] ?? 0,
'monthly_full' => $planProration['monthly']['new_plan_price'] ?? 0,
'half_yearly_charge' => $planProration['half_yearly']['charge'] ?? 0,
'half_yearly_credit' => $planProration['half_yearly']['credit'] ?? 0,
'half_yearly_full' => $planProration['half_yearly']['new_plan_price'] ?? 0,
'yearly_charge' => $planProration['yearly']['charge'] ?? 0,
'yearly_credit' => $planProration['yearly']['credit'] ?? 0,
'yearly_full' => $planProration['yearly']['new_plan_price'] ?? 0,
'remaining_days' => $planProration['monthly']['remaining_days'] ?? 0,
] : null;
@endphp
{{ $isSwitch ? $switchLabel : $ctaLabel }}
@if($isSwitch && $planProration && ($planProration['monthly']['credit'] ?? 0) > 0)
{{ __('Prorated — :days days credit applied', ['days' => $planProration['monthly']['remaining_days']]) }}
@endif
@endif