@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 --}}
@error('availableFrom') @if ($publishing === null) {{-- A refused row action has no form of its own to report into: with the publish form closed, the message would otherwise land in an error bag nothing renders, and the button would look like it had simply done nothing. --}}
{{ $message }}
@endif @enderror @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') }} @else @if ($windowOpen) {{ __('plans.close_now') }} @endif {{-- Every published version with an end date can go back on open-ended sale, whether that end is already past or still ahead. Closing used to be one-way. --}} @if ($version->available_until !== null) {{ __('plans.reopen') }} @endif @endif
{{-- Publish form, inline under the draft it applies to --}} @if ($publishing === $version->uuid)

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

@if ($handover !== null) {{-- Publishing here ends another version's sale, so say which one and when, before the button is pressed rather than in the list after. --}}

{{ __('plans.handover_note', ['version' => $handover['version'], 'at' => $handover['at']]) }}

@endif
{{ __('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') }}

{{-- Free months, not a second price. The yearly total is derived from the two, which is the only arrangement in which "2 Monate gratis" on the website and the amount Stripe charges cannot drift apart. --}}
{{-- What that comes to, before it is written. Live, from the same arithmetic the draft uses. --}} @if ($yearlyPreview !== null)

{{ __('plans.yearly_preview', [ 'total' => $eur($yearlyPreview), 'months' => 12 - max(0, min(12, $freeMonths)), ]) }} @if ($freeMonths > 0) · {{ trans_choice('plans.free_months_note', $freeMonths, ['count' => $freeMonths]) }} @endif

@endif

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

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