Files
{#if !readOnly}
fileInput.click()} title="Upload file" class="p-1 rounded hover:bg-gray-100 dark:hover:bg-white/10 text-gray-600 dark:text-gray-300">
{ const t = e.target as HTMLInputElement; if (t.files) onUpload(t.files); t.value = ''; }} />
{/if}
{#each files as file (file.id)}
onSelect(file)}>
{file.path}
{#if file.path === entrypoint}
{/if}
{#if !readOnly}
{#if file.kind === 'text' && file.path.toLowerCase().endsWith('.typ') && file.path !== entrypoint}
onSetEntry(file)} title="Set as entrypoint" class="p-0.5 rounded hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500">
{/if}
handleRename(file)} title="Rename" class="p-0.5 rounded hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500">
onDelete(file)} title="Delete" class="p-0.5 rounded hover:bg-red-100 dark:hover:bg-red-900/30 text-gray-500 hover:text-red-600">
{/if}
{/each}