"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 IconButton = require("../base/IconButton.vue2.js");
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "index",
  setup(__props) {
    const { t } = uikitBaseComponentVue3.useUIKit();
    const { cameraList } = room.useDeviceState();
    const basicBeautyVisible = vue.ref(false);
    const handleClick = () => {
      if (cameraList.value.length === 0) {
        uikitBaseComponentVue3.TUIToast.error({ message: t("BasicBeauty.NoCamera") });
        return;
      }
      basicBeautyVisible.value = true;
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", null, [
        vue.createVNode(IconButton.default, {
          title: vue.unref(t)("BasicBeauty.Title"),
          disabled: vue.unref(cameraList).length === 0,
          onClick: handleClick
        }, {
          default: vue.withCtx(() => [
            vue.createVNode(vue.unref(uikitBaseComponentVue3.IconBasicBeauty), { size: 24 })
          ]),
          _: 1
        }, 8, ["title", "disabled"]),
        vue.createVNode(vue.unref(uikitBaseComponentVue3.TUIDialog), {
          visible: basicBeautyVisible.value,
          "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => basicBeautyVisible.value = $event),
          title: vue.unref(t)("BasicBeauty.Title"),
          "custom-classes": ["basic-beauty-dialog"],
          appendTo: "#roomPage"
        }, {
          footer: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
            vue.createElementVNode("div", null, null, -1)
          ])]),
          default: vue.withCtx(() => [
            vue.createVNode(vue.unref(room.FreeBeautyPanel), {
              onClose: _cache[0] || (_cache[0] = ($event) => basicBeautyVisible.value = false)
            })
          ]),
          _: 1
        }, 8, ["visible", "title"])
      ]);
    };
  }
});
exports.default = _sfc_main;
