/**
 * 个人中心 Stack 导航
 * 处理个人中心相关页面
 */
import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import type { ProfileStackParamList } from './types';

import { colors } from '../theme';
import {
  ProfileScreen,
  SettingsScreen,
  EditProfileScreen,
  NotificationSettingsScreen,
  BlockedUsersScreen,
  AccountSecurityScreen,
} from '../screens/profile';

const ProfileStack = createNativeStackNavigator<ProfileStackParamList>();

export function ProfileNavigator() {
  return (
    <ProfileStack.Navigator
      screenOptions={{
        headerStyle: {
          backgroundColor: colors.background.paper,
        },
        headerTintColor: colors.text.primary,
        headerTitleStyle: {
          fontWeight: '600',
        },
        headerBackTitle: '',
        headerShadowVisible: false,
      }}
    >
      <ProfileStack.Screen
        name="Profile"
        component={ProfileScreen}
        options={{
          headerShown: false,
        }}
      />
      <ProfileStack.Screen
        name="Settings"
        component={SettingsScreen}
        options={{
          title: '设置',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="EditProfile"
        component={EditProfileScreen}
        options={{
          title: '编辑资料',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="AccountSecurity"
        component={AccountSecurityScreen}
        options={{
          title: '账号安全',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="MyPosts"
        component={ProfileScreen}
        options={{
          title: '我的帖子',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="Bookmarks"
        component={ProfileScreen}
        options={{
          title: '收藏',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="NotificationSettings"
        component={NotificationSettingsScreen}
        options={{
          title: '通知设置',
          headerBackTitle: '',
        }}
      />
      <ProfileStack.Screen
        name="BlockedUsers"
        component={BlockedUsersScreen}
        options={{
          title: '黑名单',
          headerBackTitle: '',
        }}
      />
    </ProfileStack.Navigator>
  );
}
