"use client"; import type { LucideIcon } from "lucide-react"; import { Children, type ComponentProps } from "react"; import { Button } from "@/components/ui/button"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; import { cn } from "@/lib/utils"; const STAGGER_DELAY_MS = 60; const STAGGER_DELAY_MS_OFFSET = 250; export type SuggestionsProps = ComponentProps; export const Suggestions = ({ className, children, ...props }: SuggestionsProps) => (
{Children.map(children, (child, index) => child != null ? ( {child} ) : ( child ), )}
); export type SuggestionProps = Omit, "onClick"> & { suggestion: React.ReactNode; icon?: LucideIcon; onClick?: () => void; }; export const Suggestion = ({ suggestion, onClick, className, icon: Icon, variant = "outline", size = "sm", children, ...props }: SuggestionProps) => { const handleClick = () => { onClick?.(); }; return ( ); };