{#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 }) }} on:input={(ev) => { if (!ev.detail) { dispatch('select', { path: undefined }) } }} bind:justValue={scriptPath} {items} placeholder="Pick 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'}
edit
{ drawerFlowViewer.openDrawer() }} > view
{:else}
edit
{ const { language, content } = await getScriptByPath(scriptPath ?? '') code = content lang = language drawerViewer.openDrawer() }} > view
{/if} {/if}