import { defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx } from "vue";
import IconButton from "../common/base/IconButton.vue.mjs";
import SettingIcon from "../common/icons/SettingIcon.vue.mjs";
import { useBasicStore } from "../../stores/basic.mjs";
import { storeToRefs } from "pinia";
import { useI18n } from "../../locales/index.mjs";
const _hoisted_1 = { class: "setting-control-container" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "SettingControl",
  setup(__props) {
    const { t } = useI18n();
    const basicStore = useBasicStore();
    const { showSettingDialog } = storeToRefs(basicStore);
    function handleShowSettingDialog() {
      basicStore.setShowSettingDialog(!basicStore.showSettingDialog);
    }
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(IconButton, {
          "is-active": unref(showSettingDialog),
          title: unref(t)("Settings"),
          onClickIcon: handleShowSettingDialog
        }, {
          default: withCtx(() => [
            createVNode(SettingIcon)
          ]),
          _: 1
        }, 8, ["is-active", "title"])
      ]);
    };
  }
});
export {
  _sfc_main as default
};
