{#if options.length > 1}
{#each options as [label, value, icon, selectedColor]}
{/each}
{/if} {#if disabled}
{:else}
x.value == initialPath)} class="grow shrink max-w-full" on:change={() => { dispatch('select', { path: scriptPath, itemKind }) }} on:input={(ev) => { if (!ev.detail) { dispatch('select', { path: undefined, itemKind }) } }} bind:justValue={scriptPath} {items} placeholder="Pick {itemKind === 'app' ? 'an' : 'a'} {itemKind}" inputStyles={SELECT_INPUT_DEFAULT_STYLE.inputStyles} containerStyles={darkMode ? SELECT_INPUT_DEFAULT_STYLE.containerStylesDark : SELECT_INPUT_DEFAULT_STYLE.containerStyles} portal={false} /> {/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}