import { Ionicons } from "@expo/vector-icons";
import { Tabs } from "expo-router";
import { View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useTranslation } from "react-i18next";
import { Text } from "@/components/ui/Text";
import { colors, fonts, radii, shadows } from "@/lib/theme";
import { useCartStore } from "@/lib/stores/cartStore";
function TabIcon({
name,
focused,
badge,
}: {
name: keyof typeof Ionicons.glyphMap;
focused: boolean;
badge?: number;
}) {
return (
{badge ? (
{badge > 9 ? "9+" : badge}
) : null}
);
}
export function FloatingTabBar() {
const insets = useSafeAreaInsets();
const { t } = useTranslation();
const cartCount = useCartStore((s) => s.totalItems());
return (
(
),
}}
/>
(
),
}}
/>
(
),
}}
/>
(
),
}}
/>
);
}