<template>
  <v-app class="mode-wrap" :class="[isDarkmode ? 'darkmode' : '']">
    <div class="container">
      <headerLayout @click:mode-chg="mode"></headerLayout>
      <div class="content">
        <NuxtPage />
      </div>
      <footerLayout></footerLayout>
    </div>
  </v-app>
</template>

<script setup>
  let isDarkmode = ref(false)

  const mode = (e) => {
    isDarkmode = !(e.value);
    if(isDarkmode){
      document.querySelector(".mode-wrap").classList.add("darkmode");
    }else{
      document.querySelector(".mode-wrap").classList.remove("darkmode");
    }
  }
</script>

<style lang="scss" scoped>
</style>