@if ($totalCat > $catLimit) @endif
{{ __('Categories Left') }}
@if ($catLimit < 999999)
@if ($totalCat > $catLimit)
{{ __('Down Graded') }}
@elseif ($canAddCat == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($catLimit < 999999)
{{ $totalCat > $catLimit ? 0 : $canAddCat }}
@else
{{ __('Unlimited') }}
@endif
@if ($totalItem > $itemLimit) @endif
{{ __('Items Left') }}
@if ($itemLimit < 999999)
@if ($totalItem > $itemLimit)
{{ __('Down Graded') }}
@elseif ($canAddItem == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($itemLimit < 999999)
{{ $totalItem > $itemLimit ? 0 : $canAddItem }}
@else
{{ __('Unlimited') }}
@endif
@if ($totalOrder > $orderLimit) @endif
{{ __('Orders Left') }}
@if ($orderLimit < 999999)
@if ($totalOrder > $orderLimit)
{{ __('Down Graded') }}
@elseif ($canAddOrder == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($orderLimit < 999999)
{{ $totalOrder > $orderLimit ? 0 : $canAddOrder }}
@else
{{ __('Unlimited') }}
@endif
@if (!is_null(optional($pkgObj)->post_limit))
@if ($totalBlog > $blogLimit) @endif
{{ __('Post/Blog Limit') }}
@if ($blogLimit < 999999)
@if ($totalBlog > $blogLimit)
{{ __('Down Graded') }}
@elseif ($canAddBlog == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($blogLimit < 999999)
{{ $totalBlog > $blogLimit ? 0 : $canAddBlog }}
@else
{{ __('Unlimited') }}
@endif
@endif
@if (is_array($permissions) && in_array('Coupon code', $permissions))
@if ($totalCoupon > $couponLimit) @endif
{{ __('Coupons Left') }}
@if ($couponLimit < 999999)
@if ($totalCoupon > $couponLimit)
{{ __('Down Graded') }}
@elseif ($canAddCoupon == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($couponLimit < 999999)
{{ $totalCoupon > $couponLimit ? 0 : $canAddCoupon }}
@else
{{ __('Unlimited') }}
@endif
@endif
@if ($totalLang > $langLimit) @endif
{{ __('Additional Languages Left') }}
@if ($langLimit < 999999)
@if ($totalLang > $langLimit)
{{ __('Down Graded') }}
@elseif ($canAddLang == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($langLimit < 999999)
{{ $totalLang > $langLimit ? 0 : $canAddLang }}
@else
{{ __('Unlimited') }}
@endif
@if (!is_null(optional($pkgObj)->number_of_custom_page))
@if ($totalCustomPage > $pageLimit) @endif
{{ __('Additional Page Left') }}
@if ($pageLimit < 999999)
@if ($totalCustomPage > $pageLimit)
{{ __('Down Graded') }}
@elseif ($canAddPage == 0)
{{ __('Limit is over') }}
@endif
@endif
@if ($pageLimit < 999999)
{{ $totalCustomPage > $pageLimit ? 0 : $canAddPage }}
@else
{{ __('Unlimited') }}
@endif
@endif
@if (!empty($permissions) && is_array($permissions))
@php
$featureIcons = [
'custom_domain' => ['icon' => 'fa-globe', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'subdomain' => ['icon' => 'fa-link', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'qr_builder' => ['icon' => 'fa-qrcode', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'blog' => ['icon' => 'fa-blog', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'custom_page' => ['icon' => 'fa-file-alt', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'google_login' => ['icon' => 'fa-google', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'google_analytics' => ['icon' => 'fa-chart-line', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
'ai_content_and_image_generator' => ['icon' => 'fa-magic', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'],
];
@endphp
@foreach ($permissions as $featureKey)
@php
$cleanKey = strtolower(trim($featureKey));
if ($cleanKey === 'ai_content_and_image_generator' || $cleanKey === 'ai content and image generator' || str_contains($cleanKey, 'ai_content')) {
continue;
}
if (in_array($cleanKey, ['disqus', 'bank transfer integrations', 'facebook pixel', 'coupon code', 'coupon_code'])) {
continue;
}
$iconData = $featureIcons[$cleanKey] ?? ['icon' => 'fa-check-circle', 'color' => '#28a745', 'bg' => 'rgba(40, 167, 69, 0.1)'];
$featureName = str_replace('_', ' ', $featureKey);
@endphp