<template>
  <div class="test">
    <h1>this is test page</h1>
    <p>counter: {{ counter.count }}</p>
    <button id="test-button" @click="handleClick">go to home page</button>
    <button id="test-button-inc" @click="counter.inc">+1</button>
  </div>
</template>
<script setup lang="ts">
import { useAlert } from '@composables/useAlert';
import { useCounterStore } from '@stores/useCounter';
const alert = useAlert();
const counter = useCounterStore();

const handleClick = () => {
  alert('测试alert', 'error');
};
</script>

<style scoped>
.test {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

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

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

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

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