{#if loading && !gitStatus}
{:else if error && !gitStatus}

{$t('git.unableToLoadChanges')}

{error}

{:else if !gitStatus?.is_repo}

{$t('git.notARepo')}

{:else}
{gitStatus.branch || 'HEAD'} {#if gitStatus.upstream} {gitStatus.upstream} {/if} {#if gitStatus.ahead > 0} +{gitStatus.ahead} {/if} {#if gitStatus.behind > 0} -{gitStatus.behind} {/if} {#if totalChanges > 0} {$t('git.changedCount', { count: totalChanges })} {/if}
{#if totalChanges > 0}
{$t('git.uncommittedChanges')} {$t('git.change', { count: totalChanges })}
{/if}
{#if totalChanges === 0}

{$t('git.noFileChangesYet')}

{$t('git.projectChangesHint')}

{:else}
{#each reviewFiles as file (file.key)} {@const parts = pathParts(file.path)} {@const meta = statusMeta(file.status)}
{#if file.expanded}
{#if file.diffFiles.some((diffFile) => diffFile.hunks.length > 0)} {#each file.diffFiles as diffFile} {#if file.diffFiles.length > 1}
{diffFile.path}
{/if} {#each diffFile.hunks as hunk}
{hunk.header}
{#each groupLines(numberedLines(hunk)) as group}
{#each group.lines as line}
{line.oldNumber ?? ''} {line.newNumber ?? ''} {linePrefix(line.type)} {line.content || ' '}
{/each}
{/each} {/each} {/each} {:else}
{$t('git.noTextualDiff')}
{/if}
{/if}
{/each}
{/if}
{/if}