"use client" import { Button, buttonVariants } from "@/components/ui/button" import { cn } from "@/lib/utils" import { VariantProps } from "class-variance-authority" export type PromptSuggestionProps = { children: React.ReactNode variant?: VariantProps["variant"] size?: VariantProps["size"] className?: string highlight?: string } & React.ButtonHTMLAttributes function PromptSuggestion({ children, variant, size, className, highlight, ...props }: PromptSuggestionProps) { const isHighlightMode = highlight !== undefined && highlight.trim() !== "" const content = typeof children === "string" ? children : "" if (!isHighlightMode) { return ( ) } if (!content) { return ( ) } const trimmedHighlight = highlight.trim() const contentLower = content.toLowerCase() const highlightLower = trimmedHighlight.toLowerCase() const shouldHighlight = contentLower.includes(highlightLower) return ( ) } export { PromptSuggestion }