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