content: import React, { Component } from 'react';
  import { FormattedMessage } from 'react-intl';
  import Helpers from '../../helpers'
  import _ from 'underscore'
  
  
  class InctlPagination extends Component {
  
    constructor(props) {
      super(props);
      this.onSelect = this.onSelect.bind(this);
    }
  
    onSelect(e){
      e.preventDefault();
      var page = Number(e.target.getAttribute("data-page"));
      if(typeof this.props.onSelect === 'function') {
        this.props.onSelect(page);
      }
    }
  
    render() {
      let items = _.range(1, this.props.items);
      let activePage = this.props.activePage;
      return (
        <ul className="inctl-pagination">
          {items.length && items.map((p, j) =>
            <li key={j} className={`${activePage == p ? 'active' : '' }`}>
              <a onClick={this.onSelect} data-page={p} href="#">
                {Helpers.i18nNumeric(p, 'marathi')}
              </a>
            </li>
          )}
        </ul>
      );
    }
  }
  
  export default InctlPagination;
  