import { defineComponent, ref, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createCommentVNode, createVNode, unref, withCtx } from "vue";
import { useUIKit, IconSetting } from "@tencentcloud/uikit-base-component-vue3";
import IconButton from "../base/IconButton.vue2.mjs";
import SettingDialog from "./SettingDialog.vue3.mjs";
const _hoisted_1 = { class: "setting-control-container" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    const { t } = useUIKit();
    const showSettingDialog = ref(false);
    function handleShowSettingDialog() {
      showSettingDialog.value = true;
    }
    function handleClose() {
      showSettingDialog.value = false;
    }
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock(Fragment, null, [
        createElementVNode("div", _hoisted_1, [
          createVNode(IconButton, {
            "is-active": showSettingDialog.value,
            title: unref(t)("Settings.Title"),
            onClickIcon: handleShowSettingDialog
          }, {
            default: withCtx(() => [
              createVNode(unref(IconSetting), { size: "24" })
            ]),
            _: 1
          }, 8, ["is-active", "title"])
        ]),
        showSettingDialog.value ? (openBlock(), createBlock(SettingDialog, {
          key: 0,
          visible: showSettingDialog.value,
          onClose: handleClose
        }, null, 8, ["visible"])) : createCommentVNode("", true)
      ], 64);
    };
  }
});
export {
  _sfc_main as default
};
