<script lang="ts">
  import { Tooltip as BitsTooltip, type WithoutChildren } from 'bits-ui';
  import type { Snippet } from 'svelte';

  type Props = WithoutChildren<BitsTooltip.RootProps> & {
    children?: Snippet;
  };

  let { children, ...restProps }: Props = $props();
</script>

<BitsTooltip.Provider delayDuration={0}>
  <BitsTooltip.Root {...restProps}>
    {@render children?.()}
  </BitsTooltip.Root>
</BitsTooltip.Provider>
