import { Animated, Pressable, Text } from "react-native"; import { Ionicons } from "@expo/vector-icons"; import { router } from "expo-router"; import { IoniconsName } from "@/types/index"; interface SidebarItemProps { paddingLeft: Animated.Value; routerPushValue: any; isMobile: boolean; isActive: (path: string) => boolean; iconTranslateX: Animated.Value; textOpacity: Animated.Value; path: string; icon: IoniconsName; label: string; isFirst?: boolean; showLabel?: boolean; } export const SidebarItem = ({ paddingLeft, routerPushValue, isMobile, isActive, iconTranslateX, textOpacity, path, icon, label, isFirst, showLabel = true, }: SidebarItemProps) => { return ( router.push(routerPushValue)} className={`flex-row items-center py-3 rounded-lg w-full ${ isFirst && !isMobile ? "mt-4" : isMobile ? "mt-1" : "" } ${showLabel ? "justify-start" : "justify-center"}`} style={{ backgroundColor: isActive(path) ? "#5A4570" : "transparent", }} > {showLabel && ( {label} )} ); };