"use client"; import { Primitive } from "../../utils/Primitive"; import { type ElementRef, forwardRef, type ComponentPropsWithoutRef, } from "react"; import { useAuiState } from "@assistant-ui/store"; export namespace SuggestionPrimitiveDescription { export type Element = ElementRef; export type Props = ComponentPropsWithoutRef; } /** * Renders the description/label of the suggestion. * * @example * ```tsx * * ``` */ export const SuggestionPrimitiveDescription = forwardRef< SuggestionPrimitiveDescription.Element, SuggestionPrimitiveDescription.Props >((props, ref) => { const label = useAuiState((s) => s.suggestion.label); return ( {props.children ?? label} ); }); SuggestionPrimitiveDescription.displayName = "SuggestionPrimitive.Description";