@php $allTenants = $this->getTenants(); $tenants = $this->getVisibleTenants($allTenants); $workspace = app(\App\Support\Workspaces\WorkspaceContext::class)->currentWorkspace(); $environmentCount = $allTenants->count(); $visibleEnvironmentCount = $tenants->count(); $hasSearch = trim($this->search) !== ''; @endphp @if ($allTenants->isEmpty()) {{-- Empty state --}}
@if ($workspace)
{{ $workspace->name }}
@endif

{{ __('localization.shell.no_active_environments') }}

{{ __('localization.shell.no_active_environments_description') }}

{{ __('localization.shell.view_managed_environments') }} {{ __('localization.shell.switch_workspace') }}
@else {{-- ManagedEnvironment list --}}
{{-- Header row --}}
@if ($workspace)
{{ $workspace->name }}
@endif {{ trans_choice('localization.shell.environment_count', $environmentCount, ['count' => $environmentCount]) }}

{{ __('localization.shell.choose_environment_description') }}

{{ __('localization.shell.workspace_wide_available_without_environment') }}

@if ($hasSearch)
{{ __('localization.shell.environment_search_results_count', ['visible' => $visibleEnvironmentCount, 'total' => $environmentCount]) }}
@endif
{{-- ManagedEnvironment cards --}} @if ($tenants->isEmpty())

{{ __('localization.shell.no_environment_search_results') }}

{{ __('localization.shell.no_environment_search_results_description') }}

@else
@foreach ($tenants as $tenant) @php $presentation = $this->tenantLifecyclePresentation($tenant); $badgeClasses = match ($presentation->badgeColor) { 'success' => 'border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/20 dark:bg-emerald-500/10 dark:text-emerald-200', 'warning' => 'border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/20 dark:bg-amber-500/10 dark:text-amber-200', 'danger' => 'border-rose-200 bg-rose-50 text-rose-700 dark:border-rose-500/20 dark:bg-rose-500/10 dark:text-rose-200', default => 'border-gray-200 bg-gray-100 text-gray-700 dark:border-white/10 dark:bg-white/10 dark:text-gray-300', }; $environmentLabel = $tenant->environment && $tenant->environment !== 'managed_environment' ? strtoupper($tenant->environment) : null; @endphp @endforeach
@endif
@endif