import React from "react"; import { TouchableOpacity, View } from "react-native"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { Ionicons } from "@expo/vector-icons"; import { useAuth } from "../auth/AuthContext"; import { useTheme } from "../context/ThemeContext"; import { logoutAdmin } from "../api/api_admin"; import { fontSize, spacing } from "../theme"; import type { CabineTabParamList } from "./types"; import DashboardScreen from "../screens/cabine/DashboardScreen"; import OrdersScreen from "../screens/cabine/OrdersScreen"; import DeliveryScreen from "../screens/cabine/DeliveryScreen"; import UsersScreen from "../screens/cabine/UsersScreen"; import AlertsScreen from "../screens/cabine/AlertsScreen"; const Tab = createBottomTabNavigator(); export default function CabineNavigator() { const { logout } = useAuth(); const { colors, isDark, toggleTheme } = useTheme(); const handleLogout = async () => { await logoutAdmin(); await logout(); }; return ( ( ), tabBarStyle: { backgroundColor: colors.bgSecondary, borderTopColor: colors.border, borderTopWidth: 1, }, tabBarActiveTintColor: colors.info, tabBarInactiveTintColor: colors.textMuted, tabBarLabelStyle: { fontSize: fontSize.xs }, }} > ( ), }} /> ( ), }} /> ( ), }} /> ( ), }} /> ( ), }} /> ); }