<template>
  <v-btn
    v-if="paginatedCollection.collection.length != 0 && !isLoading"
    class="mt-10"
    color="accent"
    :disabled="paginatedCollection.isLastPage"
    rounded
    elevation="8"
    @click="onclick()"
    v-bind="$attrs"
  >
    <v-icon>mdi-arrow-left</v-icon>
   {{ $t('next') }}
  </v-btn>
</template>

<script>
import { mapState } from "pinia";
import { useGlobalStore } from "@/store/GlobalStore";
import BasePaginatedCollection from "@/core/classes/base/BasePaginatedCollection";

export default {
  props: {
    paginatedCollection: BasePaginatedCollection,
    onclick: Function,
  },
  computed: {
    ...mapState(useGlobalStore, ["isLoading"]),
  },
};
</script>

<style></style>
