<template>
  <div class="tool-bar-ri">
    <div class="header-icon">
      <!-- <el-icon @click="opens" color="#ccc" :size="25" style="margin-right: 5px; cursor: pointer">
        <Box />
      </el-icon> -->
      <el-icon @click="open" color="#ccc" :size="29" style="margin-right: 20px; cursor: pointer">
        <VideoCamera />
      </el-icon>
      <AssemblySize id="assemblySize" />
      <SearchMenu id="searchMenu" />
      <ThemeSetting id="themeSetting" />
      <!-- <Message id="message" /> -->
      <Fullscreen id="fullscreen" />
      <ChangeModule id="changeModule" />
    </div>
    <span class="username">{{ username }}</span>
    <Avatar />
  </div>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { useUserStore } from "@/stores/modules/user";
import AssemblySize from "./components/AssemblySize.vue";
import ThemeSetting from "./components/ThemeSetting.vue";
import Message from "./components/Message.vue";
import Fullscreen from "./components/Fullscreen.vue";
import Avatar from "./components/Avatar.vue";
import ChangeModule from "./components/ChangeModule.vue";
import SearchMenu from "./components/SearchMenu.vue";

const userStore = useUserStore();
const username = computed(() => userStore.userInfo?.name);
function open() {
  window.open("/#/screen");
}
function opens() {
  window.open("http://192.168.10.101:1234/");
}
</script>

<style scoped lang="scss">
.tool-bar-ri {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 25px;
  .header-icon {
    display: flex;
    align-items: center;
    & > * {
      margin-left: 21px;
      color: var(--el-header-text-color);
    }
  }
  .username {
    margin: 0 20px;
    font-size: 15px;
    color: var(--el-header-text-color);
  }
}
</style>
