import React from 'react'
import { View, Text, ScrollView } from '@tarojs/components'
import { RencaiTabBarLayout } from '@d8d/rencai-shared-ui/components/RencaiTabBarLayout'
import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
import { useRequireAuth } from '@d8d/rencai-auth-ui/hooks'

/**
 * 人才小程序设置页
 * TabBar页面 - 无返回按钮
 * 原型参考: docs/小程序原型/rencai.html (行770-906)
 */
const SettingsPage: React.FC = () => {
  // 检查登录状态，未登录则重定向
  useRequireAuth()
  return (
    <RencaiTabBarLayout activeKey="settings">
      <ScrollView className="h-[calc(100%-60px)] overflow-y-auto bg-gray-100" scrollY>
        {/* Navbar导航栏 - TabBar页面无返回按钮 */}
        <Navbar
          title="更多"
          leftIcon=""
          leftText=""
          onClickLeft={() => {}}
          backgroundColor="bg-white"
          border={true}
          fixed={true}
          placeholder={true}
        />

        {/* 页面内容 - 待实现完整功能 */}
        <View className="h-full flex items-center justify-center bg-gray-100">
          <Text className="text-gray-600">设置页面占位</Text>
        </View>
      </ScrollView>
    </RencaiTabBarLayout>
  )
}

export default SettingsPage
