import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; interface BottomTabBarProps { activeTab: 'people' | 'topics' | 'companies'; onTabChange: (tab: 'people' | 'topics' | 'companies') => void; showBackButton?: boolean; onBack?: () => void; } export default function BottomTabBar({ activeTab, onTabChange, showBackButton, onBack }: BottomTabBarProps) { const tabs = [ { id: 'people' as const, label: 'People', icon: 'person-outline' as const }, { id: 'topics' as const, label: 'Topics', icon: 'newspaper-outline' as const }, { id: 'companies' as const, label: 'Companies', icon: 'business-outline' as const }, ]; return ( {showBackButton && onBack ? ( Back ) : null} {tabs.map((tab) => ( onTabChange(tab.id)} activeOpacity={0.7} > {tab.label} ))} ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', backgroundColor: '#fff', borderTopWidth: 1, borderTopColor: '#e0e0e0', paddingBottom: 8, paddingTop: 8, }, tab: { flex: 1, alignItems: 'center', paddingVertical: 8, }, activeTab: { backgroundColor: '#f0f0f0', borderRadius: 8, }, icon: { marginBottom: 4, }, label: { fontSize: 12, color: '#666', }, activeLabel: { color: '#000', fontWeight: '600', }, backTab: { flex: 1, alignItems: 'center', paddingVertical: 8, backgroundColor: '#f0f0f0', borderRadius: 8, marginHorizontal: 4, }, backLabel: { fontSize: 12, color: '#000', fontWeight: '600', }, });