import { w as t, av as e, dw as r, dM as o, ae as n, U as i, ah as a, dN as m, ai as l, aj as d, au as s, dO as c } from "./index-6d97e67f.js";
import "./lodash-226cb5b1.js";
import { lA as p, lS as u, lR as v } from "./ant-design-icons-a81e6d18.js";
import "./loglevel-5e7e37fc.js";
import { useState as b, useRef as $, useEffect as g } from "react";
import { d as y } from "./styled-components-b776227d.js";
import { M as h } from "./antd-eb0b81b8.js";
import { S as j } from "./Segmented-c92ef663.js";
import "./axios-0ffd51b8.js";
import "./redux-devtools-36ca30b8.js";
import "./alasql-f59e855e.js";
import "./react-router-38313ddc.js";
import "./fontawesome-7bcd29b1.js";
import "react-dom";
import "./dnd-kit-e0a0bf75.js";
import "./moment-d731d247.js";
import "./crypto-js-8020edb5.js";
import "./dayjs-63343308.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-6aa220db.js";
import "./websockets-80729b50.js";
import "./fetch-03ca8116.js";
import "./react-draggable-1ced44e5.js";
import "./clsx-b06d39d3.js";
import "./remark-gfm-72b87c7d.js";
import "./buffer-f89d742d.js";
import "./rehype-raw-49057806.js";
import "./parse5-31d0cb5d.js";
import "./rehype-sanitize-38a120e4.js";
import "./simplebar-react-a37a9b2a.js";
import "./react-best-gradient-color-picker-2e7ff36d.js";
import "./ua-parser-js-1d18a3f8.js";
import "./codemirror-8fe65581.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-3b3a9c7b.js";
import "./hotkeys-js-216206c9.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-a03b99c9.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-7d152aa4.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-417e3716.js";
import "./katex-05fb1c31.js";
import "./ecogis-maps-10e82de5.js";
import "./devextreme-be18bda8.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
const S = [{ name: "backgroundColor", label: "background", backgroundColor: "backgroundColor", lineHeight: "1.5" }, { name: "color", label: "text", color: "color" }], I = { items: t(o(), [{ label: e("menuItem") + " 1", itemKey: r() }]), navItemStyle: n([{ 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: n(S, "navItemHoverStyle"), navItemActiveStyle: n(S, "navItemActiveStyle") }, w = y(h)`
  height: ${(t2) => t2.$height}px;
  background-color: transparent;
  border-right: none !important;
  
  @media only screen and (max-width: 768px) {
    .ant-menu-title-content {
      display: none;
    }
  }
  
  .ant-menu-title-content {
    margin-left: 10px;
  }
  
  &&& {
    .ant-menu-item::after,
    .ant-menu-item::before {
      display: none !important;
      opacity: 0 !important;
      border-right: none !important;
      right: auto !important;
      left: auto !important;
    }
  }
  
  &&& .ant-menu-item,
  &&& .ant-menu-submenu {
    margin-bottom: ${(t2) => t2.$navItemStyle.borderWidth};
    border-right: none !important;
  }
  
  &&& .ant-menu-item,
  &&& .ant-menu-submenu > .ant-menu-submenu-title {
    ${(t2) => t2.$width && t2.$width > 150 ? `padding-left: ${t2.$navItemStyle.padding} !important;` : "padding-left: 0 !important;"}
    background-color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.color;
}} !important;
    border-radius: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.radius;
}} !important;
    border: ${(t2) => {
  var _a;
  return `1px solid ${(_a = t2.$navItemStyle) == null ? void 0 : _a.border}`;
}} !important;
    font-family: ${(t2) => {
  var _a;
  return ((_a = t2.$navItemStyle) == null ? void 0 : _a.fontFamily) && `${t2.$navItemStyle.fontFamily} !important`;
}};
  }
  
  &&& .ant-menu-submenu > .ant-menu > .ant-menu-item {
    ${(t2) => t2.$width && t2.$width > 150 ? `padding-left: ${t2.$navItemStyle.margin} !important;` : "padding-left: 0 !important;"}
    background-color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.color;
}} !important;
    border-radius: ${(t2) => {
  var _a;
  return (_a = t2.$navItemStyle) == null ? void 0 : _a.radius;
}} !important;
    border: ${(t2) => {
  var _a;
  return `1px solid ${(_a = t2.$navItemStyle) == null ? void 0 : _a.border}`;
}} !important;
  }
  
  &&& .ant-menu-title-content {
    ${(t2) => t2.$width && t2.$width < 150 ? "display: none;" : ""}
  }
  
  &&& .ant-menu-item > svg,
  &&& .ant-menu-submenu-title > svg {
    ${(t2) => t2.$width && t2.$width < 150 ? "width: 100% !important; height:50% !important" : ""}
  }
  
  &&& .ant-menu-item.ant-menu-item-active,
  &&& .ant-menu-item:hover {
    background-color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemHoverStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemHoverStyle) == null ? void 0 : _a.color;
}} !important;
    border: ${(t2) => {
  var _a;
  return `1px solid ${(_a = t2.$navItemHoverStyle) == null ? void 0 : _a.border}`;
}} !important;
  }
  
  &&& .ant-menu-item.ant-menu-item-selected {
    background-color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemActiveStyle) == null ? void 0 : _a.backgroundColor;
}} !important;
    color: ${(t2) => {
  var _a;
  return (_a = t2.$navItemActiveStyle) == null ? void 0 : _a.color;
}} !important;
    border: ${(t2) => {
  var _a;
  return `1px solid ${(_a = t2.$navItemActiveStyle) == null ? void 0 : _a.border}`;
}} !important;
  }

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

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