{#if options.length > 1}
{ scriptPath = '' }} > {#snippet children({ item })} {#each options as [label, value, icon, selectedColor]}
{/each} {/snippet}
{/if} {#if disabled}
{:else}
scriptPath ?? initialPath, (path) => { scriptPath = path dispatch('select', { path, itemKind }) } } class="grow shrink max-w-full" {items} placeholder="Pick {itemKind === 'app' ? 'an' : 'a'} {itemKind}" /> {/if} {#if allowRefresh}
{/if} {#if scriptPath !== undefined && scriptPath !== ''} {#if itemKind == 'flow'}
{#if allowEdit}
Edit
{/if} {#if allowView}
{ drawerFlowViewer?.openDrawer() }} > View
{/if}
{:else if itemKind == 'app'}
{#if allowEdit}
Edit
{/if} {#if allowView}
View
{/if}
{:else}
{#if allowEdit}
Edit
{/if} {#if allowView}
{ const { language, content } = await getScriptByPath(scriptPath ?? '') code = content lang = language drawerViewer?.openDrawer() }} > View
{/if}
{/if} {/if}