{ deleteHandler(); }} >
{@html DOMPurify.sanitize( $i18n.t('This will delete {{NAME}} and all its contents.', { NAME: folders[folderId].name }) )}
{#if dragged && x && y}
{folders[folderId].name}
{/if}
{#if draggedOver}
{/if} { dispatch('open', e.detail); }} >
{#if (folders[folderId]?.childrenIds ?? []).length > 0 || (folders[folderId].items?.chats ?? []).length > 0}
{#if folders[folderId]?.childrenIds} {@const children = folders[folderId]?.childrenIds .map((id) => folders[id]) .sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' }) )} {#each children as childFolder (`${folderId}-${childFolder.id}`)} { dispatch('import', e.detail); }} on:update={(e) => { dispatch('update', e.detail); }} on:change={(e) => { dispatch('change', e.detail); }} /> {/each} {/if} {#if folders[folderId].items?.chats} {#each folders[folderId].items.chats as chat (chat.id)} { dispatch('change', e.detail); }} /> {/each} {/if}
{/if}