<script lang="ts">
	import { Input } from '$lib/components/ui/input';
	import { Label } from '$lib/components/ui/label';
	import type { LineDescriptions } from '$lib/api/dashboard/a76/items';

	let { descriptions = $bindable() }: { descriptions: LineDescriptions } = $props();
</script>

<fieldset class="border rounded-md p-3 space-y-3">
	<legend class="text-xs font-semibold px-2 uppercase">Labeling</legend>
	
	<div class="grid grid-cols-2 gap-4">
		<div class="space-y-2">
			<Label for="numero_etiqueta" class="text-xs">Label Number:</Label>
			<Input id="numero_etiqueta" bind:value={descriptions.lot} class="h-8 text-sm" />
		</div>
		<div class="space-y-2">
			<Label for="tipo_etiqueta" class="text-xs">Label Type:</Label>
			<Input id="tipo_etiqueta" bind:value={descriptions.entry_number} class="h-8 text-sm" />
		</div>
	</div>

	<div class="space-y-2">
		<Label for="observaciones_etiqueta" class="text-xs">Observations:</Label>
		<textarea 
			id="observaciones_etiqueta"
			bind:value={descriptions.additional_info_spanish}
			class="flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
			placeholder="Labeling observations..."
		></textarea>
	</div>
</fieldset>
