<template>
  <el-card v-if="!path" shadow="always" class="flex justify-center h-full" :body-style="{ padding: '20px' }">
    <div class="welcome">
      <div class="header">
        <!-- <img src="@/assets/logo.png" alt="logo" class="logo"> -->
        <h1>追书云短剧平台</h1>
      </div>
      <div class="content">
        <h2>欢迎使用</h2>
        <p>点击左侧菜单进行操作</p>
      </div>
    </div>
  </el-card>
</template>

<script lang="ts" setup>
import { checkPermission, getFirstPath } from '@/directives/permission';
import router from '@/router';
let path = getFirstPath(0);
if (path) {
  router.push({ path: path });
}
console.log('path', path)
</script>

<style lang="scss" scoped>
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.logo {
  width: 80px;
  height: 80px;
  margin-right: 20px;
}

h1 {
  font-size: 36px;
  font-weight: bold;
  margin: 0;
}

.content {
  text-align: center;
  margin-bottom: 60px;
}

h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 40px;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #42b983;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #32a673;
}
</style>
