<template>
    <div class="wrapper">
        <v-header />
        <v-sidebar />
        <div class="content-box" :class="{ 'content-collapse': sidebar.collapse }">
            <div class="content">
              <el-config-provider :locale="locale === 'es' ? es : en">
                <router-view>
                </router-view>
              </el-config-provider>
            </div>
        </div>
    </div>
</template>
<script setup lang="ts">
import { useSidebarStore } from '@/store/sidebar';
import vHeader from '@/components/header.vue';
import vSidebar from '@/components/sidebar.vue';
import { useI18n } from 'vue-i18n';
import es from 'element-plus/es/locale/lang/es';
import en from 'element-plus/es/locale/lang/en';
// import vTabs from '@/components/tabs.vue';

const sidebar = useSidebarStore();
 
  const { locale } = useI18n()
</script>

<style lang="scss">
.wrapper {
    height: 100vh;
    overflow: hidden;
}
.content-box {
    position: absolute;
    left: 250px;
    right: 0;
    top: 70px;
    bottom: 0;
    -webkit-transition: left 0.3s ease-in-out;
    transition: left 0.3s ease-in-out;
    background: #eef0fc;
    overflow: hidden;
}

.content {
    width: auto;
    height: 100%;
    padding: 20px;
    overflow-y: scroll;
    box-sizing: border-box;
}

.content::-webkit-scrollbar {
    width: 0;
}

.content-collapse {
    left: 65px;
}
</style>
