<template>
  <UPage>
    <UHeader>
      <template #title> Tootaio Studio </template>
      <template #right>
        <UColorModeButton />
        <ULocaleSelect
          :model-value="locale"
          :locales="[en, zh_cn]"
          @update:model-value="(v) => setLocale(v as 'en' | 'zh-CN')"
        />
      </template>
    </UHeader>
    <UMain>
      <slot />
    </UMain>
    <UFooter>
      <template #left>
        &copy; {{ new Date().getFullYear() }} Tootaio Studio. All rights
        reserved.
      </template>
    </UFooter>
  </UPage>
</template>

<script lang="ts" setup>
import { en, zh_cn } from "@nuxt/ui/locale";
const { locale, setLocale } = useI18n();
</script>

<style></style>
