import * as SelectPrimitive from '@rn-primitives/select'; import * as React from 'react'; import { StyleSheet, View } from 'react-native'; import Animated, { FadeIn, FadeOut } from 'react-native-reanimated'; import { Check, ChevronDown, ChevronUp } from '~/components/ui/icons'; import { cn } from '~/lib/utils'; type Option = SelectPrimitive.Option; const Select = SelectPrimitive.Root; const SelectGroup = SelectPrimitive.Group; const SelectValue = SelectPrimitive.Value; const SelectTrigger = React.forwardRef( ({ className, children, ...props }, ref) => ( span]:line-clamp-1', props.disabled && 'opacity-50', className )} {...props} > {typeof children === 'function' ? children({ pressed: false }) : children} ) ); SelectTrigger.displayName = SelectPrimitive.Trigger.displayName; const SelectScrollUpButton = () => null; const SelectScrollDownButton = () => null; const SelectContent = React.forwardRef< SelectPrimitive.ContentRef, SelectPrimitive.ContentProps & { portalHost?: string } >(({ className, children, position = 'popper', portalHost, ...props }, ref) => { const { open } = SelectPrimitive.useRootContext(); return ( {children} ); }); SelectContent.displayName = SelectPrimitive.Content.displayName; const SelectLabel = React.forwardRef( ({ className, ...props }, ref) => ( ) ); SelectLabel.displayName = SelectPrimitive.Label.displayName; const SelectItem = React.forwardRef( ({ className, children, ...props }, ref) => ( ) ); SelectItem.displayName = SelectPrimitive.Item.displayName; const SelectSeparator = React.forwardRef< SelectPrimitive.SeparatorRef, SelectPrimitive.SeparatorProps >(({ className, ...props }, ref) => ( )); SelectSeparator.displayName = SelectPrimitive.Separator.displayName; export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type Option, };