const PaginationTitle = ({ first, totalRecords, perPageData }: {first: any, totalRecords: number, perPageData: number}) => {
    const start = first === 0 ? 1 : first;
    const end = Math.min(first + perPageData, totalRecords);
  
    return (
      totalRecords > 0 ? (
        <p className="pagination_title_data">
          Showing {start} to {end} of {totalRecords} records
        </p>
      ) : (
        <p className="pagination_title_data">
          Showing {totalRecords} to {totalRecords} of {totalRecords} records
        </p>
      )
    );
  };

  export default PaginationTitle;