@extends('layouts.public') @section('content') @php /** * @var array $user * @var int $total_points points held across every restaurant wallet * @var int $programs number of loyalty programs the customer earns with * @var int $claimable_now rewards already affordable right now * @var array|null $top_wallet highest-balance wallet (or null) */ $total_points = (int) ($total_points ?? 0); $programs = (int) ($programs ?? 0); $claimable_now = (int) ($claimable_now ?? 0); $top_wallet = $top_wallet ?? null; @endphp

{{ t_raw('account.perks_rewards_title') }}

@php /* The page's messages belong UNDER its title band, inside the page the reader is looking at — not floating above it. getFlashes() consumes, so the layout's own call further out finds nothing and does not draw it twice. */ @endphp
@partial('flash')
@partial('account-nav')
{{ t_raw('account.your_rewards_eyebrow') }}

{!! t_raw('account.points_summary_title', [':points' => '' . number_format($total_points) . '']) !!}

{{ t_raw('account.view_my_rewards_link') }}
{{ number_format($total_points) }} {{ t_raw('account.stat_points_across_programs') }}
{{ number_format($programs) }} {!! $programs === 1 ? t('account.stat_program_one') : t('account.stat_program_many') !!}
{{ number_format($claimable_now) }} {!! $claimable_now === 1 ? t('account.stat_reward_ready_one') : t('account.stat_reward_ready_many') !!}

@if ($programs > 0) {!! t_raw('account.earn_para_with_programs', [':link' => '' . e(t_raw('account.loyalty')) . '']) !!} @else {{ t_raw('account.earn_para_no_programs') }} @endif

@if ($programs > 0 && $top_wallet)

{{ t_raw('account.top_program_title') }}

{!! t_raw('account.top_program_balance_text', [':name' => '' . (($top_wallet['restaurant_name'] ?? '') !== '' ? e((string) $top_wallet['restaurant_name']) : t('account.a_restaurant_fallback')) . '']) !!} {{ t_raw('account.see_redeem_link') }}

@endif

{{ t_raw('account.how_rewards_work_title') }}

{{ t_raw('account.earning_automatic_lead') }}

{{ t_raw('account.earn_item1_title') }}

{{ t_raw('account.earn_item1_text') }}

{{ t_raw('account.earn_item2_title') }}

{{ t_raw('account.earn_item2_text') }}

{{ t_raw('account.earn_item3_title') }}

{{ t_raw('account.earn_item3_text') }}

{{ t_raw('account.go_to_rewards_btn') }}

{{ t_raw('account.get_more_title') }}

{{ t_raw('account.more_item1_title') }}

{{ t_raw('account.more_item1_text') }}

{{ t_raw('account.more_item2_title') }}

{{ t_raw('account.more_item2_text') }}

{{ t_raw('account.more_item3_title') }}

{{ t_raw('account.more_item3_text') }}

{{ t_raw('account.view_my_rewards_link') }}
@endsection