"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const index$1 = require("../UserInfo/index.js");
const Language_vue_vue_type_script_setup_true_lang = require("../../common/Language.vue.js");
const SwitchTheme_vue_vue_type_script_setup_true_lang = require("../../common/SwitchTheme.vue.js");
const index = require("../RoomInfo/index.js");
const LayoutControl = require("./LayoutControl.vue.js");
const NetworkInfo = require("./NetworkInfo.vue.js");
const basic = require("../../../stores/basic.js");
const pinia = require("pinia");
const _hoisted_1 = { class: "header-container" };
const _hoisted_2 = { class: "left-container" };
const _hoisted_3 = { class: "center-container" };
const _hoisted_4 = { class: "right-container" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "index",
  emits: ["log-out"],
  setup(__props) {
    const basicStore = basic.useBasicStore();
    const { userId, userName, avatarUrl } = pinia.storeToRefs(basicStore);
    const showHeaderInfo = Vue.inject("showHeaderInfo", true);
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
        Vue.createElementVNode("div", _hoisted_2, [
          Vue.createVNode(SwitchTheme_vue_vue_type_script_setup_true_lang.default, { class: "header-item" }),
          Vue.createVNode(LayoutControl.default, { class: "header-item" }),
          Vue.createVNode(NetworkInfo.default, { class: "header-item" })
        ]),
        Vue.createElementVNode("div", _hoisted_3, [
          Vue.createVNode(Vue.unref(index.default), { class: "header-item" })
        ]),
        Vue.createElementVNode("div", _hoisted_4, [
          Vue.withDirectives(Vue.createVNode(Language_vue_vue_type_script_setup_true_lang.default, { class: "header-item" }, null, 512), [
            [Vue.vShow, Vue.unref(showHeaderInfo)]
          ]),
          Vue.withDirectives(Vue.createVNode(Vue.unref(index$1.default), {
            class: "header-item",
            "user-id": Vue.unref(userId),
            "user-name": Vue.unref(userName),
            "avatar-url": Vue.unref(avatarUrl),
            onLogOut: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("log-out"))
          }, null, 8, ["user-id", "user-name", "avatar-url"]), [
            [Vue.vShow, Vue.unref(showHeaderInfo)]
          ])
        ])
      ]);
    };
  }
});
exports.default = _sfc_main;
