"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 ( ) } // Türkçe yerel küçültme: "İ" → "i" tek harf kalır, vurgu dizini kaymaz. const trimmedHighlight = highlight.trim() const contentLower = content.toLocaleLowerCase("tr") const highlightLower = trimmedHighlight.toLocaleLowerCase("tr") const index = contentLower.indexOf(highlightLower) const bitis = index + highlightLower.length return ( ) } export { PromptSuggestion }