import React from 'react'; import { View, TouchableOpacity, Platform, StyleSheet, Image } from 'react-native'; import { MaterialCommunityIcons } from '@expo/vector-icons'; import { useNavigation, useRoute } from '@react-navigation/native'; import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; import type { RootStackParamList } from '../navigation/AppNavigator'; import { BlurView as ExpoBlurView } from 'expo-blur'; import { BlurView as CommunityBlurView } from '@react-native-community/blur'; import Constants, { ExecutionEnvironment } from 'expo-constants'; import { useTheme } from '../contexts/ThemeContext'; type NavigationProp = NativeStackNavigationProp; export const NuvioHeader = () => { const navigation = useNavigation(); const route = useRoute(); const { currentTheme } = useTheme(); // Only render the header if the current route is 'Home' if (route.name !== 'Home') { return null; } // Determine if running in Expo Go const isExpoGo = Constants.executionEnvironment === ExecutionEnvironment.StoreClient; return ( {Platform.OS === 'ios' ? ( ) : ( isExpoGo ? ( ) : ( ) )} navigation.navigate('Search')} > ); }; const styles = StyleSheet.create({ container: { position: 'absolute', top: 0, left: 0, right: 0, zIndex: 10, overflow: 'hidden', }, headerContainer: { height: Platform.OS === 'ios' ? 100 : 90, paddingTop: Platform.OS === 'ios' ? 35 : 35, backgroundColor: 'rgba(0,0,0,0.3)', }, blurOverlay: { ...StyleSheet.absoluteFillObject, zIndex: -1, }, androidBlurContainer: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, zIndex: -1, overflow: 'hidden', }, androidBlur: { flex: 1, backgroundColor: 'transparent', }, androidFallbackBlur: { backgroundColor: 'rgba(0,0,0,0.6)', }, contentContainer: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 24, height: '100%', }, logoContainer: { height: 70, width: 70, justifyContent: 'center', alignItems: 'flex-start', }, logo: { height: '100%', width: '100%', }, searchButton: { padding: 8, marginLeft: 'auto', }, iconWrapper: { width: 40, height: 40, borderRadius: 20, backgroundColor: 'rgba(255, 255, 255, 0.08)', alignItems: 'center', justifyContent: 'center', borderWidth: 1, borderColor: 'rgba(255, 255, 255, 0.1)', }, });