{#snippet toolCard(tool, missing)}
{tool.name} {#if tool.unavailable} unavailable {:else if missing} config required {/if}
{#if tool.unavailable && tool.unavailable_reason}

{tool.unavailable_reason}

{:else if tool.description}

{tool.description}

{/if}
{#each tool.input_types as t} {t} {/each}
{/snippet} {#if loading}
{:else if error}
{error}
{:else}
Profile (selectedInputType = val)} />
{#if tools.length === 0}

No tools registered.

{:else}
{#if active.length > 0}
Active {active.length}
{#each active as tool} {@render toolCard(tool, false)} {/each}
{/if} {#if activeMissing.length > 0}
Active - required config missing {activeMissing.length}
{#each activeMissing as tool} {@render toolCard(tool, true)} {/each}
{/if} {#if activeUnavail.length > 0}
Active - unavailable {activeUnavail.length}
{#each activeUnavail as tool} {@render toolCard(tool, false)} {/each}
{/if} {#if active.length + activeMissing.length + activeUnavail.length > 0 && inactive.length + inactiveMissing.length + inactiveUnavail.length > 0}
{/if} {#if inactive.length > 0}
Disabled {inactive.length}
{#each inactive as tool} {@render toolCard(tool, false)} {/each}
{/if} {#if inactiveMissing.length > 0}
Disabled - required config missing {inactiveMissing.length}
{#each inactiveMissing as tool} {@render toolCard(tool, true)} {/each}
{/if} {#if inactiveUnavail.length > 0}
Disabled - unavailable {inactiveUnavail.length}
{#each inactiveUnavail as tool} {@render toolCard(tool, false)} {/each}
{/if}
{/if} {/if}