<template>
  <div :class="isCurrentPage ? 'page-item active' : 'page-item'">
    <div v-if="isCurrentPage">
      <span class="page-link disabled">{{pageNumber}}</span>
    </div>
    <div v-else @click="onClick">
      <a class="page-link">{{pageNumber}}</a>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    pageNumber: {
      type: Number,
      required: true,
    },
    isCurrentPage: undefined,
  },
  methods: {
    onClick() {
      this.$emit('loadPage', this.pageNumber);
    },
  },
};
</script>
<style scoped>
.isCurrentPage {
  cursor: arrow;
}
</style>
