import * as MenubarPrimitive from '@rn-primitives/menubar'; import * as React from 'react'; import { Platform, Text, type TextProps, View } from 'react-native'; import { Check } from '@/lib/icons/Check'; import { ChevronDown } from '@/lib/icons/ChevronDown'; import { ChevronRight } from '@/lib/icons/ChevronRight'; import { ChevronUp } from '@/lib/icons/ChevronUp'; import { cn } from '@/lib/utils'; import { TextClassContext } from '@/components/ui/text'; const MenubarMenu = MenubarPrimitive.Menu; const MenubarGroup = MenubarPrimitive.Group; const MenubarPortal = MenubarPrimitive.Portal; const MenubarSub = MenubarPrimitive.Sub; const MenubarRadioGroup = MenubarPrimitive.RadioGroup; const Menubar = React.forwardRef( ({ className, ...props }, ref) => ( ) ); Menubar.displayName = MenubarPrimitive.Root.displayName; const MenubarTrigger = React.forwardRef( ({ className, ...props }, ref) => { const { value } = MenubarPrimitive.useRootContext(); const { value: itemValue } = MenubarPrimitive.useMenuContext(); return ( ); } ); MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName; const MenubarSubTrigger = React.forwardRef< MenubarPrimitive.SubTriggerRef, MenubarPrimitive.SubTriggerProps & { inset?: boolean; } >(({ className, inset, children, ...props }, ref) => { const { open } = MenubarPrimitive.useSubContext(); const Icon = Platform.OS === 'web' ? ChevronRight : open ? ChevronUp : ChevronDown; return ( <>{children} ); }); MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName; const MenubarSubContent = React.forwardRef< MenubarPrimitive.SubContentRef, MenubarPrimitive.SubContentProps >(({ className, ...props }, ref) => { const { open } = MenubarPrimitive.useSubContext(); return ( ); }); MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName; const MenubarContent = React.forwardRef< MenubarPrimitive.ContentRef, MenubarPrimitive.ContentProps & { portalHost?: string } >(({ className, portalHost, ...props }, ref) => { const { value } = MenubarPrimitive.useRootContext(); const { value: itemValue } = MenubarPrimitive.useMenuContext(); return ( ); }); MenubarContent.displayName = MenubarPrimitive.Content.displayName; const MenubarItem = React.forwardRef< MenubarPrimitive.ItemRef, MenubarPrimitive.ItemProps & { inset?: boolean; } >(({ className, inset, ...props }, ref) => ( )); MenubarItem.displayName = MenubarPrimitive.Item.displayName; const MenubarCheckboxItem = React.forwardRef< MenubarPrimitive.CheckboxItemRef, MenubarPrimitive.CheckboxItemProps >(({ className, children, checked, ...props }, ref) => ( <>{children} )); MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName; const MenubarRadioItem = React.forwardRef< MenubarPrimitive.RadioItemRef, MenubarPrimitive.RadioItemProps >(({ className, children, ...props }, ref) => ( <>{children} )); MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName; const MenubarLabel = React.forwardRef< MenubarPrimitive.LabelRef, MenubarPrimitive.LabelProps & { inset?: boolean; } >(({ className, inset, ...props }, ref) => ( )); MenubarLabel.displayName = MenubarPrimitive.Label.displayName; const MenubarSeparator = React.forwardRef< MenubarPrimitive.SeparatorRef, MenubarPrimitive.SeparatorProps >(({ className, ...props }, ref) => ( )); MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName; const MenubarShortcut = ({ className, ...props }: TextProps) => { return ( ); }; MenubarShortcut.displayName = 'MenubarShortcut'; export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };