0} class:enhanced={shouldShowIntegratedView}> {#if loading}

Your Balance

Loading...
{:else if error}

Your Balance

Error: {error}
{:else if shouldShowIntegratedView}

Your Balance

{#if balance.netBalance < 0} +{formatCurrency(balance.netBalance)} You are owed {:else if balance.netBalance > 0} -{formatCurrency(balance.netBalance)} You owe {:else} CHF 0.00 You're all even {/if}
{#if singleDebtUser && singleDebtUser.user} {:else}
Debug: No singleDebtUser data
{/if}
{#if singleDebtUser && singleDebtUser.user && singleDebtUser.user.transactions} {singleDebtUser.user.transactions.length} transaction{singleDebtUser.user.transactions.length !== 1 ? 's' : ''} {/if}
{:else}

Your Balance

{#if balance.netBalance < 0} +{formatCurrency(balance.netBalance)} You are owed {:else if balance.netBalance > 0} -{formatCurrency(balance.netBalance)} You owe {:else} CHF 0.00 You're all even {/if}
{/if}