<template lang="pug">
  .flex(class="q-pa-lg flex-center")
    q-pagination(
      v-model="value",
      :max="max",
      :min="min",
      :max-pages="maxPages",
      :size="`${size}px`",
      :boundary-numbers="boundaryNumbers",
      :direction-links="directionLinks",
      @click="chCurrentPage"
    )
</template>

<script>
export default {
  name: "BasePagination",
  props: {
    value: Number,
    max: {
      default: 1,
      type: Number,
    },
    min: {
      default: 1,
      type: Number,
    },
    maxPages: {
      default: 6,
      type: Number,
    },
    boundaryNumbers: {
      default: false,
      type: Boolean,
    },
    directionLinks: {
      default: false,
      type: Boolean,
    },
    size: Number,
  },
  methods: {
    chCurrentPage() {
      this.$emit("st-current-page", this.value);
    },
  },
};
</script>
