import Taro from '@tarojs/taro';
import { View } from '@tarojs/components';
import ActivityIndicator from '../ActivityIndicator';
import classNames from 'classnames';
import { LoadMoreProps } from '../../../@types/load-more';
// import './index.scss'

const LoadMore = (props: LoadMoreProps) => {
  const { status, className } = props;
  const cn = className;
  return (
    <View className={classNames('flexCenter', 'itemCenter', 'loadMore', cn)}>
      {status === 'loadMore' ? (
        '———上拉加载更多———'
      ) : status === 'noMore' ? (
        '———我是有底线的———'
      ) : (
        <ActivityIndicator mode={'normal'} content={'加载中...'} size={32} />
      )}
    </View>
  );
};
LoadMore.options = {
  addGlobalClass: true,
};

export default LoadMore;
