{t('wallet.balance')}
{#if wallet && wallet.segments.length > 0} {#each wallet.segments as s (s.source)}
{sourceLabel(s.source)}
🪙 {s.chips}{#if !s.spendable}
({t('wallet.viewOnly')})
{/if}
{/each} {:else if !loading}
{t('wallet.noChips')}
{/if}
{t('wallet.benefits')}
{adsLine()}
{t('wallet.hints', { n: wallet?.hints ?? 0 })}
{t('wallet.store')}
{#each values as p (p.productId)}
{p.title}
🪙 {p.chips}
onBuy(p)}>{t('wallet.buy')}
{/each} {#if gpBuild}
{t('wallet.gpStub')}
{:else} {#each packs as p (p.productId)}
{p.title}
{formatAmount(p.moneyAmount, p.moneyCurrency)} {currencyLabel(p.moneyCurrency)}
{t('wallet.soon')}
{/each} {/if} {#if !loading && values.length === 0 && (gpBuild || packs.length === 0)}
{t('wallet.empty')}
{/if}
{#if warnProduct}
(warnProduct = null)}>
{t('wallet.warnBody')}
(warnProduct = null)}>{t('wallet.warnCancel')}
warnProduct && doBuy(warnProduct)} >{t('wallet.warnConfirm')}
{/if}