<script>

import { userStore } from '@/PiniaStores/UserStore.js'
import {useRouter} from 'vue-router'
import { restaurantStore } from '@/PiniaStores/restaurantStore.js'

export default {
  data(){
    return {
      userStore_: userStore(),
      router: useRouter(),
      restaurantStore_: restaurantStore(),
    }
  },
}

</script>

<template>

  <a v-on:click="userStore_.clearLocalStorage(); restaurantStore_.clearRestaurant()" @click="router.push('/login')" v-if="userStore_.data.role!=='UN_AUTHENTICATED'" class="btn btn-dark">Logout</a>

</template>

<style scoped>

</style>
