<script lang="ts">
	import type { State } from "$lib/models/device";
	import type { ColorRGB } from '$lib/models/color';
	import BFormLine from "../bforms/BFormLine.svelte";
	import BFormTemperatureOption from "../bforms/BFormTemperatureOption.svelte";
	import BFormColorOption from "../bforms/BFormColorOption.svelte";
	import BFormIntensityOption from "../bforms/BFormIntensityOption.svelte";
	import BFormPowerOption from "../bforms/BFormPowerOption.svelte";
	import BFormDeleteOption from "../bforms/BFormDeleteOption.svelte";

  export let value: State;
  export let deletable: boolean = false;

  $: console.log(value);
</script>

<BFormLine>
  <BFormPowerOption bind:value={value.power} />
  <BFormIntensityOption bind:value={value.intensity} />
  <BFormColorOption bind:value={value.color} />
  <BFormTemperatureOption bind:value={value.temperature} />
  {#if deletable}
    <BFormDeleteOption on:delete />
  {/if}
</BFormLine>
