<script setup>
import { onMounted, ref } from 'vue';
import { SetupHandle, SetSize, ResetPosition } from '@/services/Windows';

import WindowHandle from './partials/WindowHandle.vue';
import VersionRender from '../partials/VersionRender.vue';
import EditUserPartial from '../partials/EditUserPartial.vue';

const handle = ref(null);

const props = defineProps(['data']);
const data = props.data;

let id = data.id;

onMounted(() => {
    SetupHandle(id, handle);
    SetSize(id, {width: 500, height: 460});
    ResetPosition(id, "center");
});
</script>


<template>
    <div class="window-wrapper" :id="'window-wrapper-' + id">
        <WindowHandle :window="id" ref="handle"></WindowHandle>

        <EditUserPartial></EditUserPartial>
        <!-- Body -->
         <h1>{{ $t("main-menu.main-menu")}}</h1>

        <div class="button-container">
            <button class="btn-primary button-expand sound-click" v-on:click="OpenCampaigns" ref="campaignButton">{{ $t("main-menu.campaigns") }}</button>
        </div>
        <VersionRender></VersionRender>

    </div>
</template>


<style scoped>
h1 {
    margin-top: 20px;
    font-family: MrEavesRemake;
}

.button-expand {
    width: 100%;
}

.button-container {
    display: flex;
    width: 100%;
    padding: 20px;

    flex-direction: column;
}

p {
  user-select: none;
}

.window-wrapper {
    display: flex;
    align-items: center;
    user-select: none;
}

.splash-image {
    width: 600px;
    height: 250px;
    user-select: none;
}
</style>


