{:else if (type == 'string' && format != 'date-time') || ['number', 'object'].includes(type ?? '')}
{
seeEditable = !seeEditable
}}
>
Customize
{#if seeEditable}
{#if type == 'string' && format != 'date-time'}
{:else if type == 'number'}
{:else if type == 'object'}
{/if}
{/if}
{#if inputCat == 'number'}
{#if extra['min'] != undefined && extra['max'] != undefined}
{extra['min']}
{extra['max']}
{value}
{:else if extra['seconds'] !== undefined}
{:else}
{/if}
{:else if inputCat == 'boolean'}
{
e?.stopPropagation()
}}
{disabled}
class={valid
? ''
: 'border border-red-700 border-opacity-30 focus:border-red-700 focus:border-opacity-30 bg-red-100'}
bind:checked={value}
/>
{#if type == 'boolean' && value == undefined}
Not set
{/if}
{:else if inputCat == 'list'}
{#if Array.isArray(itemsType?.multiselect)}
{:else}
{/if}
{:else if inputCat == 'resource-object' && resourceTypes == undefined}
Loading resource types...
{:else if inputCat == 'resource-object' && (resourceTypes == undefined || (format.split('-').length > 1 && resourceTypes.includes(format.substring('resource-'.length))))}
{:else if inputCat == 'object' || inputCat == 'resource-object'}
{#if properties && Object.keys(properties).length > 0}
{:else if disabled}
{:else}
{
dispatch('focus')
}}
code={rawValue}
bind:value
/>
{/if}
{:else if inputCat == 'enum'}
{:else if inputCat == 'date'}
{:else if inputCat == 'sql' || inputCat == 'yaml'}
{
dispatch('focus')
}}
bind:this={editor}
lang={inputCat}
bind:code={value}
autoHeight
/>
{:else if inputCat == 'base64'}
fileChanged(x, (val) => (value = val))}
multiple={false}
/>
{:else if inputCat == 'resource-string'}
1
? format.substring('resource-'.length)
: undefined}
{showSchemaExplorer}
/>
{:else if inputCat == 'string'}
{#if variableEditor}
{#if value && typeof value == 'string' && value?.startsWith('$var:')}
Linked to variable
{/if}
{/if}
{/if}
{#if disabled || error === ''}
{:else}
{error}
{/if}