import {NavigationState, SceneRendererProps} from 'react-native-tab-view';

export interface TabItem<T = string> {
  key: T;
  label: string;
  badge?: boolean;
}

export type TabsRenderScene<T extends TabItem> = SceneRendererProps & {
  route: T;
  isActive?: boolean;
};

export type TabsHeaderProps = SceneRendererProps & {
  navigationState: NavigationState<TabItem>;
};

export type RenderSceneProps = TabsRenderScene<TabItem>;

export type TabsRef = {
  currentIndex: number;
  goToIndex: (index: number) => void;
  goToRouteKey: (key: string) => void;
};
