<template>
  <water-mark content="Studio" :disabled="false">
    <com-pass></com-pass>
    <left-menu-layout key="leftmenu-layout" v-if="layout === 'left'">
      <slot />
    </left-menu-layout>
    <basic-layout key="basic-layout" v-else><slot /></basic-layout>
  </water-mark>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import BasicLayout from './basic-layout.vue';
import LeftMenuLayout from './leftmenu-layout.vue';
import { injectMenuState } from './use-menu-state';
import { default as WaterMark } from '@/components/watermark/index.vue';
import ComPass from '@/components/compass/index.vue';

export default defineComponent({
  name: 'GlobalLayout',
  setup() {
    return {
      ...injectMenuState(),
    };
  },
  components: {
    BasicLayout,
    LeftMenuLayout,
    WaterMark,
    ComPass,
  },
});
</script>
