{t('payment_details', lang)}

{#if loading}
{t('loading_payments', lang)}
{:else if error}
{t('error_prefix', lang)}: {error}
{:else if payment}
{getCategoryEmoji(payment.category || 'groceries')}

{payment.title}

{formatCurrency(payment.amount)}
{#if payment.image}
{t('receipt',
{/if}
{t('date', lang)} {formatDate(payment.date)}
{t('paid_by_label', lang)} {payment.paidBy}
{t('created_by', lang)} {payment.createdBy}
{t('category_label', lang)} {paymentCategoryName(payment.category || 'groceries', lang)}
{t('split_method_label', lang)} {getSplitDescription(payment)}
{#if payment.description}

{t('description', lang)}

{payment.description}

{/if}
{#if payment.splits && payment.splits.length > 0}

{t('split_details', lang)}

{#each payment.splits as split}
0}> {#if split.amount > 0} {t('owes', lang)} {formatCurrency(split.amount)} {:else if split.amount < 0} {t('owed', lang)} {formatCurrency(split.amount)} {:else} {t('even', lang)} {/if}
{/each}
{/if}
{/if}
{#if payment} {/if}