"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
const room = require("tuikit-atomicx-vue3/room");
const _hoisted_1 = { class: "setting-body" };
const _hoisted_2 = { class: "setting-tabs" };
const _hoisted_3 = ["onClick"];
const _hoisted_4 = { class: "setting-content" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "SettingDialog",
  props: {
    visible: { type: Boolean }
  },
  emits: ["close"],
  setup(__props, { emit: __emit }) {
    const { t } = uikitBaseComponentVue3.useUIKit();
    const emit = __emit;
    const activeSettingTab = vue.ref("audio");
    const settingTabsTitleList = vue.computed(() => [
      { label: t("Setting.AudioSetting"), value: "audio" },
      { label: t("Setting.VideoSetting"), value: "video" }
    ]);
    function handleClose() {
      emit("close");
    }
    function handleUpdateActiveTab(tabTitle) {
      activeSettingTab.value = tabTitle;
    }
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.unref(uikitBaseComponentVue3.TUIDialog), {
        title: vue.unref(t)("Settings.Title"),
        visible: __props.visible,
        customClasses: ["custom-setting-dialog"],
        appendTo: "#roomPage",
        onClose: handleClose
      }, {
        footer: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
          vue.createElementVNode("div", null, null, -1)
        ])]),
        default: vue.withCtx(() => [
          vue.createElementVNode("div", _hoisted_1, [
            vue.createElementVNode("div", _hoisted_2, [
              (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(settingTabsTitleList.value, (item, index) => {
                return vue.openBlock(), vue.createElementBlock("div", {
                  key: index,
                  class: vue.normalizeClass([
                    "tabs-title",
                    `${activeSettingTab.value === item.value ? "active" : ""}`
                  ]),
                  onClick: ($event) => handleUpdateActiveTab(item.value)
                }, vue.toDisplayString(item.label), 11, _hoisted_3);
              }), 128))
            ]),
            _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "divide-line" }, null, -1)),
            vue.createElementVNode("div", _hoisted_4, [
              activeSettingTab.value === "audio" ? (vue.openBlock(), vue.createBlock(vue.unref(room.AudioSettingPanel), {
                key: 0,
                outputVolumeVisible: false,
                class: "setting-tab"
              })) : vue.createCommentVNode("", true),
              activeSettingTab.value === "video" ? (vue.openBlock(), vue.createBlock(vue.unref(room.VideoSettingPanel), {
                key: 1,
                class: "setting-tab"
              })) : vue.createCommentVNode("", true)
            ])
          ])
        ]),
        _: 1
      }, 8, ["title", "visible"]);
    };
  }
});
exports.default = _sfc_main;
