@extends('central.super.layout') @section('title', __('super.plans.title')) @section('content') {{-- Plan cards grid --}}
@forelse($plans as $p) @php $gradients = [ ['#6366f1', '#8b5cf6'], ['#3b82f6', '#06b6d4'], ['#10b981', '#059669'], ['#f59e0b', '#f97316'], ['#ec4899', '#f43f5e'], ]; $gradient = $gradients[$loop->index % count($gradients)]; $limits = $p->limits ?? []; $features = $p->features ?? []; $formattedLimits = $p->getFormattedLimits(); $activeFeatures = $p->getActiveFeatures(); $configuredCount = $p->getConfiguredLimitsCount(); @endphp
{{-- Header --}}

{{ $p->name }}

{{ $p->slug }}
@if($p->is_private) Private @endif {{ $p->is_active ? __('super.common.active') : __('super.common.inactive') }}
{{-- Price --}}
{{ $currencySymbol }}{{ number_format($p->price, 2) }} / {{ __('super.plans.mo') }}
{{ $currencySymbol }}{{ number_format($p->yearly_price, 2) }} / {{ __('super.plans.yr') }} @if($p->price > 0 && $p->yearly_price > 0 && $p->getYearlySavingsPercent() > 0) {{ __('super.plans.save') }} {{ $p->getYearlySavingsPercent() }}% @endif
{{-- Limits summary --}}

{{ __('super.plans.limits') }} @if($configuredCount > 0) {{ $configuredCount }} @endif

@foreach($formattedLimits as $key => $lim)
{{ $lim['label'] }} @if($lim['value'] < 0) @else {{ $lim['display'] }} @endif
@endforeach
{{-- Features summary --}} @if(count(\App\Models\Central\Plan::AVAILABLE_FEATURES) > 0)

{{ __('super.plans.features') }} @if(count($activeFeatures) > 0) {{ count($activeFeatures) }} @endif

@foreach(\App\Models\Central\Plan::AVAILABLE_FEATURES as $fKey => $fMeta) {{ $fMeta['label'] }} @endforeach
@endif {{-- Footer --}}
@empty

{{ __('super.plans.no_plans') }}

{{ __('super.plans.no_plans_desc') }}

{{ __('super.plans.create_first') }}
@endforelse
@if($plans->hasPages())
{{ $plans->links('vendor.pagination.bootstrap-5') }}
@endif @endsection