{#if drag && x && y}
{chat.title}
{/if}
{#if confirmEdit}
{:else}
{ dispatch('select'); if ($mobile) { showSidebar.set(false); } }} on:dblclick={() => { chatTitle = chat.title; confirmEdit = true; }} on:mouseenter={(e) => { mouseOver = true; }} on:mouseleave={(e) => { mouseOver = false; }} on:focus={(e) => {}} draggable="false" >
{chat.title}
{/if}
{ mouseOver = true; }} on:mouseleave={(e) => { mouseOver = false; }} > {#if confirmEdit}
{ editChatTitle(chat.id, chatTitle); confirmEdit = false; chatTitle = ''; }} >
{ confirmEdit = false; chatTitle = ''; }} >
{:else if shiftKey && mouseOver}
{ archiveChatHandler(chat.id); }} type="button" >
{ dispatch('delete', 'shift'); }} type="button" >
{:else}
{ cloneChatHandler(chat.id); }} shareHandler={() => { showShareChatModal = true; }} archiveChatHandler={() => { archiveChatHandler(chat.id); }} renameHandler={() => { chatTitle = chat.title; confirmEdit = true; }} deleteHandler={() => { dispatch('delete'); }} onClose={() => { dispatch('unselect'); }} on:change={async () => { await pinnedChats.set(await getPinnedChatList(localStorage.token)); }} on:tag={(e) => { dispatch('tag', e.detail); }} >
{ dispatch('select'); }} >
{#if chat.id === $chatId}
{ dispatch('delete'); }} >
{/if}
{/if}