2023-06-18 00:44:57 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import type {ConfigMeta} from "./configMeta";
|
|
|
|
import SchemaBasedField from "./SchemaBasedField.svelte";
|
|
|
|
import EditLayerState from "./EditLayerState";
|
|
|
|
import SchemaBasedArray from "./SchemaBasedArray.svelte";
|
2023-06-21 17:13:09 +02:00
|
|
|
import SchemaBaseMultiType from "./SchemaBaseMultiType.svelte";
|
2023-06-22 15:07:14 +02:00
|
|
|
import RegisteredTagInput from "./RegisteredTagInput.svelte";
|
2023-06-18 00:44:57 +02:00
|
|
|
|
|
|
|
export let schema: ConfigMeta
|
|
|
|
export let state: EditLayerState
|
2023-06-21 17:13:09 +02:00
|
|
|
export let path: (string | number)[] = []
|
2023-06-18 00:44:57 +02:00
|
|
|
|
2023-06-22 15:07:14 +02:00
|
|
|
|
2023-06-18 00:44:57 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if schema.type === "array"}
|
|
|
|
<SchemaBasedArray {path} {state} {schema}/>
|
2023-06-22 15:07:14 +02:00
|
|
|
{:else if schema.hints.typehint === "tag"}
|
2023-06-23 16:14:43 +02:00
|
|
|
<RegisteredTagInput {state} {path} {schema}/>
|
2023-06-21 17:13:09 +02:00
|
|
|
{:else if schema.hints.types}
|
2023-06-22 15:07:14 +02:00
|
|
|
<SchemaBaseMultiType {path} {state} {schema}/>
|
2023-06-18 00:44:57 +02:00
|
|
|
{:else}
|
|
|
|
<SchemaBasedField {path} {state} {schema}/>
|
|
|
|
{/if}
|