"use client" import { AnimatePresence, motion } from "motion/react" import { BrainIcon, ZapIcon } from "lucide-react" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" import { reasoningOptions, type ReasoningEffort } from "@/lib/models" interface ReasoningSelectorProps { value: ReasoningEffort onChange: (value: ReasoningEffort) => void variant?: "pill" | "icon" disabled?: boolean dropdownDirection?: "up" | "down" } const iconVariants = { initial: (toThinking: boolean) => ({ y: toThinking ? "-110%" : "110%", opacity: 0, }), animate: { y: "0%", opacity: 1 }, exit: (toThinking: boolean) => ({ y: toThinking ? "110%" : "-110%", opacity: 0, }), } export function ReasoningSelector({ value, onChange, disabled = false, }: ReasoningSelectorProps) { const toThinking = value === "thinking" const Icon = toThinking ? BrainIcon : ZapIcon const selectedLabel = reasoningOptions.find((option) => option.id === value)?.label ?? "Reasoning" const nextValue: ReasoningEffort = toThinking ? "instant" : "thinking" return ( ) }