import { av as e, c_ as t, w as n, dw as o, dM as r, dT as a, ae as i, U as m, ah as l, dN as s, ai as d, aj as c, au as p, dO as u } from "./index-8935f1b4.js";
import "./lodash-226cb5b1.js";
import { lA as v, lS as b, lR as $ } from "./ant-design-icons-14ab96af.js";
import "./loglevel-5e7e37fc.js";
import { useState as g, useRef as y, useEffect as h } from "react";
import { d as j } from "./styled-components-c6abe9a3.js";
import { M as S } from "./antd-97b654da.js";
import { S as I } from "./Segmented-136b3e00.js";
import "./axios-125479b5.js";
import "./redux-devtools-f8b1cd80.js";
import "./alasql-f59e855e.js";
import "./react-router-8d1fc2f1.js";
import "./fontawesome-89eb6278.js";
import "react-dom";
import "./dnd-kit-e67c9595.js";
import "./moment-d8baa15a.js";
import "./crypto-js-8020edb5.js";
import "./dayjs-7fc5ce65.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-2e4a9112.js";
import "./fetch-6a200310.js";
import "./react-draggable-fda4f1cb.js";
import "./remark-gfm-e9b5dec7.js";
import "./buffer-e20f80c8.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-cab52c82.js";
import "./react-best-gradient-color-picker-812be7ee.js";
import "./ua-parser-js-1d18a3f8.js";
import "./clsx-469c2c43.js";
import "./codemirror-edf161cb.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-1b0a458d.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-ae08f8b5.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-9e54e169.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-e4f7745b.js";
import "./katex-cda5b990.js";
import "./ecogis-maps-10bb29cf.js";
import "./devextreme-28d23085.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
const w = [{ name: "backgroundColor", label: "background", backgroundColor: "backgroundColor", lineHeight: "1.5" }, { name: "color", label: "text", color: "color" }], f = { dataOptions: t([{ label: e("prop.manual"), value: "manual" }, { label: e("prop.map"), value: "map" }], "manual"), items: n(r(), [{ label: e("menuItem") + " 1", value: o() }]), options: a, navItemStyle: i([{ name: "backgroundColor", label: "background", backgroundColor: "backgroundColor", lineHeight: "1.5" }, { name: "margin", label: "padding sub", margin: "padding" }, { name: "color", label: "text", color: "color" }, { name: "padding", label: "padding", padding: "padding" }, { name: "radius", label: "radius", radius: "radius", default: "10px" }, { name: "borderWidth", label: "margin bottom", borderWidth: "borderWidth" }, { name: "fontFamily", label: "font family", fontFamily: "fontFamily" }], "navItemStyle"), navItemHoverStyle: i(w, "navItemHoverStyle"), navItemActiveStyle: i(w, "navItemActiveStyle") }, k = j(S)`
  height: ${(e2) => e2.$height}px;
  background-color: transparent;
  @media only screen and (max-width: 768px) {
    .ant-menu-title-content {
      display: none;
    }
  }
  .ant-menu-title-content {
    margin-left: 10px;
  }
  .ant-menu-item,
  .ant-menu-submenu {
    margin-bottom: ${(e2) => e2.$navItemStyle.borderWidth};
  }
  .ant-menu-item,
  .ant-menu-submenu > .ant-menu-submenu-title {
    ${(e2) => e2.$width && e2.$width > 150 ? `padding-left: ${e2.$navItemStyle.padding} !important;` : "padding-left: 0 !important;"}
  }
  .ant-menu-submenu > .ant-menu > .ant-menu-item {
    ${(e2) => e2.$width && e2.$width > 150 ? `padding-left: ${e2.$navItemStyle.margin} !important;` : "padding-left: 0 !important;"}
  }
  .ant-menu-title-content {
    ${(e2) => e2.$width && e2.$width < 150 ? "display: none;" : ""}
  }
  .ant-menu-item > svg,
  .ant-menu-submenu-title > svg {
    ${(e2) => e2.$width && e2.$width < 150 ? "width: 100% !important; height:50% !important" : ""}
  }
  .ant-menu-item, [class^="ant-menu"] {
    background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.backgroundColor;
}};
    color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.color;
}};
    border-radius: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.radius;
}} !important;
    border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemStyle) == null ? void 0 : _a.border}`;
}};
    font-family: ${(e2) => {
  var _a;
  return ((_a = e2.$navItemStyle) == null ? void 0 : _a.fontFamily) && `${e2.$navItemStyle.fontFamily} !important`;
}};
  }
  .ant-menu-item-active {
    background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemHoverStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemHoverStyle) == null ? void 0 : _a.color;
}} !important;
    border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemHoverStyle) == null ? void 0 : _a.border}`;
}};
  }
  .ant-menu-item-selected {
    background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemActiveStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemActiveStyle) == null ? void 0 : _a.color;
}} !important;
    border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemActiveStyle) == null ? void 0 : _a.border}`;
}};
  }

  .ant-menu-submenu {
    .ant-menu-submenu-title {
      background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.backgroundColor;
}};
      color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.color;
}};
      border-radius: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.radius;
}} !important;
      border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemStyle) == null ? void 0 : _a.border}`;
}};
      font-family: ${(e2) => {
  var _a;
  return (_a = e2.$navItemStyle) == null ? void 0 : _a.fontFamily;
}} !important;
    }

    &.ant-menu-submenu-active {
      > .ant-menu-submenu-title {
        background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemHoverStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
        color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemHoverStyle) == null ? void 0 : _a.color;
}} !important;
        border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemHoverStyle) == null ? void 0 : _a.border}`;
}};
      }
    }
    &.ant-menu-submenu-selected {
      > .ant-menu-submenu-title {
        background-color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemActiveStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
        color: ${(e2) => {
  var _a;
  return (_a = e2.$navItemActiveStyle) == null ? void 0 : _a.color;
}} !important;
        border: ${(e2) => {
  var _a;
  return `1px solid ${(_a = e2.$navItemActiveStyle) == null ? void 0 : _a.border}`;
}};
      }
    }
  }
