import React from 'react'; import { YStack, XStack } from '@tamagui/stacks'; import { Button } from '@tamagui/button'; import { SizableText as Text } from '@tamagui/text'; import { useGuestThemeVariant } from '../lib/guestTheme'; type FabAction = { key: string; label: string; icon: React.ReactNode; onPress?: () => void; }; type FabActionRingProps = { open: boolean; onOpenChange: (open: boolean) => void; actions: FabAction[]; }; const positions = [ { x: 0, y: -120 }, { x: -70, y: -100 }, { x: -120, y: -24 }, { x: -92, y: 52 }, ]; export default function FabActionRing({ open, onOpenChange, actions }: FabActionRingProps) { const { isDark } = useGuestThemeVariant(); const borderColor = isDark ? 'rgba(255,255,255,0.18)' : 'rgba(15, 23, 42, 0.12)'; const surfaceColor = isDark ? 'rgba(12, 16, 32, 0.92)' : 'rgba(255, 255, 255, 0.95)'; const textColor = isDark ? '#F8FAFF' : '#0F172A'; const shadow = isDark ? '0 16px 28px rgba(2, 6, 23, 0.55)' : '0 14px 24px rgba(15, 23, 42, 0.18)'; const ringActions = actions.slice(0, positions.length); if (!open) return null; return ( onOpenChange(false)} /> {ringActions.map((action, index) => { const offset = positions[index]; return ( {action.label} ); })} ); }