{ if (e.key === "Enter") addCustomActivity(); }} />
{#each categories as cat} {@const total = builtinCount(cat) + customCount(cat)} {@const disabled = disabledCount(cat)} {@const isExpanded = expandedCategory === cat} {/each}
{#each categories as cat} {@const isExpanded = expandedCategory === cat} {@const catBuiltins = breakActivities.filter((a) => a.category === cat)} {@const catCustoms = $config.custom_activities.filter((a) => a.category === cat)}
{#if catCustoms.length > 0}
Custom
{/if}
{#each catCustoms as activity (activity.id)}
{activity.text} toggleCustomEnabled(activity.id)} />
{/each} {#if catCustoms.length > 0 && catBuiltins.length > 0}
Built-in
{/if} {#each catBuiltins as activity (activity.text)}
{activity.text} toggleBuiltinEnabled(activity.text)} />
{/each}
{/each}