{#if editingFileId === (file?.id ?? file?.tempId)}
{
if (e.key === 'Enter') submitRename();
if (e.key === 'Escape') cancelRename();
if (e.key === ' ') e.stopPropagation();
}}
on:keyup={(e) => {
if (e.key === ' ') e.stopPropagation();
}}
on:blur={submitRename}
on:click={(e) => e.stopPropagation()}
autofocus
/>
{:else}
{file?.name ?? file?.meta?.name}
{#if file?.meta?.size}
{formatFileSize(file?.meta?.size)}
{/if}
{/if}