<script setup>
import { onMounted, provide, reactive, ref } from 'vue';
import { ElConfigProvider } from 'element-plus';
import teachableModel from './components/teachableModel.vue';

// import 'element-plus/theme-chalk/el-message.css';
// import 'element-plus/theme-chalk/el-message-box.css';
// import 'element-plus/theme-chalk/el-notification.css';
// import './styles/index.scss';


const userInfo = reactive({
    is_Login: false,
    username: '',
    password: '',
})

const apiurl = ref('http://127.0.0.1:5174')
provide('apiurl', apiurl.value)

provide('userInfo', userInfo)
onMounted(() => {
    // 获取当前的LS里的已经登录的信息
    if (
        localStorage.getItem('myAIplatformUsername')
        && localStorage.getItem('myAIplatformPassword')
    ) {
        userInfo.is_Login = true
        userInfo.username = localStorage.getItem('myAIplatformUsername')
        userInfo.password = localStorage.getItem('myAIplatformPassword')
    }
    else {
        userInfo.is_Login = false
    }
})
</script>

<template>
    <ElConfigProvider>
        <teachableModel />
    </ElConfigProvider>
</template>

<style>
/* #app {
  text-align: center;
  color: var(--ep-text-color-primary);
}

.main-container {
  height: calc(100vh - var(--ep-menu-item-height) - 4px);
  background-color: #feffff;
} */
</style>
