<template>
    <div class="fluid-dashboard">
        <div class="frame-top">
            <div class="top-logo">
                <img :src="brand.logo" />
            </div>
            <div class="title glow-text" :data-text="brand.title">{{ brand.title }}</div>
            <div class="top-right-actions">
                <FullscreenToggle />
                <slot name="top-actions"></slot>
            </div>
        </div>

        <div class="frame-bottom"></div>

        <slot name="background"></slot>

        <div class="ui-layer">

            <main class="main-layout" :class="layoutClass">
                <slot name="main"></slot>
            </main>
        </div>

    </div>
</template>

<script>


import FullscreenToggle from '@/components/ui/FullscreenToggle.vue';
import brand from '@/utils/brand';

export default {
    name: 'LoginLayout',
    mixins: [],
    components: {
        FullscreenToggle,
    },
    props: {
        layoutClass: {
            type: String,
            default: ''
        }
    },
    data() {
        return {
            brand,
        }
    },
    methods: {
        
    }
}
</script>

<style scoped>
.fluid-dashboard {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #050a17;
}

.frame-top,
.frame-left,
.frame-right,
.frame-bottom {
    position: absolute;
    pointer-events: none;
    z-index: 50;
}

.frame-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('@/assets/images/layout-top.png') no-repeat center top;
    background-size: 100% 100%;
}

.top-logo {
    position: absolute;
    top: 10px;
    left: 100px;
    height: 30px;
}
.top-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.top-right-actions {
    position: absolute;
    top: 2px;
    right: 50px;
    pointer-events: auto;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 45px;
}

.frame-top .title {
    font-family: var(--title-font-family);
    font-size: 48px;
    color: #ffffff;
    line-height: 63px;
    text-align: center;
    font-style: normal;
    text-transform: none;
    white-space: nowrap;
}

.frame-left {
    top: 10px;
    left: 0;
    width: 16px;
    height: calc(100% - 10px - 40px);
    background: url('@/assets/images/layout-left.png') no-repeat left center;
    background-size: 100% 100%;
}

.frame-right {
    top: 10px;
    right: 0;
    width: 16px;
    height: calc(100% - 10px - 40px);
    background: url('@/assets/images/layout-right.png') no-repeat right center;
    background-size: 100% 100%;
}

.frame-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 17px;
    background-size: 100% 100%;
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: grid;
    grid-template-rows: 80px 1fr;
}

.main-layout {
    height: 100%;
    box-sizing: border-box;
    pointer-events: none;
}

.main-layout > * {
    pointer-events: auto; 
}
</style>