import { defineComponent as _, shallowRef as p, openBlock as k, createElementBlock as E, normalizeClass as m, unref as e, createVNode as l, withCtx as t, createElementVNode as c, withDirectives as y, vShow as w } from "vue";
import { wetProHelpProps as C } from "../types.mjs";
import "../../confirm-button/index.mjs";
import "../../count-down-button/index.mjs";
import "../../ellipsis/index.mjs";
import { WetRichEditor as x } from "../../rich-text-editor/index.mjs";
import "../../form-fileds/index.mjs";
import "../../pro-form/index.mjs";
import "../../pro-table/index.mjs";
import "../../pro-descriptions/index.mjs";
import "../../layout/index.mjs";
import "../index.mjs";
import "../../guide/index.mjs";
import { useNamespace as b, ElContainer as d, ElHeader as g, ElSpace as N, ElButton as V, ElIcon as S, ElTreeSelect as T, ElAside as z, ElTree as B, ElMain as H } from "element-plus";
import { Memo as P } from "../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.4.21/node_modules/@element-plus/icons-vue/dist/index.mjs";
const A = { class: "asise-inner-treedata" }, X = /* @__PURE__ */ _({
  name: "WetProHelp",
  __name: "index",
  props: C,
  setup(f) {
    const i = f, s = b("pro-help"), a = p(""), v = (o) => {
      (!o.children || o.children.length === 0) && (a.value = o.key);
    }, n = p(!0), h = () => {
      n.value = !n.value;
    };
    return (o, u) => (k(), E("div", {
      class: m([e(s).b()])
    }, [
      l(e(d), null, {
        default: t(() => [
          l(e(g), null, {
            default: t(() => [
              c("div", {
                class: m([e(s).e("title")])
              }, " 帮助中心 ", 2),
              l(e(N), null, {
                default: t(() => [
                  l(e(V), {
                    link: "",
                    onClick: h
                  }, {
                    default: t(() => [
                      l(e(S), { size: 16 }, {
                        default: t(() => [
                          l(e(P))
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  }),
                  l(e(T), {
                    placeholder: "问题查询",
                    modelValue: a.value,
                    "onUpdate:modelValue": u[0] || (u[0] = (r) => a.value = r),
                    props: {
                      label: "title",
                      value: "key"
                    },
                    data: i.dataTree,
                    filterable: "",
                    style: { width: "150px" },
                    size: "small"
                  }, null, 8, ["modelValue", "data"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }),
          l(e(d), null, {
            default: t(() => [
              y(l(e(z), { width: "200px" }, {
                default: t(() => [
                  c("div", A, [
                    l(e(B), {
                      props: {
                        label: "title"
                      },
                      "node-key": "key",
                      "current-node-key": a.value,
                      data: i.dataTree,
                      onNodeClick: v
                    }, null, 8, ["current-node-key", "data"])
                  ])
                ]),
                _: 1
              }, 512), [
                [w, n.value]
              ]),
              l(e(d), null, {
                default: t(() => [
                  l(e(H), { style: { padding: "0" } }, {
                    default: t(() => {
                      var r;
                      return [
                        l(e(x), {
                          style: {
                            height: "100%"
                          },
                          "initial-value": ((r = i.dataSource) == null ? void 0 : r[a.value]) || "",
                          "show-toolsbar": !1,
                          "read-only": !0
                        }, null, 8, ["initial-value"])
                      ];
                    }),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ]),
        _: 1
      })
    ], 2));
  }
});
export {
  X as default
};
