{#if !$userStore?.operator}
changeStep(e.detail.index + 1)} disabled={pathError != ''} >
/
{ await changeStep(1) setTimeout(() => pathC?.focus(), 100) }} > {script.path}
{ await changeStep(1) setTimeout(() => summaryC?.focus(), 100) }} >
{script.summary == '' || !script.summary ? 'No summary' : script.summary}
changeStep(step - 1)} > Back
changeStep(step + 1)} > Next {#if step == 1}
Enter
{/if}
editScript(false)} >
Save
editScript(true)}>Save and exit
{#if initialPath != ''}
{ window.open(`/scripts/add?template=${initialPath}`) }}>Fork
{/if}
{#if step === 1}
changeStep(2)} namePlaceholder="script" kind="script" />
{#if lockedLanguage}
As a forked script, the language '{script.language}' cannot be modified.
{/if}
{#each langs as [label, lang]} {@const isPicked = script.language == lang && template == 'script'}
{ script.language = lang template = 'script' initContent(lang, script.kind, template) }} disabled={lockedLanguage} >
{label}
{/each}
{ script.language = Script.language.DENO template = 'pgsql' initContent(script.language, script.kind, template) }} >
PostgreSQL
{#each scriptKindOptions as { value, title, desc }} {@const isPicked = script.kind === value}
{ template = 'script' script.kind = value initContent(script.language, value, template) }} disabled={lockedLanguage} > {title} {#if desc}
{desc}
{/if}
{/each}
{:else if step === 2}
{:else if step === 3}
{/if}
{:else} Script Builder not available to operators {/if}