<script setup>
import { cn } from "../../../utils/cn";
import { Label } from "../label";
const props = defineProps({
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true }
});
</script>

<template>
  <Label
    data-slot="field-label"
    :class="cn(
  'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:text-zinc-600 group-data-[disabled=true]/field:opacity-100',
  'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',
  'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary',
  props.class
)"
  >
    <template #default>
      <slot />
    </template>
    <template
      v-if="$slots.tooltip"
      #tooltip
    >
      <slot name="tooltip" />
    </template>
  </Label>
</template>
