"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const IconButton = require("./base/IconButton.vue.js");
const room = require("../../constants/room.js");
const LanguageIcon = require("./icons/LanguageIcon.vue.js");
const basic = require("../../stores/basic.js");
const index = require("../../locales/index.js");
require("../../services/main.js");
const roomService = require("../../services/roomService.js");
require("@tencentcloud/tuiroom-engine-js");
require("mitt");
require("../../services/manager/roomActionManager.js");
require("@tencentcloud/tui-core");
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "Language",
  setup(__props) {
    const basicStore = basic.useBasicStore();
    const title = Vue.computed(
      () => basicStore.lang === "en-US" ? "English" : "中文"
    );
    const languageConfig = roomService.roomService.getComponentConfig("Language");
    const handleChange = () => {
      roomService.roomService.setLanguage(
        index.default.global.locale.value === "en-US" ? "zh-CN" : "en-US"
      );
    };
    return (_ctx, _cache) => {
      return Vue.unref(languageConfig).visible ? (Vue.openBlock(), Vue.createBlock(IconButton.default, {
        key: 0,
        title: title.value,
        layout: Vue.unref(room.IconButtonLayout).HORIZONTAL,
        icon: LanguageIcon.default,
        onClickIcon: handleChange
      }, null, 8, ["title", "layout"])) : Vue.createCommentVNode("", true);
    };
  }
});
exports.default = _sfc_main;
