<script setup lang="ts">
const { isDark, toggleDark } = useDarks()

const { t, toggleLocale, language } = useLanguage()

const theme = computed(() => (isDark.value ? 'dark' : 'light'))
console.log(1111)
const data=ref(0)
setInterval(()=>{data.value++},1000)

onMounted(() => {
		console.log("onMounted - DOM挂载完毕");
})

const loadFile = (url:string) => {
		console.log(url)
}
</script>

<template>
	<div class="m-6">{{data}}</div>
	<div class="cursor-pointer m-6" @click="toggleDark()">theme: {{ theme }}</div>

	<div class="cursor-pointer mt-6 ml-6" @click="toggleLocale()">
		<div>language: {{ language }}</div>
		<div>base: {{ t('about') }}</div>
		<div>nesting: {{ t('nesting.sir') }} {{ t('nesting.lady') }}</div>
	</div>

	<Counter />
</template>
