import '@das-fed/ui/packages/components/menu-header/style.css';
import { withInstall as b } from "@das-fed/utils/with-install/index";
import { computed as h, defineComponent as y, createElementBlock as n, openBlock as l, normalizeStyle as g, normalizeClass as v, createVNode as p, unref as s, mergeProps as k, withCtx as u, Fragment as j, renderList as _, createBlock as D, withDirectives as E, createTextVNode as H, toDisplayString as T, createElementVNode as F, renderSlot as i } from "vue";
import { Tabs as x, TabPane as B } from "ant-design-vue";
import "ant-design-vue/es/tabs/style/css";
import { vDasTooltip as C } from "@das-fed/ui/packages/components/text-tooltip/index";
import { setThemeRule as S } from "@das-fed/web/packages/theme/index";
function $(e) {
  return typeof e == "string" && e.includes("px") ? e : e + "px";
}
const w = (e, m) => ({
  realHeight: h(() => {
    let o;
    return e.height && (o = $(e.height)), o;
  })
}), c = {
  "--das-ui-layout-header-menu-border-color": {
    kjl: "3C81E0",
    cjb: "#D9D9D9",
    ssl: "#313553"
  },
  "--das-ui-layout-header-menu-background-color": {
    kjl: "#2673DC",
    cjb: "#ffffff",
    ssl: "#1B1F40"
  },
  "--das-ui-layout-header-menu-color": {
    kjl: "#FFFFFF",
    cjb: "#212121",
    ssl: "#FFFFFF"
  },
  "--das-ui-layout-header-menu-hover-background-color": {
    kjl: "rgba(24, 94, 190, 0.5)",
    cjb: "#F2F6FF",
    ssl: "rgba(255, 255, 255, 0.08)"
  },
  "--das-ui-layout-header-menu-hover-color": {
    kjl: "#FFFFFF",
    cjb: "#5582F3",
    ssl: "#FFFFFF"
  },
  "--das-ui-layout-header-menu-active-background-color": {
    kjl: "#185EBE",
    cjb: "#5582F3",
    ssl: "#5582F3"
  },
  "--das-ui-layout-header-menu-active-color": {
    kjl: "#FFFFFF",
    cjb: "#FFFFFF",
    ssl: "#FFFFFF"
  },
  "--das-ui-layout-header-menu-remove-btn-color": {
    kjl: "rgba(255, 255, 255, 0.6)",
    cjb: "rgba(170, 170, 172)",
    ssl: "rgba(255, 255, 255, 0.6)   "
  },
  "--das-ui-layout-header-menu-remove-btn-hover-color": {
    kjl: "#FFFFFF",
    cjb: "#FFFFFF",
    ssl: "#FFFFFF"
  }
}, M = { class: "das-tab-label" }, N = { class: "header-left" }, V = { class: "header-right" }, z = {
  name: "DasMenuHeader",
  inheritAttrs: !1
}, A = /* @__PURE__ */ y({
  ...z,
  props: {
    theme: { default: "default" },
    height: {},
    menus: { default: () => [] }
  },
  emits: ["update:currentKey"],
  setup(e, { emit: m }) {
    const a = e, { realHeight: o } = w(a), f = h(() => {
      const t = {};
      return a.theme === "default" || Object.keys(c).forEach((d) => {
        var r;
        t[d] = ((r = c[d]) == null ? void 0 : r[a.theme]) ?? void 0;
      }), t;
    });
    return (t, d) => (l(), n(
      "div",
      {
        class: v(["das-ui-header-menu", `theme-${t.theme}`]),
        style: g(f.value)
      },
      [
        p(s(x), k(t.$attrs, {
          style: { height: s(o) },
          type: "editable-card",
          contextmenu: !1,
          hideAdd: !0
        }), {
          leftExtra: u(() => [
            F("div", N, [
              i(t.$slots, "header-left")
            ])
          ]),
          rightExtra: u(() => [
            F("div", V, [
              i(t.$slots, "header-right")
            ])
          ]),
          default: u(() => [
            (l(!0), n(
              j,
              null,
              _(t.menus, (r) => (l(), D(
                s(B),
                {
                  key: r.code
                },
                {
                  tab: u(() => [
                    E((l(), n("div", M, [
                      H(
                        T(r.name),
                        1
                        /* TEXT */
                      )
                    ])), [
                      [s(C)]
                    ])
                  ]),
                  _: 2
                  /* DYNAMIC */
                },
                1024
                /* DYNAMIC_SLOTS */
              ))),
              128
              /* KEYED_FRAGMENT */
            ))
          ]),
          _: 3
          /* FORWARDED */
        }, 16, ["style"])
      ],
      6
      /* CLASS, STYLE */
    ));
  }
}), L = {
  "--das-ui-layout-header-menu-border-color": "#ffffff",
  "--das-ui-layout-header-menu-background-color": "#ffffff",
  "--das-ui-layout-header-menu-color": "#212121",
  "--das-ui-layout-header-menu-hover-background-color": "#F2F6FF",
  "--das-ui-layout-header-menu-hover-color": "#5582F3",
  "--das-ui-layout-header-menu-active-background-color": "#5582F3",
  "--das-ui-layout-header-menu-active-color": "#ffffff",
  "--das-ui-layout-header-menu-remove-btn-color": "rgba(170, 170, 172)",
  "--das-ui-layout-header-menu-remove-btn-hover-color": "#ffffff"
};
S(L);
const G = b(A), J = { title: "Menu-Header 水平导航栏" };
export {
  G as DasMenuHeader,
  J as default
};
