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

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

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

<BitsTooltip.Trigger class="tooltip tooltip-primary" {...restProps}>
  {@render children?.()}
</BitsTooltip.Trigger>
