import { defineComponent, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, createVNode, renderSlot, createTextVNode, withCtx, createBlock, toDisplayString } from 'vue';
import '../../../../utils/index.mjs';
import '../config/index.mjs';
import { createNamespace } from '../../../../utils/create-namespace.mjs';
import { treeSelectDirectoryTitleEmits, treeSelectDirectoryTitleProps } from '../config/directory-title.mjs';

"use strict";
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "LlTreeSelectDirectoryTitle" },
  __name: "directory-title",
  props: treeSelectDirectoryTitleProps,
  emits: treeSelectDirectoryTitleEmits,
  setup(__props, { emit: __emit }) {
    const emits = __emit;
    const bem = createNamespace("tree-search");
    return (_ctx, _cache) => {
      const _component_ll_icon = resolveComponent("ll-icon");
      const _component_ll_button = resolveComponent("ll-button");
      const _component_ll_tooltip = resolveComponent("ll-tooltip");
      return openBlock(), createElementBlock(
        "div",
        {
          class: normalizeClass(unref(bem).e("directory-title"))
        },
        [
          createElementVNode(
            "div",
            {
              class: normalizeClass(unref(bem).e("directory-title-container"))
            },
            [
              createVNode(_component_ll_icon, {
                class: normalizeClass(unref(bem).e("directory-icon")),
                "icon-name": "icon-list"
              }, null, 8, ["class"]),
              createElementVNode(
                "span",
                {
                  class: normalizeClass(unref(bem).e("directory-text"))
                },
                [
                  renderSlot(_ctx.$slots, "title", {}, () => [
                    _cache[1] || (_cache[1] = createTextVNode(
                      "\u76EE\u5F55",
                      -1
                      /* CACHED */
                    ))
                  ])
                ],
                2
                /* CLASS */
              )
            ],
            2
            /* CLASS */
          ),
          createCommentVNode(" \u5C55\u5F00/\u6536\u8D77 "),
          createVNode(_component_ll_tooltip, {
            placement: "bottom",
            tip: _ctx.isCollapseMenu ? "\u5168\u90E8\u6536\u8D77" : "\u5168\u90E8\u5C55\u5F00"
          }, {
            title: withCtx(() => [
              createElementVNode(
                "span",
                null,
                toDisplayString(_ctx.isCollapseMenu ? "\u5168\u90E8\u6536\u8D77" : "\u5168\u90E8\u5C55\u5F00"),
                1
                /* TEXT */
              )
            ]),
            default: withCtx(() => [
              createVNode(_component_ll_button, {
                type: "text",
                class: normalizeClass(unref(bem).e("directory-button")),
                onClick: _cache[0] || (_cache[0] = ($event) => emits("collapseMenu"))
              }, {
                default: withCtx(() => [
                  _ctx.isCollapseMenu ? (openBlock(), createBlock(_component_ll_icon, {
                    key: 0,
                    class: normalizeClass(unref(bem).e("directory-icon")),
                    "icon-name": "icon-expand"
                  }, null, 8, ["class"])) : (openBlock(), createBlock(_component_ll_icon, {
                    key: 1,
                    class: normalizeClass(unref(bem).e("directory-icon")),
                    "icon-name": "icon-collapse"
                  }, null, 8, ["class"]))
                ]),
                _: 1
                /* STABLE */
              }, 8, ["class"])
            ]),
            _: 1
            /* STABLE */
          }, 8, ["tip"])
        ],
        2
        /* CLASS */
      );
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=directory-title.vue2.mjs.map
