import React from "react";
import { Text, TouchableOpacity } from "react-native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import CompleteStreamerInformation from "./CompleteStreamerInformation";
import AfterSubmitStreamerVerification from "./AfterSubmitStreamerVerification";
import AfterSubmitGuildVerification from "./AfterSubmitGuildVerification";
import JoinStreamer from "./JoinStreamer";
import JoinEntrance from "./JoinEntrance";
import JoinGuild from "./JoinGuild";
import { Icon } from "@rneui/themed";

const StreamerVerificationStack = createNativeStackNavigator();

export default function StreamerVerification() {
  return (
    <StreamerVerificationStack.Navigator>
      <StreamerVerificationStack.Screen
        name="JoinEntrance"
        component={JoinEntrance}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          headerRight: () => (
            <TouchableOpacity
              onPress={() =>
                navigation.navigate("WebWithHeader", {
                  title: "申请入驻",
                  uri: `${process.env.EXPO_PUBLIC_WEB_URL}/doc/platformguidelines`,
                })
              }
            >
              <Text style={{ color: "#FF669E", fontSize: 16 }}>平台准则</Text>
            </TouchableOpacity>
          ),
          title: "申请入驻",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
      <StreamerVerificationStack.Screen
        name="JoinStreamer"
        component={JoinStreamer}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          headerRight: () => (
            <TouchableOpacity
              onPress={() =>
                navigation.navigate("WebWithHeader", {
                  title: "达人入驻",
                  uri: `${process.env.EXPO_PUBLIC_WEB_URL}/doc/platformguidelines`,
                })
              }
            >
              <Text style={{ color: "#FF669E", fontSize: 16 }}>平台准则</Text>
            </TouchableOpacity>
          ),
          title: "达人入驻",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
      <StreamerVerificationStack.Screen
        name="JoinGuild"
        component={JoinGuild}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          headerRight: () => (
            <TouchableOpacity
              onPress={() =>
                navigation.navigate("WebWithHeader", {
                  title: "公会入驻",
                  uri: `${process.env.EXPO_PUBLIC_WEB_URL}/doc/platformguidelines`,
                })
              }
            >
              <Text style={{ color: "#FF669E", fontSize: 16 }}>平台准则</Text>
            </TouchableOpacity>
          ),
          title: "公会入驻",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
      <StreamerVerificationStack.Screen
        name="CompleteStreamerInformation"
        component={CompleteStreamerInformation}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          headerRight: () => (
            <TouchableOpacity
              onPress={() =>
                navigation.navigate("WebWithHeader", {
                  title: "平台准则",
                  uri: `${process.env.EXPO_PUBLIC_WEB_URL}/doc/platformguidelines`,
                })
              }
            >
              <Text style={{ color: "#FF669E", fontSize: 16 }}>平台准则</Text>
            </TouchableOpacity>
          ),
          title: "完善信息",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
      <StreamerVerificationStack.Screen
        name="AfterSubmitStreamerVerification"
        component={AfterSubmitStreamerVerification}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          title: "提交成功",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
      <StreamerVerificationStack.Screen
        name="AfterSubmitGuildVerification"
        component={AfterSubmitGuildVerification}
        options={({ navigation }) => ({
          headerLeft: () => (
            <Icon
              type="ionicon"
              name="chevron-back"
              size={32}
              color="white"
              onPress={() => navigation.goBack()}
            />
          ),
          title: "提交成功",
          headerTitleStyle: { color: "white" },
          headerStyle: { backgroundColor: "#07050A" },
        })}
      />
    </StreamerVerificationStack.Navigator>
  );
}
