import type {
  MaterialTopTabNavigationEventMap,
  MaterialTopTabNavigationOptions,
} from '@react-navigation/material-top-tabs'
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'
import type {ParamListBase, TabNavigationState} from '@react-navigation/native'
import {withLayoutContext} from 'expo-router'

const Navigator = createMaterialTopTabNavigator().Navigator

const TopTabs = withLayoutContext<
  MaterialTopTabNavigationOptions,
  typeof Navigator,
  TabNavigationState<ParamListBase>,
  MaterialTopTabNavigationEventMap
>(Navigator)

export default TopTabs
