"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 _hoisted_1 = { class: "icon-button-container" };
const _hoisted_3 = { class: "title" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "IconButton",
  props: {
    title: { default: "" },
    hasMore: { type: Boolean, default: false },
    hideHoverEffect: { type: Boolean, default: false },
    disabled: { type: Boolean, default: false },
    isActive: { type: Boolean, default: false },
    layout: {
      default: "vertical"
      /* VERTICAl */
    },
    icon: { default: null },
    isNotSupport: { type: Boolean, default: false },
    badgeCount: { default: 0 }
  },
  emits: ["click-icon", "click-more"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const iconContentClass = vue.computed(() => {
      if (props.layout === "horizontal") {
        return "icon-content-horizontal";
      }
      return "icon-content-vertical";
    });
    const handleClickEvent = () => {
      emit("click-icon");
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
        (vue.openBlock(), vue.createElementBlock("div", {
          key: 1,
          class: vue.normalizeClass(["icon-content", iconContentClass.value, `${__props.disabled && "disabled"}`]),
          onClick: handleClickEvent
        }, [
          vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
          __props.icon ? (vue.openBlock(), vue.createBlock(vue.unref(uikitBaseComponentVue3.TUIIcon), {
            key: 0,
            icon: __props.icon
          }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
          vue.createElementVNode("span", _hoisted_3, [
            vue.createTextVNode(vue.toDisplayString(__props.title) + " ", 1),
            vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
          ])
        ], 2)),
        __props.hasMore ? (vue.openBlock(), vue.createElementBlock("div", {
          key: 2,
          ref: "moreSpanRef",
          class: "icon-arrow",
          onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click-more"))
        }, [
          vue.createVNode(vue.unref(uikitBaseComponentVue3.IconArrowUp), { size: "12" })
        ], 512)) : vue.createCommentVNode("", true)
      ]);
    };
  }
});
exports.default = _sfc_main;
