import React from 'react'
import { View, Text, Button } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './index.scss'

const DeveloperEntryPage: React.FC = () => {
  const handleEntry = () => {
    Taro.switchTab({ url: '/pages/index/index' })
  }

  const handleApply = () => {
    Taro.navigateTo({ url: '/enterprise/developer/apply' })
  }

  return (
    <View className="developer-entry-page">
      <View className="developer-entry-page__header">
        <Text className="developer-entry-page__icon">🛠️</Text>
        <Text className="developer-entry-page__title">开发者中心</Text>
        <Text className="developer-entry-page__desc">
          为开发者提供完整的项目管理和应用开发能力
        </Text>
      </View>

      <View className="developer-entry-page__features">
        <View className="developer-entry-page__feature">
          <View className="developer-entry-page__feature-icon">📁</View>
          <Text className="developer-entry-page__feature-name">项目管理</Text>
        </View>
        <View className="developer-entry-page__feature">
          <View className="developer-entry-page__feature-icon">📱</View>
          <Text className="developer-entry-page__feature-name">应用管理</Text>
        </View>
        <View className="developer-entry-page__feature">
          <View className="developer-entry-page__feature-icon">🔑</View>
          <Text className="developer-entry-page__feature-name">API Key</Text>
        </View>
        <View className="developer-entry-page__feature">
          <View className="developer-entry-page__feature-icon">📊</View>
          <Text className="developer-entry-page__feature-name">数据分析</Text>
        </View>
      </View>

      <View className="developer-entry-page__actions">
        <Button className="developer-entry-page__btn developer-entry-page__btn--primary" onClick={handleEntry}>
          进入开发者中心
        </Button>
        <Button className="developer-entry-page__btn developer-entry-page__btn--secondary" onClick={handleApply}>
          申请开发者权限
        </Button>
      </View>
    </View>
  )
}

export default DeveloperEntryPage
