import { FormControl } from "@workspace/ui/components/form"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@workspace/ui/components/select"; import { cn } from "@workspace/ui/lib/utils"; import { Loader } from "lucide-react"; import type { ReactNode } from "react"; type SelectDropdownProps = { onValueChange?: (value: string) => void; defaultValue: string | undefined; placeholder?: string; isPending?: boolean; items: { label: string | ReactNode; value: string }[] | undefined; disabled?: boolean; className?: string; isControlled?: boolean; }; export function SelectDropdown({ defaultValue, onValueChange, isPending, items, placeholder, disabled, className = "", isControlled = false, }: SelectDropdownProps) { const defaultState = isControlled ? { value: defaultValue, onValueChange } : { defaultValue, onValueChange }; return ( ); }