import type { BottomTabNavigationOptions, BottomTabNavigationEventMap, } from '@react-navigation/bottom-tabs'; import { DefaultNavigatorOptions, ParamListBase, TabNavigationState, TabRouterOptions, } from '@react-navigation/native'; import React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; type Enumerate< N extends number, Acc extends number[] = [] > = Acc['length'] extends N ? Acc[number] : Enumerate; type Range = Exclude< Enumerate, Enumerate >; export interface ICurvedBottomBarRef { setVisible: (visible: boolean) => void; } interface Props { ref?: | React.RefObject | React.MutableRefObject | null | undefined; type?: 'DOWN' | 'UP'; circlePosition?: 'CENTER' | 'LEFT' | 'RIGHT'; style?: StyleProp; shadowStyle?: StyleProp; // Do not use this Prop in Expo width?: number; height?: Range<50, 91>; borderTopLeftRight?: boolean; circleWidth?: Range<50, 61>; bgColor?: string; borderColor?: string; borderWidth?: number; initialRouteName: string; defaultScreenOptions?: unknown; renderCircle: ({ routeName, selectedTab, navigate, }: { routeName: string; selectedTab: string; navigate: (selectedTab: string) => void; }) => JSX.Element; tabBar?: ({ routeName, selectedTab, navigate, }: { routeName: string; selectedTab: string; navigate: (selectedTab: string) => void; }) => JSX.Element; } export type NavigatorBottomBarProps = DefaultNavigatorOptions< ParamListBase, TabNavigationState, BottomTabNavigationOptions, BottomTabNavigationEventMap > & Props & TabRouterOptions;