@php $eur = fn (int $cents) => Illuminate\Support\Number::currency($cents / 100, in: $currency, locale: app()->getLocale()); @endphp
{{ __('plans.back') }}

{{ $family->name }}

{{ __('plans.versions_subtitle') }}

@unless ($family->sales_enabled) {{-- The kill switch overrides every window, so say so once at the top rather than leaving each version to look live on its own. --}}
{{ __('plans.family_withdrawn_note') }}
@endunless
{{-- Versions --}}
@forelse ($versions as $version) @php // The window being open is not the same as the plan being // sold: the family's kill switch overrides every window. $windowOpen = $version->isAvailableAt($now); $live = $windowOpen && $family->sales_enabled; $scheduled = $version->isPublished() && $version->available_from->greaterThan($now); @endphp

{{ __('plans.version', ['n' => $version->version]) }}

@if ($live) {{ __('plans.badge_live') }} @elseif ($windowOpen) {{ __('plans.badge_withdrawn') }} @elseif ($scheduled) {{ __('plans.badge_scheduled') }} @elseif ($version->isPublished()) {{ __('plans.badge_closed') }} @else {{ __('plans.badge_draft') }} @endif

@if ($version->isPublished()) {{ __('plans.window', [ 'from' => $version->available_from->local()->isoFormat('L LT'), 'until' => $version->available_until?->local()->isoFormat('L LT') ?? __('plans.open_ended'), ]) }} @else {{ __('plans.draft_hint') }} @endif

@if (! $version->isPublished()) {{ __('plans.publish') }} {{ __('plans.discard') }} @elseif ($windowOpen) {{ __('plans.close_now') }} @endif
{{-- Publish form, inline under the draft it applies to --}} @if ($publishing === $version->uuid)

{{ __('plans.publish_warning') }}

{{ __('plans.cancel') }} {{ __('plans.publish_confirm') }}
@endif
@foreach ([ ['plans.f_storage', $version->quota_gb.' GB'], ['plans.f_traffic', $version->traffic_gb.' GB'], ['plans.f_seats', $version->seats], ['plans.f_performance', __('billing.perf.'.($version->performance ?? 'standard'))], ['plans.f_ram', $version->ram_mb.' MB'], ['plans.f_cores', $version->cores], ['plans.f_disk', $version->disk_gb.' GB'], ['plans.f_template', $version->template_vmid ?? '—'], ] as [$label, $value])
{{ __($label) }}
{{ $value }}
@endforeach
@foreach ($version->prices->sortBy('term') as $price) {{ __('plans.term_'.$price->term) }} {{ $eur($price->amount_cents) }} {{ __('plans.net') }} @endforeach
@if ($version->features)
@foreach ($version->features as $feature) {{ __('billing.feature.'.$feature) }} @endforeach
@endif
@empty

{{ __('plans.no_versions') }}

@endforelse
{{-- New draft --}}

{{ __('plans.draft_title') }}

{{ __('plans.draft_body') }}

{{-- A list, not free text: a typo here would be published, frozen, and shown to customers as a raw key. --}} @error('performance')

{{ $message }}

@enderror

{{ __('plans.infra') }}

{{ __('plans.pricing') }}

{{ __('plans.features') }}

@foreach ($featureKeys as $key)
@endforeach
{{ __('plans.draft_create') }}