<script lang="ts">
  import Root from 'bits-ui';
  import { cn, type WithoutChildren } from '$lib/utils/cn.svelte.js';

  let {
    ref = $bindable(null),
    class: className,
    ...restProps
  }: WithoutChildren<Root.Label.RootProps> = $props();
</script>

<Root.Label.Root
  bind:ref
  class={cn(
    'flex items-center gap-2 text-sm leading-none font-medium select-none',
    'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 group-data-[invalid]:text-destructive',
    className
  )}
  {...restProps}
/>