import { createElementBlock as u, openBlock as n, createElementVNode as o, createStaticVNode as Q, resolveComponent as p, createCommentVNode as w, createVNode as h, normalizeClass as f, createTextVNode as V, toDisplayString as B, Transition as q, withCtx as _, withDirectives as W, Fragment as U, renderList as P, vShow as J, createBlock as T, resolveDynamicComponent as F, ref as le, onMounted as ae, computed as oe, withModifiers as ne } from "vue";
import { _ as y, I as K, s as g, a as X, u as A, b as se, c as Y, d as ue, e as ie, f as de, g as ce } from "./import-file-r6B0-WFX.js";
import "./user-DCzCj0wb.js";
const he = {}, ge = {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2",
  "stroke-linecap": "round",
  "stroke-linejoin": "round",
  class: "icon icon-tabler icons-tabler-outline icon-tabler-logout"
};
function pe(t, e, r, s, a, l) {
  return n(), u("svg", ge, [...e[0] || (e[0] = [
    o("path", {
      stroke: "none",
      d: "M0 0h24v24H0z",
      fill: "none"
    }, null, -1),
    o("path", { d: "M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" }, null, -1),
    o("path", { d: "M9 12h12l-3 -3" }, null, -1),
    o("path", { d: "M18 15l3 -3" }, null, -1)
  ])]);
}
const G = /* @__PURE__ */ y(he, [["render", pe]]), fe = {}, be = {
  viewBox: "0 0 1823 249",
  fill: "none",
  xmlns: "http://www.w3.org/2000/svg"
};
function xe(t, e, r, s, a, l) {
  return n(), u("svg", be, [...e[0] || (e[0] = [
    Q('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>', 10)
  ])]);
}
const ee = /* @__PURE__ */ y(fe, [["render", xe]]), ve = {
  components: { IconChevronDown: K },
  props: { route: Object, searchable: String },
  mounted() {
    var t, e;
    (e = (t = this.route) == null ? void 0 : t.menu) != null && e.some(
      (r) => {
        var s, a;
        return (r == null ? void 0 : r.path) === this.$route.path.replace("/", "") || ((a = (s = this.$route) == null ? void 0 : s.params) == null ? void 0 : a.table) === (r == null ? void 0 : r.table) && (r == null ? void 0 : r.table);
      }
    ) && (this.isOpen = !0);
  },
  watch: {
    route: {
      immediate: !0,
      handler(t) {
        t != null && t.open && (this.isOpen = !0);
      }
    }
  },
  data() {
    return {
      isOpen: !1,
      // IconComponent: null,
      arr: []
    };
  },
  computed: {
    darkMode() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.sidebarDark;
    }
  },
  methods: {
    highLight(t) {
      if (!this.searchable) return t;
      const e = this.searchable.replace(
        /[.*+?^${}()|[\]\\]/g,
        "\\$&"
      ), r = new RegExp(`(${e})(\\s*)`, "gi");
      return t.replace(
        r,
        (s, a, l) => `<span style="color:#1989fa;">${a}</span>${l}`
      );
    }
    // loadIconComponent(iconName) {
    //   if (icons[iconName]) {
    //     this.IconComponent = icons[iconName];
    //   } else {
    //     console.error(`Icon "${iconName}" not found in the icons map.`);
    //     this.IconComponent = null;
    //   }
    // },
  }
}, me = {
  key: 0,
  class: ""
}, ke = {
  key: 0,
  class: "py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"
}, _e = { key: 1 }, we = ["innerHTML"];
function ye(t, e, r, s, a, l) {
  var d, v, m, H, E, k, C, z, M, $, I, O, D, j, N;
  const b = p("IconChevronDown"), x = p("router-link");
  return (d = r.route) != null && d.menu ? (n(), u("div", me, [
    o("button", {
      onClick: e[0] || (e[0] = (c) => a.isOpen = !a.isOpen),
      class: f(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100", [
        ((m = (v = r.route) == null ? void 0 : v.menu) == null ? void 0 : m.some(
          (c) => {
            var i, L;
            return (c == null ? void 0 : c.path) === t.$route.path.replace("/", "") || (c == null ? void 0 : c.table) === ((L = (i = t.$route) == null ? void 0 : i.params) == null ? void 0 : L.table) && (c == null ? void 0 : c.table);
          }
        )) && (l.darkMode ? "bg-white/10" : "bg-gray-100"),
        {
          "text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10": l.darkMode,
          "text-gray-800 hover:bg-gray-100 hover:text-gray-800  focus:bg-gray-100": !l.darkMode
        }
      ]])
    }, [
      V(B((H = r.route) == null ? void 0 : H.ua) + " ", 1),
      (E = r.route) != null && E.new ? (n(), u("span", ke, "Нове")) : w("", !0),
      h(b, {
        class: f([[a.isOpen && "-rotate-180"], "ml-auto duration-300 flex-shrink-0"]),
        width: "14",
        height: "14"
      }, null, 8, ["class"])
    ], 2),
    h(q, { name: "fade" }, {
      default: _(() => {
        var c;
        return [
          W(o("ul", {
            class: f(["ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer", l.darkMode ? "before:bg-white/10" : "before:bg-gray-100"])
          }, [
            (n(!0), u(U, null, P((c = r.route) == null ? void 0 : c.menu, (i, L) => {
              var Z, S;
              return n(), u("li", {
                key: L,
                class: "w-full"
              }, [
                h(x, {
                  innerHTML: l.highLight(i == null ? void 0 : i.ua),
                  to: "/" + (i == null ? void 0 : i.path),
                  class: f([[
                    ((i == null ? void 0 : i.path) === t.$route.path.replace("/", "") || ((S = (Z = t.$route) == null ? void 0 : Z.params) == null ? void 0 : S.table) === (i == null ? void 0 : i.table) && (i == null ? void 0 : i.table)) && (l.darkMode ? "bg-white/10" : "bg-gray-100"),
                    {
                      "text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10": l.darkMode,
                      "text-gray-800 hover:bg-gray-100 hover:text-gray-800  focus:bg-gray-100": !l.darkMode
                    }
                  ], "block px-3 py-2 text-sm rounded-lg focus:outline-none focus:bg-gray-100"])
                }, null, 8, ["innerHTML", "to", "class"])
              ]);
            }), 128))
          ], 2), [
            [J, a.isOpen]
          ])
        ];
      }),
      _: 1
    })
  ])) : (k = r.route) != null && k.hidden ? w("", !0) : (n(), u("div", _e, [
    h(x, {
      to: ((z = (C = r.route) == null ? void 0 : C.path) == null ? void 0 : z[0]) === "/" ? (M = r.route) == null ? void 0 : M.path : "/" + (($ = r.route) == null ? void 0 : $.path),
      class: f([[
        (((I = r.route) == null ? void 0 : I.path.replace("/", "")) === t.$route.path.replace("/", "") || ((D = (O = t.$route) == null ? void 0 : O.params) == null ? void 0 : D.table) === ((j = r.route) == null ? void 0 : j.table) && ((N = r.route) == null ? void 0 : N.table)) && (l.darkMode ? "bg-white/10" : "bg-gray-100"),
        {
          "text-white/80 hover:bg-white/10 hover:text-white/80 focus:bg-white/10 ": l.darkMode,
          "text-gray-800 hover:bg-gray-100 hover:text-gray-800  focus:bg-gray-100 ": !l.darkMode
        }
      ], "flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3"])
    }, {
      default: _(() => {
        var c;
        return [
          o("span", {
            innerHTML: l.highLight((c = r.route) == null ? void 0 : c.ua)
          }, null, 8, we)
        ];
      }),
      _: 1
    }, 8, ["to", "class"])
  ]));
}
const Ce = /* @__PURE__ */ y(ve, [["render", ye]]), ze = {}, Me = {
  class: "flex-shrink-0 size-4",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2",
  "stroke-linecap": "round",
  "stroke-linejoin": "round"
};
function He(t, e, r, s, a, l) {
  return n(), u("svg", Me, [...e[0] || (e[0] = [
    o("circle", {
      cx: "12",
      cy: "12",
      r: "10"
    }, null, -1),
    o("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, null, -1),
    o("path", { d: "M12 17h.01" }, null, -1)
  ])]);
}
const te = /* @__PURE__ */ y(ze, [["render", He]]), Le = {}, Ve = {
  class: "shrink-0 size-4 rounded-full",
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 512 512"
};
function $e(t, e, r, s, a, l) {
  return n(), u("svg", Ve, [...e[0] || (e[0] = [
    Q('<g fill-rule="evenodd"><g stroke-width="1pt"><path fill="#bd3d44" d="M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z" transform="scale(3.9385)"></path></g><path fill="#192f5d" d="M0 0h98.8v70H0z" transform="scale(3.9385)"></path><path fill="#fff" d="M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z" transform="scale(3.9385)"></path></g>', 1)
  ])]);
}
const Ie = /* @__PURE__ */ y(Le, [["render", $e]]), Oe = {}, De = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  version: "1.1",
  width: "256",
  height: "256",
  viewBox: "0 0 256 256",
  "xml:space": "preserve"
};
function je(t, e, r, s, a, l) {
  return n(), u("svg", De, [...e[0] || (e[0] = [
    o("defs", null, null, -1),
    o("g", {
      style: { stroke: "none", "stroke-width": "0", "stroke-dasharray": "none", "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "10", fill: "none", "fill-rule": "nonzero", opacity: "1" },
      transform: "translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"
    }, [
      o("path", {
        d: "M 45 90 C 20.147 90 0 69.853 0 45 h 90 C 90 69.853 69.853 90 45 90 z",
        style: { stroke: "none", "stroke-width": "1", "stroke-dasharray": "none", "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "10", fill: "rgb(255,213,0)", "fill-rule": "nonzero", opacity: "1" },
        transform: " matrix(1 0 0 1 0 0) ",
        "stroke-linecap": "round"
      }),
      o("path", {
        d: "M 45 0 C 20.147 0 0 20.147 0 45 h 90 C 90 20.147 69.853 0 45 0 z",
        style: { stroke: "none", "stroke-width": "1", "stroke-dasharray": "none", "stroke-linecap": "butt", "stroke-linejoin": "miter", "stroke-miterlimit": "10", fill: "rgb(0,91,187)", "fill-rule": "nonzero", opacity: "1" },
        transform: " matrix(1 0 0 1 0 0) ",
        "stroke-linecap": "round"
      })
    ], -1)
  ])]);
}
const Ne = /* @__PURE__ */ y(Oe, [["render", je]]), Be = {}, Ee = {
  class: "shrink-0 size-3.5 text-gray-800 dark:text-neutral-200",
  xmlns: "http:.w3.org/2000/svg",
  width: "24",
  height: "24",
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  "stroke-width": "2",
  "stroke-linecap": "round",
  "stroke-linejoin": "round"
};
function Te(t, e, r, s, a, l) {
  return n(), u("svg", Ee, [...e[0] || (e[0] = [
    o("polyline", { points: "20 6 9 17 4 12" }, null, -1)
  ])]);
}
const Ue = /* @__PURE__ */ y(Be, [["render", Te]]), Ze = {
  components: { IconQuestion: te, IconUSA: Ie, IconUkraine: Ne, IconTick: Ue },
  props: ["docs", "languages"],
  data() {
    return {
      currentLang: "ukraine",
      languagesOptions: [
        {
          titleEN: "English",
          titleUA: "Англійська",
          id: "english",
          icon: "IconUSA"
        },
        {
          titleEN: "Ukraine",
          titleUA: "Українська",
          id: "ukraine",
          icon: "IconUkraine"
        }
      ]
    };
  },
  computed: {
    selectedLang() {
      return this.languagesOptions.find((t) => t.id === this.currentLang);
    },
    darkMode() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.sidebarDark;
    }
  },
  methods: {
    changeLang(t) {
      this.$refs.langPopover.togglePopover(), this.currentLang = t;
    }
  }
}, Se = { class: "flex justify-center items-center gap-x-2" }, Ae = ["onClick"], Pe = { class: "text-gray-800" }, Fe = { class: "ms-auto" }, Qe = { class: "truncate" };
function Ge(t, e, r, s, a, l) {
  const b = p("IconTick"), x = p("VsPopover");
  return r.docs || r.languages ? (n(), u("div", {
    key: 0,
    class: f(["py-2 px-5 border-t dark:border-neutral-700", l.darkMode ? "border-white/10 " : "border-gray-200"])
  }, [
    o("div", Se, [
      h(x, {
        trigger: "click",
        placement: "top",
        ref: "langPopover"
      }, {
        reference: _(() => {
          var d, v, m;
          return [
            o("button", {
              type: "button",
              "aria-expanded": "false",
              class: f([
                "relative py-2 px-3 flex items-center gap-x-2 text-nowrap w-full cursor-pointer border rounded-full text-start text-sm text-gray-800 focus:outline-none",
                l.darkMode ? "border-white/10 bg-transparent text-white/80 hover:bg-white/10 focus:bg-white/10" : "border-gray-200 bg-white hover:bg-gray-100 focus:bg-gray-100"
              ])
            }, [
              o("div", null, [
                (n(), T(F((d = l.selectedLang) == null ? void 0 : d.icon), { class: "w-[16px] h-[16px] rounded-full" }))
              ]),
              o("span", Qe, B(a.currentLang === "ukraine" ? (v = l.selectedLang) == null ? void 0 : v.titleUA : (m = l.selectedLang) == null ? void 0 : m.titleEN), 1)
            ], 2)
          ];
        }),
        default: _(() => [
          o("div", null, [
            (n(!0), u(U, null, P(a.languagesOptions, (d) => (n(), u("button", {
              key: d.id,
              type: "button",
              onClick: (v) => l.changeLang(d.id),
              class: f(["flex items-center gap-x-2 cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 selected", (d == null ? void 0 : d.id) === a.currentLang ? "bg-gray-100" : ""])
            }, [
              (n(), T(F(d == null ? void 0 : d.icon), { class: "w-[16px] h-[16px] rounded-full" })),
              o("div", Pe, B(a.currentLang === "ukraine" ? d == null ? void 0 : d.titleUA : d == null ? void 0 : d.titleEN), 1),
              o("span", Fe, [
                (d == null ? void 0 : d.id) === a.currentLang ? (n(), T(b, { key: 0 })) : w("", !0)
              ])
            ], 10, Ae))), 128))
          ])
        ]),
        _: 1
      }, 512)
    ])
  ], 2)) : w("", !0);
}
const re = /* @__PURE__ */ y(Ze, [["render", Ge]]), Re = {
  components: { IconLogout: G, NavbarItem: Ce, IconLogo: ee, IconSearch: X, NavbarFooter: re },
  data() {
    return {
      activeIndex: null,
      searchValue: ""
    };
  },
  computed: {
    data() {
      var t;
      return (t = this.searchValue) != null && t.trim() ? this.filterMenu(A.value, this.searchValue) : A.value;
    },
    logo() {
      var t, e, r;
      return ((e = (t = this.$settings) == null ? void 0 : t.admin) == null ? void 0 : e.logo) || ((r = g.value) == null ? void 0 : r.logo) || "/assets/logo.svg";
    },
    docs() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.docs;
    },
    languages() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.languages;
    },
    darkMode() {
      var t, e;
      return ((e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.sidebarDark) || !1;
    },
    darkColor() {
      var e, r, s, a, l, b;
      const t = ((r = (e = g) == null ? void 0 : e.value) == null ? void 0 : r.sidebarColor) || ((a = (s = g) == null ? void 0 : s.value) == null ? void 0 : a.color) || ((b = (l = g) == null ? void 0 : l.value) != null && b.sidebarDark ? "blue" : "white");
      return t.includes("-") || t.includes("[") ? t : t + "-950";
    }
  },
  watch: {
    "$route.path"() {
      this.$parent.showMenu = !1;
    }
  },
  methods: {
    filterMenu(t, e) {
      return t.map((r) => {
        var s, a;
        if (r.menu) {
          const l = this.filterMenu(r.menu, e);
          if (l.length > 0)
            return { ...r, menu: l, open: !0 };
        } else if ((a = (s = r.ua) == null ? void 0 : s.toLowerCase()) != null && a.includes(e.toLowerCase()))
          return r;
        return null;
      }).filter(Boolean);
    }
  }
}, qe = { class: "h-[46px] w-full px-5 lg:px-8 mb-[10px]" }, We = { href: "/" }, Je = ["src"], Ke = { class: "px-2 lg:px-5" }, Xe = { class: "px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3" }, Ye = {
  key: 0,
  class: "flex flex-col gap-y-1"
};
function et(t, e, r, s, a, l) {
  var v;
  const b = p("VsText"), x = p("NavbarItem"), d = p("NavbarFooter");
  return n(), u("div", {
    class: f(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] pt-3 border-r w-[260px] top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]", {
      "left-0": t.$parent.showMenu,
      ["bg-" + l.darkColor]: l.darkColor,
      "bg-white": !l.darkMode && !l.darkColor
    }])
  }, [
    o("div", qe, [
      o("a", We, [
        o("img", {
          src: l.logo,
          class: "object-contain w-full h-full"
        }, null, 8, Je)
      ])
    ]),
    o("div", Ke, [
      h(b, {
        type: "text",
        modelValue: a.searchValue,
        "onUpdate:modelValue": e[0] || (e[0] = (m) => a.searchValue = m),
        clearable: !0,
        icon: "search",
        "icon-position": "left",
        placeholder: "Пошук по меню",
        class: f(["[&>input]:h-[38px]", {
          "[&>input]:bg-[#172554] [&>input]:text-white/80 [&>input]:placeholder:text-white/40 [&>input]:border [&>input]:border-white/50": l.darkMode,
          ["[&>input]:bg-" + l.darkColor]: l.darkColor,
          ["focus:[&>input]:border-" + l.darkColor + "-500"]: l.darkMode
        }])
      }, null, 8, ["modelValue", "class"])
    ]),
    o("div", {
      class: f([
        "py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",
        l.languages || l.docs ? "h-[calc(100vh-161px)]" : "h-[calc(100vh-110px)]"
      ])
    }, [
      o("nav", Xe, [
        (v = l.data) != null && v.length ? (n(), u("ul", Ye, [
          (n(!0), u(U, null, P(l.data, (m, H) => (n(), u("li", {
            key: H,
            class: "flex flex-col gap-[6px]"
          }, [
            h(x, {
              route: m,
              searchable: a.searchValue
            }, null, 8, ["route", "searchable"])
          ]))), 128))
        ])) : (n(), u("div", {
          key: 1,
          class: f(["text-lg mt-[20px]", {
            "text-white/80": l.darkMode,
            "text-gray-800": !l.darkMode
          }])
        }, " Не знайдено ", 2))
      ])
    ], 2),
    l.docs || l.languages ? (n(), T(d, {
      key: 0,
      docs: l.docs,
      languages: l.languages
    }, null, 8, ["docs", "languages"])) : w("", !0)
  ], 2);
}
const R = /* @__PURE__ */ y(Re, [["render", et], ["__scopeId", "data-v-7817bab2"]]), tt = {
  components: { IconChevronDown: K },
  props: { route: Object, searchable: String },
  mounted() {
    var t, e;
    (e = (t = this.route) == null ? void 0 : t.menu) != null && e.some(
      (r) => {
        var s, a;
        return (r == null ? void 0 : r.path) === this.$route.path.replace("/", "") || ((a = (s = this.$route) == null ? void 0 : s.params) == null ? void 0 : a.table) === (r == null ? void 0 : r.table) && (r == null ? void 0 : r.table);
      }
    ) && (this.isOpen = !0);
  },
  watch: {
    route: {
      immediate: !0,
      handler(t) {
        t != null && t.open && (this.isOpen = !0);
      }
    }
  },
  data() {
    return {
      isOpen: !1,
      arr: []
    };
  },
  computed: {
    darkMode() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.sidebarDark;
    }
  },
  methods: {
    highLight(t) {
      if (!this.searchable) return t;
      const e = this.searchable.replace(
        /[.*+?^${}()|[\]\\]/g,
        "\\$&"
      ), r = new RegExp(`(${e})(\\s*)`, "gi");
      return t.replace(
        r,
        (s, a, l) => `<span style="color:#1989fa;">${a}</span>${l}`
      );
    }
  }
}, rt = {
  key: 0,
  class: ""
}, lt = {
  key: 0,
  class: "py-0.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium bg-blue-100 text-blue-800 rounded-full dark:bg-blue-500/10 dark:text-blue-500"
}, at = { class: "ml-[28px] pt-[6px] before:block before:absolute relative w-[calc(100%-28px)] before:bg-gray-200 flex-col gap-y-1.5 inline-flex before:w-[2px] before:h-[100%] before:left-[-10px] cursor-pointer" }, ot = { key: 1 }, nt = ["innerHTML"];
function st(t, e, r, s, a, l) {
  var d, v, m, H, E, k, C, z, M, $, I, O, D, j, N;
  const b = p("IconChevronDown"), x = p("router-link");
  return (d = r.route) != null && d.menu ? (n(), u("div", rt, [
    o("button", {
      onClick: e[0] || (e[0] = (c) => a.isOpen = !a.isOpen),
      class: f(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-200", [
        ((m = (v = r.route) == null ? void 0 : v.menu) == null ? void 0 : m.some(
          (c) => {
            var i, L;
            return (c == null ? void 0 : c.path) === t.$route.path.replace("/", "") || (c == null ? void 0 : c.table) === ((L = (i = t.$route) == null ? void 0 : i.params) == null ? void 0 : L.table) && (c == null ? void 0 : c.table);
          }
        )) && "bg-gray-200"
      ]])
    }, [
      V(B((H = r.route) == null ? void 0 : H.ua) + " ", 1),
      (E = r.route) != null && E.new ? (n(), u("span", lt, "Нове")) : w("", !0),
      h(b, {
        class: f([[a.isOpen && "-rotate-180"], "ml-auto duration-300"]),
        width: "14",
        height: "14"
      }, null, 8, ["class"])
    ], 2),
    h(q, { name: "fade" }, {
      default: _(() => {
        var c;
        return [
          W(o("ul", at, [
            (n(!0), u(U, null, P((c = r.route) == null ? void 0 : c.menu, (i, L) => {
              var Z, S;
              return n(), u("li", {
                key: L,
                class: "w-full"
              }, [
                h(x, {
                  innerHTML: l.highLight(i == null ? void 0 : i.ua),
                  to: "/" + (i == null ? void 0 : i.path),
                  class: f([[
                    ((i == null ? void 0 : i.path) === t.$route.path.replace("/", "") || ((S = (Z = t.$route) == null ? void 0 : Z.params) == null ? void 0 : S.table) === (i == null ? void 0 : i.table) && (i == null ? void 0 : i.table)) && "bg-gray-200"
                  ], "block px-3 py-2 text-sm rounded-lg focus:outline-none hover:bg-gray-200 focus:bg-gray-200"])
                }, null, 8, ["innerHTML", "to", "class"])
              ]);
            }), 128))
          ], 512), [
            [J, a.isOpen]
          ])
        ];
      }),
      _: 1
    })
  ])) : (k = r.route) != null && k.hidden ? w("", !0) : (n(), u("div", ot, [
    h(x, {
      to: ((z = (C = r.route) == null ? void 0 : C.path) == null ? void 0 : z[0]) === "/" ? (M = r.route) == null ? void 0 : M.path : "/" + (($ = r.route) == null ? void 0 : $.path),
      class: f([[
        (((I = r.route) == null ? void 0 : I.path.replace("/", "")) === t.$route.path.replace("/", "") || ((D = (O = t.$route) == null ? void 0 : O.params) == null ? void 0 : D.table) === ((j = r.route) == null ? void 0 : j.table) && ((N = r.route) == null ? void 0 : N.table)) && "bg-gray-200"
      ], "flex items-center w-full px-3 py-2 text-sm text-gray-800 duration-300 rounded-lg gap-x-3 hover:bg-gray-200 focus:bg-gray-200"])
    }, {
      default: _(() => {
        var c;
        return [
          o("span", {
            innerHTML: l.highLight((c = r.route) == null ? void 0 : c.ua)
          }, null, 8, nt)
        ];
      }),
      _: 1
    }, 8, ["to", "class"])
  ]));
}
const ut = /* @__PURE__ */ y(tt, [["render", st]]), it = { class: "relative w-fit mx-auto" }, dt = {
  key: 0,
  class: "w-60 duration absolute top-full left-0 z-20 bg-white rounded-xl shadow-xl block"
}, ct = { class: "p-1" }, ht = {
  __name: "navbar-gray-dropdown",
  setup(t) {
    const e = le(!1);
    return ae(() => {
      document.addEventListener("click", (r) => {
        r.target.closest(".navbar-gray-dropdown") || (e.value = !1);
      });
    }), (r, s) => {
      var l;
      const a = p("router-link");
      return n(), u("div", it, [
        o("button", {
          onClick: s[0] || (s[0] = (b) => e.value = !e.value),
          type: "button",
          class: "py-1 px-2 navbar-gray-dropdown inline-flex justify-center items-center gap-x-1 font-semibold rounded-lg text-gray-800 hover:text-purple-600 focus:outline-hidden focus:text-purple-600 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-300 dark:hover:text-purple-500 dark:focus:text-purple-500"
        }, [
          V(B((l = r.$user) == null ? void 0 : l.user_name) + " ", 1),
          h(se, {
            width: "16",
            height: "16"
          })
        ]),
        e.value ? (n(), u("div", dt, [
          o("div", ct, [
            s[2] || (s[2] = o("a", {
              class: "flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
              href: "#"
            }, " Профіль ", -1)),
            h(a, {
              class: "flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
              to: "/admin.settings"
            }, {
              default: _(() => [...s[1] || (s[1] = [
                V(" Налаштування ", -1)
              ])]),
              _: 1
            })
          ]),
          s[3] || (s[3] = o("div", { class: "p-1 border-t border-gray-200 dark:border-neutral-700" }, [
            o("a", {
              class: "flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-hidden focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
              href: "/logout"
            }, " Вийти ")
          ], -1))
        ])) : w("", !0)
      ]);
    };
  }
}, gt = { class: "p-4 flex flex-col justify-center border-b relative max-h-[192px]" }, pt = {
  __name: "navbar-gray-user",
  setup(t) {
    return (e, r) => (n(), u("div", gt, [
      h(Y, {
        class: "!absolute top-[8px] right-[8px]",
        placement: "left"
      }),
      r[0] || (r[0] = o("div", { class: "flex size-24 justify-center items-center shrink-0 rounded-full overflow-hidden mx-auto mb-2" }, [
        o("img", {
          class: "object-cover h-[130px] w-[130px]",
          src: "https://media.istockphoto.com/id/1337144146/vector/default-avatar-profile-icon-vector.jpg?s=612x612&w=0&k=20&c=BIbFwuv7FxTWvh5S3vB6bkT0Qv8Vn8N5Ffseq84ClGI=",
          alt: "Avatar"
        })
      ], -1)),
      h(ht)
    ]));
  }
}, ft = {
  components: {
    IconLogout: G,
    NavbarItem: ut,
    IconLogo: ee,
    IconSearch: X,
    NavbarFooter: re,
    NavbarUser: pt
  },
  data() {
    return {
      activeIndex: null,
      searchValue: ""
    };
  },
  computed: {
    data() {
      var t;
      return (t = this.searchValue) != null && t.trim() ? this.filterMenu(A.value, this.searchValue) : A.value;
    },
    logo() {
      var t, e, r;
      return ((e = (t = this.$settings) == null ? void 0 : t.admin) == null ? void 0 : e.logo) || ((r = g.value) == null ? void 0 : r.logo) || "/assets/logo.svg";
    },
    docs() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.docs;
    },
    languages() {
      var t, e;
      return (e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.languages;
    },
    darkMode() {
      var t, e;
      return ((e = (t = g) == null ? void 0 : t.value) == null ? void 0 : e.sidebarDark) || !1;
    },
    darkColor() {
      var e, r, s, a, l, b;
      const t = ((r = (e = g) == null ? void 0 : e.value) == null ? void 0 : r.sidebarColor) || ((a = (s = g) == null ? void 0 : s.value) == null ? void 0 : a.color) || ((b = (l = g) == null ? void 0 : l.value) != null && b.sidebarDark ? "blue" : "white");
      return t.includes("-") || t.includes("[") ? t : t + "-950";
    }
  },
  watch: {
    "$route.path"() {
      this.$parent.showMenu = !1;
    }
  },
  methods: {
    filterMenu(t, e) {
      return t.map((r) => {
        var s, a;
        if (r.menu) {
          const l = this.filterMenu(r.menu, e);
          if (l.length > 0)
            return { ...r, menu: l, open: !0 };
        } else if ((a = (s = r.ua) == null ? void 0 : s.toLowerCase()) != null && a.includes(e.toLowerCase()))
          return r;
        return null;
      }).filter(Boolean);
    }
  }
}, bt = { class: "px-2 lg:px-5 flex flex-col flex-wrap w-full pb-3" }, xt = {
  key: 0,
  class: "flex flex-col gap-y-1"
}, vt = { class: "h-[55px] border-t w-full px-5 shrink-0 lg:px-5 flex items-center" }, mt = { href: "/" }, kt = ["src"];
function _t(t, e, r, s, a, l) {
  var d;
  const b = p("NavbarUser"), x = p("NavbarItem");
  return n(), u("div", {
    class: f(["lg:flex lg:relative lg:left-0 flex-col h-[100vh] border-r w-[260px] bg-gray-100 top-0 bottom-0 shrink-0 absolute transition left-[-100%] z-[11]", {
      "left-0": t.$parent.showMenu
    }])
  }, [
    h(b),
    o("div", {
      class: f([
        "py-[10px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",
        l.languages || l.docs ? "h-[calc(100vh-161px)]" : "h-[calc(100vh-110px)]"
      ])
    }, [
      o("nav", bt, [
        (d = l.data) != null && d.length ? (n(), u("ul", xt, [
          (n(!0), u(U, null, P(l.data, (v, m) => (n(), u("li", {
            key: m,
            class: "flex flex-col gap-[6px]"
          }, [
            h(x, {
              route: v,
              searchable: a.searchValue
            }, null, 8, ["route", "searchable"])
          ]))), 128))
        ])) : (n(), u("div", {
          key: 1,
          class: f(["text-lg mt-[20px]", {
            "text-white/80": l.darkMode,
            "text-gray-800": !l.darkMode
          }])
        }, " Не знайдено ", 2))
      ])
    ], 2),
    o("div", vt, [
      o("a", mt, [
        o("img", {
          src: l.logo,
          class: "object-contain max-h-[40px]"
        }, null, 8, kt)
      ])
    ])
  ], 2);
}
const wt = /* @__PURE__ */ y(ft, [["render", _t], ["__scopeId", "data-v-3cea82a7"]]), yt = {
  __name: "navbar",
  setup(t) {
    const e = {
      default: R,
      gray: wt
    }, r = oe(
      () => {
        var s;
        return e[(s = g.value) == null ? void 0 : s.navbar] || R;
      }
    );
    return (s, a) => (n(), T(F(r.value)));
  }
}, Ct = {
  components: {
    IconQuestion: te,
    IconUser: ie,
    AdminNotification: Y,
    IconUserOutline: ue,
    IconLogout: G
  },
  data() {
    return {
      userData: null,
      isVisible: !1
    };
  },
  computed: {
    headerBadgeTitle() {
      var t;
      return (t = g.value) == null ? void 0 : t.headerBadge;
    },
    headerBadgeColor() {
      var t;
      return (t = g.value) == null ? void 0 : t.headerBadgeColor;
    }
  },
  watch: {
    isVisible(t) {
      t ? setTimeout(
        () => window.addEventListener("click", this.closeOnOutsideClick),
        0
      ) : window.removeEventListener("click", this.closeOnOutsideClick);
    }
  },
  created() {
    this.userData = this.$user, ce.value = this.$settings;
  },
  methods: {
    async logout() {
      try {
        await de.get("/logout"), await window.history.pushState({}, "", "/login"), await location.reload(), localStorage.removeItem("user");
      } catch {
      }
    },
    closeOnOutsideClick() {
      this.isVisible = !1;
    }
  },
  beforeUnmount() {
    window.removeEventListener("click", this.closeOnOutsideClick);
  }
}, zt = { class: "flex items-center gap-[6px]" }, Mt = {
  href: "/docs-user",
  class: "size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
}, Ht = {
  href: "/docs-user",
  class: "size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
}, Lt = { class: "relative" }, Vt = ["src"], $t = {
  key: 1,
  class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
}, It = ["src"], Ot = {
  key: 1,
  class: "flex items-center justify-center bg-gray-200 rounded-full size-10"
}, Dt = { class: "grow" }, jt = { class: "block text-sm font-medium text-gray-800 dark:text-neutral-200" }, Nt = { class: "text-xs text-gray-500 dark:text-neutral-500" }, Bt = { class: "flex flex-col space-y-0.5" };
function Et(t, e, r, s, a, l) {
  const b = p("IconQuestion"), x = p("VsPopover"), d = p("AdminNotification"), v = p("IconUser"), m = p("router-link"), H = p("IconUserOutline"), E = p("IconLogout");
  return n(), u("div", {
    class: f(["h-[58px] border-b flex items-center px-[20px]", l.headerBadgeTitle ? "justify-between" : "justify-end"])
  }, [
    l.headerBadgeTitle ? (n(), u("div", {
      key: 0,
      class: f(["py-1.5 px-2.5 flex justify-center items-center text-white hover:bg-gray-900 focus:bg-gray-900 dark:bg-neutral-100 dark:text-neutral-800 dark:hover:bg-white dark:focus:bg-white.class text-nowrap text-xs sm:text-[13px] rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none dark:text-neutral-400", {
        ["bg-" + l.headerBadgeColor]: l.headerBadgeColor,
        "bg-gray-800": !l.headerBadgeColor
      }])
    }, B(l.headerBadgeTitle), 3)) : w("", !0),
    o("div", {
      class: "flex lg:hidden",
      onClick: e[0] || (e[0] = (k) => t.$parent.showMenu = !0)
    }, [...e[4] || (e[4] = [
      Q('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l16 0"></path><path d="M4 12l16 0"></path><path d="M4 18l16 0"></path></svg>', 1)
    ])]),
    o("div", zt, [
      h(x, { trigger: "hover" }, {
        reference: _(() => [
          o("a", Mt, [
            h(b, {
              height: "24",
              width: "24"
            })
          ])
        ]),
        default: _(() => [
          e[5] || (e[5] = V(" Допомога ", -1))
        ]),
        _: 1
      }),
      h(x, { trigger: "hover" }, {
        reference: _(() => [
          o("a", Ht, [
            h(d)
          ])
        ]),
        default: _(() => [
          e[6] || (e[6] = V(" Сповіщення ", -1))
        ]),
        _: 1
      }),
      e[12] || (e[12] = o("div", { class: "h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]" }, null, -1)),
      o("div", Lt, [
        o("div", {
          onClick: e[1] || (e[1] = (k) => a.isVisible = !0),
          class: "cursor-pointer"
        }, [
          h(x, { trigger: "hover" }, {
            reference: _(() => {
              var k, C, z, M;
              return [
                (C = (k = a.userData) == null ? void 0 : k.user) != null && C.avatar ? (n(), u("img", {
                  key: 0,
                  class: "flex-shrink-0 size-[30px] rounded-full",
                  src: (M = (z = a.userData) == null ? void 0 : z.user) == null ? void 0 : M.avatar,
                  alt: "Image Description"
                }, null, 8, Vt)) : (n(), u("div", $t, [
                  h(v)
                ]))
              ];
            }),
            default: _(() => [
              e[7] || (e[7] = V(" Профіль ", -1))
            ]),
            _: 1
          })
        ]),
        a.isVisible ? (n(), u("div", {
          key: 0,
          onClick: e[3] || (e[3] = ne(() => {
          }, ["stop"])),
          class: "fixed p-2 bg-white w-[240px] top-[55px] right-[20px] rounded-xl z-[1] shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_40px_10px_rgba(0,0,0,0.2)] dark:bg-neutral-900 block"
        }, [
          h(m, {
            to: "profile",
            disabled: !0,
            class: "py-2 px-2.5 flex items-center gap-3 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"
          }, {
            default: _(() => {
              var k, C, z, M, $, I, O, D, j, N;
              return [
                (C = (k = a.userData) == null ? void 0 : k.user) != null && C.avatar ? (n(), u("img", {
                  key: 0,
                  class: "rounded-full shrink-0 size-10",
                  src: (M = (z = a.userData) == null ? void 0 : z.user) == null ? void 0 : M.avatar,
                  alt: "Image Description"
                }, null, 8, It)) : (n(), u("div", Ot, [
                  h(v, { class: "w-[16px]" })
                ])),
                o("div", Dt, [
                  o("span", jt, B(((I = ($ = a.userData) == null ? void 0 : $.user) == null ? void 0 : I.username) || ((D = (O = a.userData) == null ? void 0 : O.user) == null ? void 0 : D.user_name) || "User User"), 1),
                  o("p", Nt, B(((N = (j = a.userData) == null ? void 0 : j.user) == null ? void 0 : N.email) || "email не вказано"), 1)
                ])
              ];
            }),
            _: 1
          }),
          e[10] || (e[10] = o("div", { class: "my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700" }, null, -1)),
          o("ul", Bt, [
            o("li", null, [
              h(m, {
                to: "profile",
                class: "w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
                disabled: "true"
              }, {
                default: _(() => [
                  h(H, { class: "size-4" }),
                  e[8] || (e[8] = V(" Профіль ", -1))
                ]),
                _: 1
              })
            ])
          ]),
          e[11] || (e[11] = o("div", { class: "my-2 mx-2.5 h-px bg-gray-200 dark:bg-neutral-700" }, null, -1)),
          o("p", null, [
            o("button", {
              type: "button",
              onClick: e[2] || (e[2] = (...k) => l.logout && l.logout(...k)),
              class: "w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-red-500 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 dark:hover:text-red-500 dark:focus:text-red-500"
            }, [
              h(E, { class: "size-4" }),
              e[9] || (e[9] = V(" Вийти ", -1))
            ])
          ])
        ])) : w("", !0)
      ])
    ])
  ], 2);
}
const Tt = /* @__PURE__ */ y(Ct, [["render", Et]]), Ut = {
  components: { navbar: yt, AdminHeader: Tt },
  data() {
    return {
      showMenu: !1
    };
  },
  computed: {
    isMenu() {
      return A.value || null;
    },
    header() {
      var t, e;
      return ((t = g.value) == null ? void 0 : t.header) === !1 ? !1 : ((e = g.value) == null ? void 0 : e.header) || "admin-header";
    }
  }
}, Zt = { class: "admin-wrapper" }, St = { class: "flex flex-col w-full" };
function At(t, e, r, s, a, l) {
  const b = p("navbar"), x = p("router-view");
  return n(), u("div", Zt, [
    h(b),
    a.showMenu ? (n(), u("div", {
      key: 0,
      onClick: e[0] || (e[0] = (d) => a.showMenu = !1),
      class: "z-[10] lg:hidden transition duration fixed inset-0 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 dark:bg-neutral-900"
    })) : w("", !0),
    o("div", St, [
      l.isMenu ? (n(), u(U, { key: 0 }, [
        l.header ? (n(), T(F(l.header), { key: 0 })) : w("", !0),
        h(x)
      ], 64)) : w("", !0)
    ])
  ]);
}
const Gt = /* @__PURE__ */ y(Ut, [["render", At], ["__scopeId", "data-v-804a7309"]]);
export {
  Gt as default
};
