{#if loading}
{:else}
{#if activeTab === 'themes'}
{#if searchTerm === ''}
{/if}
{#if displayTheme}
{
if (displayTheme) {
await themeManager.downloadTheme(displayTheme);
await themeManager.setTheme(displayTheme.id);
themeUpdates.triggerUpdate();
await fetchCurrentThemes();
}
}}
onRemove={async () => {
if (displayTheme?.id) {
console.debug('deleting theme', displayTheme.id);
await themeManager.deleteTheme(displayTheme.id);
themeUpdates.triggerUpdate();
await fetchCurrentThemes();
}
}}
/>
{/if}
{:else if activeTab === 'backgrounds'}
{/if}
{/if}