import React from 'react'
import { View, Text } from '@tarojs/components'
import { Cell, Button } from '@nutui/nutui-react-taro'
import Taro from '@tarojs/taro'

const DealerIndex: React.FC = () => {
  return (
    <View className="p-4">
      <Text className="text-lg font-bold mb-4">分销中心</Text>
      
      <Cell.Group>
        <Cell
          title="我的团队"
          description="查看团队成员"
          extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/team/index'})}>查看</Button>}
        />
        <Cell
          title="我的订单"
          description="查看分销订单"
          extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/orders/index'})}>查看</Button>}
        />
        <Cell
          title="提现管理"
          description="申请提现"
          extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/withdraw/index'})}>提现</Button>}
        />
        <Cell
          title="推广二维码"
          description="生成推广码"
          extra={<Button size="small" onClick={() => Taro.navigateTo({url: '/dealer/qrcode/index'})}>生成</Button>}
        />
      </Cell.Group>
    </View>
  )
}

export default DealerIndex
