{#if testMenuOpen}
{ if (e.key === 'Escape') onclose(); }}>
{#each testTypes as tt} {@const busy = !!ttTesting[`${testMenuOpen}_${tt.key}`]} {@const blocked = !!tt.disabledReason}
{ if (!blocked) ontest(Number(testMenuOpen), tt.key); }} disabled={busy || blocked} title={blocked ? t(tt.disabledReason!) : ''} class="flex items-center gap-2 w-full px-3 py-1.5 text-sm rounded hover:bg-[var(--color-muted)] transition-colors disabled:opacity-50 text-left">
{t(tt.labelKey)} {#if blocked}
{/if} {#if busy}
...
{/if}
{#if blocked}
{t(tt.disabledReason!)}
{/if} {/each}
{/if}