import { Button } from "@/components/ui/button" import { Command, CommandInput, CommandList, CommandItem } from "@/components/ui/command" import { FormField, FormItem, FormLabel, FormControl } from "@/components/ui/form" import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover" import { useState } from "react" import { ScrollArea } from "@/components/ui/scroll-area" import { CheckIcon, ChevronDownIcon } from "lucide-react" import { useFormContext } from "react-hook-form" import { LinkFormValues } from "../manage" import { cn } from "@/lib/utils" const TOPICS = [ { id: "1", name: "Work" }, { id: "2", name: "Personal" } ] export const TopicSelector: React.FC = () => { const form = useFormContext() const [open, setOpen] = useState(false) const { setValue } = useFormContext() return ( ( Topic {TOPICS.map(topic => ( { setValue("topic", value) setOpen(false) }} > {topic.name} ))} )} /> ) }