{ submitHandler(); dispatch('save'); }} >
{$i18n.t('Manage Valves')}
{$i18n.t('Tools')}
{$i18n.t('Functions')}
{ await tick(); }} > {#if tab === 'tools'}
{$i18n.t('Select a tool')}
{#each $tools as tool, toolIdx}
{tool.name}
{/each} {:else if tab === 'functions'}
{$i18n.t('Select a function')}
{#each $functions as func, funcIdx}
{func.name}
{/each} {/if}
{#if selectedId}
{#if !loading} {#if valvesSpec} {#each Object.keys(valvesSpec.properties) as property, idx}
{valvesSpec.properties[property].title} {#if (valvesSpec?.required ?? []).includes(property)}
*required
{/if}
{ valves[property] = (valves[property] ?? null) === null ? '' : null; }} > {#if (valves[property] ?? null) === null}
{#if (valvesSpec?.required ?? []).includes(property)} {$i18n.t('None')} {:else} {$i18n.t('Default')} {/if}
{:else}
{$i18n.t('Custom')}
{/if}
{#if (valves[property] ?? null) !== null}
{/if}
{/each} {:else}
No valves
{/if} {:else}
{/if}
{/if}
{$i18n.t('Save')}