.fire('page-tapped', parseInt(ev.target.dataset.number));
      },
      shouldEnablePrevious(result) {
        return result.page > 1;
      },
      shouldEnableNext(result) {
        return result.page < result.totalPages;
      },
      computePaginationItems(result, currentPage) {
        let pages = [];
        let isGapAdded = false;
        for (let i=1;i<=result.totalPages;i++) {
          if (i <= 2 || i >= (result.totalPages - 1)
              || ((result.page - 2) <= i && i <= (result.page + 2))