{#each _chats as chat, i}
{#if chat.id === selectedChatId}
{#if chatTitleEditIdx === chat.id}
{:else}
{/if}
{/if}
{/each}