{#if $user?.role === 'admin'}
{/if}
{#if !($settings.saveChatHistory ?? true)}
Chat History is off for this browser.
When history is turned off, new chats on this browser won't appear in your history on any of your devices. This setting does not sync across browsers or devices.
{/if}
{#each $chats.filter((chat) => { if (search === '') { return true; } else { let title = chat.title.toLowerCase(); if (title.includes(search)) { return true; } else { return false; } } }) as chat, i}
{#if chat.id === $chatId}
{#if chatTitleEditId === chat.id}
{:else if chatDeleteId === chat.id}
{:else}
{/if}
{/if}
{/each}

{#if $user !== undefined} {#if showDropdown} {/if} {:else} {/if}