<template>
  <div>
    <Title title="Historial de préstamos" :operador="operador" />

    <Historial :operador="operador" :updateIsLoading="updateIsLoading" />

    <b-loading :can-cancel="false" v-model="isLoading" is-full-page />
  </div>
</template>

<script>
import jwt_decode from 'jwt-decode'
import Historial from '@/components/operador/Historial'
import Title from '@/components/layouts/Title'

export default {
  components: { Historial, Title },
  data() {
    return {
      isLoading: false,
      operador: {},
    }
  },
  methods: {
    updateIsLoading(valorBooleano) {
      this.isLoading = valorBooleano
    },
  },
  created() {
    this.operador = jwt_decode(this.$getToken.tokenStr())
  },
}
</script>

<style></style>
