import * as SelectPrimitive from '@radix-ui/react-select'
import { Check, ChevronDown } from 'lucide-react'
import { cn } from '@/lib/utils'
export const Select = SelectPrimitive.Root
export const SelectValue = SelectPrimitive.Value
export function SelectTrigger({ className, children, ...props }: SelectPrimitive.SelectTriggerProps) { return <SelectPrimitive.Trigger className={cn('flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring', className)} {...props}>{children}<SelectPrimitive.Icon><ChevronDown className="size-4 text-muted-foreground"/></SelectPrimitive.Icon></SelectPrimitive.Trigger> }
export function SelectContent({ className, children, ...props }: SelectPrimitive.SelectContentProps) { return <SelectPrimitive.Portal><SelectPrimitive.Content className={cn('z-50 overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg', className)} {...props}><SelectPrimitive.Viewport className="p-1">{children}</SelectPrimitive.Viewport></SelectPrimitive.Content></SelectPrimitive.Portal> }
export function SelectItem({ className, children, ...props }: SelectPrimitive.SelectItemProps) { return <SelectPrimitive.Item className={cn('relative flex cursor-default select-none items-center rounded-md py-2 pl-8 pr-3 text-sm outline-none focus:bg-accent', className)} {...props}><span className="absolute left-2"><SelectPrimitive.ItemIndicator><Check className="size-4"/></SelectPrimitive.ItemIndicator></span><SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText></SelectPrimitive.Item> }
