<template>
    <div>
        <v-app-bar>
        <v-app-bar-title>Hello</v-app-bar-title>
        <v-spacer />
        <v-btn @click="toggleTheme">
          <v-icon>ph:sun</v-icon>
          toggle thema</v-btn>
      </v-app-bar>
    </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { useTheme } from "vuetify";
import { storeToRefs } from "pinia";

const theme = useTheme();

function toggleTheme () {
  theme.global.name.value = theme.global.current.value.dark ? 'light' : 'myTheme';
}
</script>

<style scoped>

</style>