import React from 'react';
import {
  Pagination as ArcoPagination,
  PaginationProps,
} from '@arco-design/web-react';
import styles from './style/index.module.less';

interface CustomPaginationProps extends PaginationProps {
  className?: string;
}

const Pagination: React.FC<CustomPaginationProps> = (props) => {
  const { className, ...restProps } = props;

  return (
    <div className={`${styles['custom-pagination']} ${className || ''}`}>
      <ArcoPagination
        {...restProps}
        showJumper={false}
        sizeCanChange={true}
        showTotal={(total) => `共 ${total} 条`}
      />
    </div>
  );
};

export default Pagination;
