import React from 'react'
import { View, Text } from '@tarojs/components'

interface LoadMoreProps {
  loading?: boolean
  finished?: boolean
}

const LoadMore: React.FC<LoadMoreProps> = ({ loading = false, finished = false }) => {
  if (finished) {
    return (
      <View className='py-4 flex justify-center'>
        <Text className='text-xs text-gray-400'>- 没有更多了 -</Text>
      </View>
    )
  }

  if (loading) {
    return (
      <View className='py-4 flex justify-center'>
        <Text className='text-xs text-gray-400'>加载中...</Text>
      </View>
    )
  }

  return null
}

export default LoadMore
