import * as SelectPrimitive from '@rn-primitives/select'; import * as React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; import Animated, { FadeIn, FadeOut } from 'react-native-reanimated'; import { Check } from '../../lib/icons/Check'; import { ChevronDown } from '../../lib/icons/ChevronDown'; import { ChevronUp } from '../../lib/icons/ChevronUp'; import { cn } from '../../lib/utils'; type Option = SelectPrimitive.Option; const Select = SelectPrimitive.Root; const SelectGroup = SelectPrimitive.Group; const SelectValue = SelectPrimitive.Value; function SelectTrigger({ ref, className, children, ...props }: SelectPrimitive.TriggerProps & { ref?: React.RefObject; children?: React.ReactNode; }) { return ( span]:line-clamp-1', props.disabled && 'web:cursor-not-allowed opacity-50', className, )} {...props} > {children} ); } /** * Platform: WEB ONLY */ function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpButtonProps) { if (Platform.OS !== 'web') { return null; } return ( ); } /** * Platform: WEB ONLY */ function SelectScrollDownButton({ className, ...props }: SelectPrimitive.ScrollDownButtonProps) { if (Platform.OS !== 'web') { return null; } return ( ); } function SelectContent({ className, children, position = 'popper', portalHost, ...props }: SelectPrimitive.ContentProps & { ref?: React.RefObject; className?: string; portalHost?: string; }) { const { open } = SelectPrimitive.useRootContext(); return ( {children} ); } function SelectLabel({ className, ...props }: SelectPrimitive.LabelProps & { ref?: React.RefObject; }) { return ( ); } function SelectItem({ className, ...props }: SelectPrimitive.ItemProps & { ref?: React.RefObject; }) { return ( ); } function SelectSeparator({ className, ...props }: SelectPrimitive.SeparatorProps & { ref?: React.RefObject; }) { return ( ); } export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, type Option, };