<script lang="ts">
	import type { ComponentProps } from "svelte";
	import Item from "./Item.svelte";
	import PropertySuggest from "../suggesters/PropertySuggest.svelte";

	type Props = Omit<ComponentProps<typeof Item>, "control"> & {
		id: string;
		value?: string;
		accepts?: string[];
	};

	let {
		name,
		description,
		id,
		value = $bindable(),
		accepts,
	}: Props = $props();
</script>

<Item {name} {description}>
	{#snippet control()}
		<PropertySuggest {id} bind:value {accepts} />
	{/snippet}
</Item>
