@php $isPro = ! empty($plan['is_pro']) || ($plan['type'] ?? 'basic') === 'pro'; $isCurrent = ($storeSub['plan_key'] ?? '') === $planKey; $activePro = is_array($storeSub['active_pro_features'] ?? null) ? $storeSub['active_pro_features'] : []; $isProActive = $isPro && in_array($planKey, $activePro, true); $platformMode = $platformMode ?? false; $subRoute = $subRoute ?? fn (string $name, mixed $params = []) => route(($subscriptionRoutePrefix ?? 'admin.subscriptions') . '.' . $name, $params); $features = $plan['features_bn'] ?? $plan['features'] ?? []; $headerClass = $plan['header_class'] ?? 'bg-primary'; $ordersBadge = (int) ($plan['orders_badge'] ?? $plan['order_limit'] ?? 0); $overage = (float) ($plan['overage_rate'] ?? 0); $borderClass = match (true) { ($isCurrent || $isProActive) && $headerClass === 'bg-success' => 'border-success', $isCurrent || $isProActive => 'border-success', $isPro => 'border-warning', $headerClass === 'bg-success' => 'border-success', default => 'border-primary', }; $btnClass = match (true) { $isPro => 'btn-warning-modern', $headerClass === 'bg-success' => 'btn-success-modern', default => 'btn-primary-modern', }; $priceClass = $isPro ? 'price-amount-warning' : ''; $periodLabel = match ($plan['period'] ?? 'month') { 'trial' => '/ ' . ($plan['trial_days'] ?? 3) . ' days', default => '/month', }; $description = $plan['description_bn'] ?? $plan['description_en'] ?? null; @endphp
@if($isPro)
PRO
@endif
{{ $plan['name'] }}
@if($ordersBadge > 0)
Orders {{ number_format($ordersBadge) }} /month
@endif @if($overage > 0)
Overage Rate {{ number_format($overage, 2) }} ৳/order
@endif
@if($description)

{{ $description }}

@endif
    @foreach($features as $feature)
  • {{ $feature }}
  • @endforeach