{{ __('Overview') }} @can('edit restaurants') {{ __('Edit') }} @endcan
{{ __('Balance') }}

{{ __('Commission is taken from here on every delivered order. A restaurant whose balance reaches zero is switched off.') }}

{{ __('Access') }}
{{-- no Activate/Renew link here: the form for it is the next card --}}
@can('activate restaurants') @unless ($activating) {{ __('Record payment') }} @endunless @if ($activating)
{{ __('Record payment') }} {{ __('Recording…') }} {{ __('Cancel') }}
@else

{{ __('Writes three things in one go: the access switch, a subscription row for the period bought, and a credit on the wallet.') }}

@endif
@endcan @can('manage restaurant wallet')
{{ __('Top up') }}
@if ((float) ($restaurant->wallet?->balance ?? 0) > 0)
{{ __('Forfeit the balance') }}
@endif
@endcan
@forelse ($transactions ?? [] as $transaction) {{ $transaction->created_at?->format('d M Y, H:i') }} {{ str_replace('_', ' ', $transaction->reason?->value ?? '') }} @if ($transaction->order_id)
{{ __('order #:id', ['id' => $transaction->order_id]) }}
@endif
@php($isCredit = $transaction->type === \App\Enums\TransactionEnum::CREDIT) {{ $isCredit ? '+' : '−' }}{{ number_format((float) $transaction->amount, 2) }}
@empty {{ __('Nothing has moved through this wallet yet.') }} @endforelse
@if ($transactions && $transactions->hasPages())
{{ $transactions->links() }}
@endif
@forelse ($subscriptions as $subscription) {{ $subscription->from_date?->toDateString() }} → {{ $subscription->to_date?->toDateString() }} @if ($subscription->from_date?->lte(now()) && $subscription->to_date?->gte(now()->startOfDay())) {{ __('current') }} @endif {{ $subscription->user?->name ?? '—' }} @empty {{ __('This restaurant has never been activated.') }} @endforelse