`, x = c(new m(f, (e2) => {
  const t2 = "manual" == e2.dataOptions ? e2.items : e2.options, [n2, o2] = g(), [r2, a2] = g(window.innerHeight), [i2, m2] = g(), l2 = v(b, { children: t2.map((e3, t3) => {
    const { hidden: n3, label: o3, items: r3, onEvent: a3 } = e3.getView(), i3 = e3.children.icon.getView();
    if (n3)
      return null;
    const m3 = r3.filter((e4) => !e4.children.hidden.getView()), l3 = [];
    m3.forEach((e4) => {
      e4.children.active.getView(), l3.push({ icon: e4.children.icon.getView(), label: e4.children.label.getView(), onSubEvent: e4.children.onEvent.getView() });
    });
    return $(b, { children: [0 == m3.length && v(S.Item, { onClick: () => a3("click"), icon: i3, children: o3 }, t3), m3.length > 0 && v(S.SubMenu, { title: o3, icon: i3, children: l3.map((e4, n4) => v(S.Item, { onClick: () => e4.onSubEvent("click"), icon: e4.icon, children: e4.label }, t3 + "-" + n4)) }, t3)] });
  }) }), s2 = y(null);
  return h(() => {
    if (s2.current) {
      const e3 = s2.current.menu.list.clientWidth;
      m2(e3);
    }
  }, [s2.current]), h(() => {
    const e3 = () => {
      a2(window.innerHeight);
    };
    return window.addEventListener("resize", e3), () => {
      window.removeEventListener("resize", e3);
    };
  }, [window.screen.height]), v(b, { children: v(k, { ref: s2, mode: "inline", onClick: (e3) => {
    o2(e3.key);
  }, selectedKeys: [n2], $navItemActiveStyle: e2.navItemActiveStyle, $navItemHoverStyle: e2.navItemHoverStyle, $navItemStyle: e2.navItemStyle, $height: r2, $width: i2, children: l2 }) });
}).setPropertyViewFn((t2) => {
  const [n2, o2] = g("normal");
  return $(b, { children: [$(l, { name: "Menu", children: [t2.dataOptions.propertyView({ label: "Mode", radioButton: true }), "manual" === t2.dataOptions.getView() ? s(t2 == null ? void 0 : t2.items) : t2.options.getPropertyView()] }), $(l, { name: e("navLayout.navItemStyle"), children: [d({}, v(I, { block: true, options: u, value: n2, onChange: (e2) => o2(e2) })), "normal" === n2 && t2.navItemStyle.getPropertyView(), "hover" === n2 && t2.navItemHoverStyle.getPropertyView(), "active" === n2 && t2.navItemActiveStyle.getPropertyView()] })] });
}).build(), [new p("items", e("navigation.itemsDesc"))]);
export {
  x as VNPTNavColComp
};
