import {
  NavigationContainer,
  DefaultTheme,
  DarkTheme,
} from '@react-navigation/native';
import {
  createStackNavigator,
  CardStyleInterpolators,
} from '@react-navigation/stack';
import * as React from 'react';
import { ColorSchemeName } from 'react-native';
import useModel from 'flooks';
import { useTranslation } from 'react-i18next';

import { MineStackParamList } from '../types';

import MineInfoScreen from '../mine/MineInfoScreen';
import ChangePasswordScreen from '../mine/ChangePasswordScreen';
import MineAppraisalScreen from '../mine/MineAppraisalScreen';
import MineComplaintScreen from '../mine/MineComplaint';
import SettingScreen from '../mine/SettingScreen';
import SettingSysScreen from '../mine/SettingSysScreen';

//叮咚币
import MineWalletScreen from '../wallet/MineWalletScreen';
import WithdrawApplyScreen from '../wallet/WithdrawApplyScreen';
import BankCardScreen from '../wallet/BankCardScreen';
import AddBankCardScreen from '../wallet/AddBankCardScreen';
import WithdrawResultScreen from '../wallet/WithdrawResultScreen';
import MineRecordScreen from '../wallet/MineRecordScreen';

import Heat3DScreen from '../map/Heat3DScreen';

const MineStack = createStackNavigator<MineStackParamList>();
export default function Navigation({
  colorScheme,
}: {
  colorScheme: ColorSchemeName;
}) {
  const { t } = useTranslation();
  return (
    <MineStack.Navigator
      initialRouteName="Setting"
      screenOptions={{
        cardOverlayEnabled: true,
        cardStyle: { backgroundColor: '#f2f2f2', flex: 1 },
        contentStyle: { backgroundColor: '#f2f2f2', flex: 1 },
        gestureEnabled: true,
        stackPresentation: 'push',
        cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
        headerStyle: {
          backgroundColor: '#FFC21C',
          elevation: 0,
          shadowOffset: {
            width: 0,
            height: 0,
          },
          shadowOpacity: 0,
          shadowRadius: 0,
        },
        headerTintColor: '#fff',
        headerTitleStyle: {
          fontWeight: 'bold',
        },
        headerTitleAlign: 'center',
        headerBackTitleVisible: false,
      }}
    >
      <MineStack.Screen
        name="MineInfo"
        component={MineInfoScreen}
        options={{ title: t('ji-ben-xin-xi') }}
      />
      <MineStack.Screen
        name="ChangePassword"
        component={ChangePasswordScreen}
        options={{ title: t('geng-gai-mi-ma') }}
      />
      <MineStack.Screen
        name="Wallet"
        component={MineWalletScreen}
        options={{ title: t('wo-de-ding-dong-bi') }}
      />
      <MineStack.Screen
        name="WithdrawApply"
        component={WithdrawApplyScreen}
        options={{ title: t('ti-xian') }}
      />
      <MineStack.Screen
        name="BankCard"
        component={BankCardScreen}
        options={{ title: t('xuan-ze-yin-hang-ka') }}
      />
      <MineStack.Screen
        name="AddBankCard"
        component={AddBankCardScreen}
        options={{ title: t('bang-ding-yin-hang-ka') }}
      />
      <MineStack.Screen
        name="WithdrawResult"
        component={WithdrawResultScreen}
        options={{
          title: t('ti-xian-jie-guo'),
        }}
      />
      <MineStack.Screen
        name="MineAppraisal"
        component={MineAppraisalScreen}
        options={{
          title: t('wo-de-ping-jia'),
        }}
      />
      <MineStack.Screen
        name="MineComplaint"
        component={MineComplaintScreen}
        options={{
          title: t('wo-de-tou-su'),
        }}
      />
      <MineStack.Screen
        name="MineRecord"
        component={MineRecordScreen}
        options={{
          title: t('wo-de-dui-zhang-dan'),
        }}
      />
      <MineStack.Screen
        name="Setting"
        component={SettingScreen}
        options={{
          title: t('she-zhi'),
        }}
      />
      <MineStack.Screen
        name="SettingSys"
        component={SettingSysScreen}
        options={{
          title: t('tong-zhi-he-ti-shi-yin-she-zhi'),
        }}
      />
      <MineStack.Screen
        name="Heat3D"
        component={Heat3DScreen}
        options={{
          title: t('dan-liang-re-li-tu'),
        }}
      />
    </MineStack.Navigator>
  );
}
