<template>
  <div class="body-wrapper">I am body</div>
  <button id="body-button" @click="handleClick">go to test page</button>
  <button id="body-button-inc" @click="handleClickInc">+1</button>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
import { useCounterStore } from '@stores/useCounter';

const counter = useCounterStore();
const router = useRouter();

const handleClick = () => {
  router.push('/test');
};

const handleClickInc = () => {
  counter.inc();
};
</script>

<style scoped>
#body-button-test {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
}

#body-button-inc {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
}

#body-button-test:hover {
  background-color: #e0e0e0;
}

#body-button-inc:hover {
  background-color: #e0e0e0;
}
</style>
