{#if searches.length === 0}
No searches yet. Run one above.
{:else}
{#each searches as s (s.id)}
{#each [INPUT_TYPE_ICON[s.input_type] ?? FileText] as Icon}
{/each}
{s.target}
{s.input_type}
{#if s.profile}
{s.profile}
{/if}
ยท {fmtDate(s.started_at)}
{#if s.status !== "running"} {@const total = (s.planned_tools ?? []).reduce((sum, t) => sum + (t.result_count ?? 0), 0)} {#if total > 0}
{total} result{total !== 1 ? "s" : ""}
{/if} {/if}
{#if s.status === "running"}
{/if} {s.status}
{ e.preventDefault(); onDelete(s.id); }} title="Delete" >
{/each}
{/if}