{#if !loaded}{:else} {#if showForm} {#if error}
{error}
{/if}
form.icon = v} /> nameManuallyEdited = true} required placeholder={t('commandTracker.namePlaceholder')} class="flex-1 px-3 py-2 border border-[var(--color-border)] rounded-md text-sm bg-[var(--color-background)]" />
{t('commandTracker.provider')}
{t('commandTracker.commandConfig')}
{/if} {#if !showForm && allCmdTrackers.length > 0}
{#if !globalProviderFilter.id}
{/if}
{/if} {#if allCmdTrackers.length === 0 && !showForm} {:else if trackers.length === 0 && !showForm} {:else}
{#each trackers as trk}

{trk.name}

{trk.enabled ? t('commandTracker.enabled') : t('commandTracker.disabled')}
{#if trk.listener_count !== undefined} {trk.listener_count} {t('commandTracker.listeners').toLowerCase()} {/if}
editTracker(trk)} /> toggleEnabled(trk)} disabled={toggling[trk.id]} /> remove(trk)} variant="danger" />
{#if expandedTracker === trk.id}
{#if listenersLoading[trk.id]}

{t('common.loading')}

{:else if (listeners[trk.id] || []).length === 0}

{t('commandTracker.noListeners')}

{:else}
{#each listeners[trk.id] as listener}
{listener.listener_type}
removeListener(trk.id, listener.id)} variant="danger" />
{/each}
{/if}
{/if}
{/each}
{/if} {/if} confirmDelete?.onconfirm()} oncancel={() => confirmDelete = null} /> scopeEditor = null}> {#if scopeEditor}

{t('commandTracker.scopeDescription')}

{#if !scopeEditor.inherit} {#if scopeEditor.collections.length > 0}
{scopeEditor.selectedIds.length} / {scopeEditor.collections.length}
{/if}
{#if scopeEditor.collections.length === 0}

{t('commandTracker.noCollections')}

{:else} {#each scopeEditor.collections as col} {@const cid = col.id} {/each} {/if}
{/if}
{/if}