import '@das-fed/upf-ui/packages/components/menu-header/style.css';
import { withInstall as h } from "@das-fed/upf-utils/with-install/index";
import { computed as m, defineComponent as f, openBlock as r, createElementBlock as i, createVNode as p, unref as s, mergeProps as _, withCtx as a, createElementVNode as l, renderSlot as c, Fragment as g, renderList as y, createBlock as H, withDirectives as x, createTextVNode as b, toDisplayString as v } from "vue";
import { Tabs as D, TabPane as k } from "ant-design-vue";
import "ant-design-vue/es/tabs/style/css";
import { vDasTooltip as E } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
function T(e) {
  return typeof e == "string" && e.includes("px") ? e : e + "px";
}
const w = (e, u) => ({
  realHeight: m(() => {
    let t;
    return e.height && (t = T(e.height)), t;
  })
}), B = { class: "das-ui-header-menu" }, M = { class: "das-tab-label" }, N = { class: "header-left" }, V = { class: "header-right" }, $ = {
  name: "DasMenuHeader",
  inheritAttrs: !1
}, A = /* @__PURE__ */ f({
  ...$,
  props: {
    height: {},
    menus: { default: () => [] }
  },
  emits: ["update:currentKey"],
  setup(e, { emit: u }) {
    const o = e, { realHeight: t } = w(o);
    return (n, C) => (r(), i("div", B, [
      p(s(D), _(n.$attrs, {
        style: { height: s(t) },
        type: "editable-card",
        contextmenu: !1,
        hideAdd: !0
      }), {
        leftExtra: a(() => [
          l("div", N, [
            c(n.$slots, "header-left")
          ])
        ]),
        rightExtra: a(() => [
          l("div", V, [
            c(n.$slots, "header-right")
          ])
        ]),
        default: a(() => [
          (r(!0), i(
            g,
            null,
            y(e.menus, (d) => (r(), H(
              s(k),
              {
                key: d.code
              },
              {
                tab: a(() => [
                  x((r(), i("div", M, [
                    b(
                      v(d.name),
                      1
                      /* TEXT */
                    )
                  ])), [
                    [s(E)]
                  ])
                ]),
                _: 2
                /* DYNAMIC */
              },
              1024
              /* DYNAMIC_SLOTS */
            ))),
            128
            /* KEYED_FRAGMENT */
          ))
        ]),
        _: 3
        /* FORWARDED */
      }, 16, ["style"])
    ]));
  }
}), K = h(A), j = { title: "Menu-Header 水平导航栏" };
export {
  K as DasMenuHeader,
  j as default
};
