<script lang="ts">
  import { cn, type WithElementRef } from "$lib/utils.js";
  import type { HTMLAttributes } from "svelte/elements";

  let {
    ref = $bindable(null),
    class: className,
    children,
    ...restProps
  }: WithElementRef<HTMLAttributes<HTMLParagraphElement>> = $props();
</script>

<p
  bind:this={ref}
  data-slot="item-description"
  class={cn(
    "text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
    "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
    className
  )}
  {...restProps}
>
  {@render children?.()}
</p>
