<template>
  <div class="full-width overflow-auto relative-position">
    <q-infinite-scroll v-on="$listeners" v-bind="$attrs" :offset="350">
      <slot></slot>
      <template v-slot:loading>
        <div class="flex justify-center q-py-sm">
          <q-spinner-dots
            style="font-size: 40px !important;"
            color="secondary"
          />
        </div>
      </template>
    </q-infinite-scroll>
    <ui-page-loading :showing="isLoading" />
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import UiPageLoading from '@/lib-components/UiPageLoading.vue'
import { QInfiniteScroll, QSpinnerDots } from 'quasar'

@Component({
  inheritAttrs: false,
  components: { UiPageLoading, QInfiniteScroll, QSpinnerDots },
})
export default class WidgetPage extends Vue {
  @Prop(Boolean)
  isLoading!: boolean

  @Prop(Boolean)
  infinityScroll!: boolean
}
</script>
