{#if componentLibrary} {#each $store.builtins.concat(componentLibrary.components) as component}
onComponentChosen(component.name)}>
{splitName(component.name).componentName}
{#if (component.presets || templatesByComponent[component.name]) && component.name === selectedComponent}
    {#if component.presets} {splitName(component.name).componentName} Presets {#each Object.keys(component.presets) as preset}
  • onComponentChosen(component.name, preset)}> {preset}
  • {/each} {/if} {#if templatesByComponent[component.name]} {splitName(component.name).componentName} Templates {#each templatesByComponent[component.name] as template}
  • onTemplateChosen(template)}> {template.description}
  • {/each} {/if}
{/if}
{#if component.presets || templatesByComponent[component.name]} {/if}
{/each} {/if}
selectedComponent = null} onOk={onTemplateInstanceChosen}> {#each templateInstances.map(i => i.name) as instance}
{/each}