{#if fileLoading}
{:else if fileImageUrl !== null}
{:else if filePdfData !== null}
{:else if fileContent !== null}
{#if isMarkdown && !showRaw}
{@html renderedHtml}
{:else if isCsv && !showRaw && csvRows.length > 0}
| # |
{#each csvHeader as cell}
{cell} |
{/each}
{#each csvBody as row, i}
| {i + 1} |
{#each row as cell}
{cell} |
{/each}
{#each Array(Math.max(0, csvHeader.length - row.length)) as _}
|
{/each}
{/each}
{:else if editing}
{:else}
{fileContent}
{/if}
{:else}
{$i18n.t('Could not read file.')}
{/if}