{#if valvesSpec && Object.keys(valvesSpec?.properties ?? {}).length} {#each Object.keys(valvesSpec.properties) as property, idx}
{valvesSpec.properties[property].title} {#if (valvesSpec?.required ?? []).includes(property)} *required {/if}
{#if (valves[property] ?? null) !== null}
{#if valvesSpec.properties[property]?.enum ?? null} {:else if (valvesSpec.properties[property]?.type ?? null) === 'boolean'}
{valves[property] ? 'Enabled' : 'Disabled'}
{ dispatch('change'); }} />
{:else} { dispatch('change'); }} /> {/if}
{/if} {#if (valvesSpec.properties[property]?.description ?? null) !== null}
{valvesSpec.properties[property].description}
{/if}
{/each} {:else}
No valves
{/if}