import React from 'react'; import { useNavigator } from '@idealyst/navigation'; import { Pressable } from '../Pressable'; import type { LinkProps } from './types'; /** * Navigation component for routing to other screens within the application. * Integrates with the navigation system for seamless page transitions. */ const Link: React.FC = ({ to, vars, children, disabled = false, style, testID, accessibilityLabel, onPress, id, }) => { const navigator = useNavigator(); const handlePress = () => { if (disabled) return; onPress?.(); navigator.navigate({ path: to, vars }); }; return ( {children} ); }; export default Link;