{$i18n.t('Input Variables')}
{ submitHandler(); }} >
{#if !loading}
{#each Object.keys(variables) as variable, idx} {@const { type, ...variableAttributes } = variables[variable] ?? {}}
{variable} {#if variables[variable]?.required ?? false} *{$i18n.t('required')} {/if}
{#if variables[variable]?.type === 'select'} {@const options = variableAttributes?.options ?? []} {@const placeholder = variableAttributes?.placeholder ?? ''} {:else if variables[variable]?.type === 'checkbox'}
{:else if variables[variable]?.type === 'color'}
{ // Convert the color value to uppercase immediately variableValues[variable] = e.target.value.toUpperCase(); }} {...variableAttributes} />
{:else if variables[variable]?.type === 'date'} {:else if variables[variable]?.type === 'datetime-local'} {:else if variables[variable]?.type === 'email'} {:else if variables[variable]?.type === 'month'} {:else if variables[variable]?.type === 'number'} {:else if variables[variable]?.type === 'range'}
{:else if variables[variable]?.type === 'tel'} {:else if variables[variable]?.type === 'text'} {:else if variables[variable]?.type === 'time'} {:else if variables[variable]?.type === 'url'} {:else if variables[variable]?.type === 'map'}
{ variableValues[variable] = value; }} />
{:else}