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