@opengis/admin 0.1.59 → 0.1.60

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,461 +0,0 @@
1
- import { _ as h, I as T, u as E, a as S } from "./import-file-BBA7riUK.js";
2
- import { openBlock as r, createElementBlock as l, createElementVNode as o, createStaticVNode as A, resolveComponent as p, normalizeClass as z, createTextVNode as Z, toDisplayString as I, createVNode as u, Transition as Q, withCtx as D, withDirectives as F, Fragment as O, renderList as U, vShow as q, createCommentVNode as j, withModifiers as G } from "vue";
3
- const J = {}, K = {
4
- xmlns: "http://www.w3.org/2000/svg",
5
- viewBox: "0 0 24 24",
6
- fill: "none",
7
- stroke: "currentColor",
8
- "stroke-width": "2",
9
- "stroke-linecap": "round",
10
- "stroke-linejoin": "round",
11
- class: "icon icon-tabler icons-tabler-outline icon-tabler-logout"
12
- };
13
- function P(t, e, n, a, s, i) {
14
- return r(), l("svg", K, e[0] || (e[0] = [
15
- o("path", {
16
- stroke: "none",
17
- d: "M0 0h24v24H0z",
18
- fill: "none"
19
- }, null, -1),
20
- 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),
21
- o("path", { d: "M9 12h12l-3 -3" }, null, -1),
22
- o("path", { d: "M18 15l3 -3" }, null, -1)
23
- ]));
24
- }
25
- const R = /* @__PURE__ */ h(J, [["render", P]]), W = {}, X = {
26
- viewBox: "0 0 1823 249",
27
- fill: "none",
28
- xmlns: "http://www.w3.org/2000/svg"
29
- };
30
- function Y(t, e, n, a, s, i) {
31
- return r(), l("svg", X, e[0] || (e[0] = [
32
- A('<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)
33
- ]));
34
- }
35
- const e1 = /* @__PURE__ */ h(W, [["render", Y]]), t1 = {}, o1 = {
36
- xmlns: "http://www.w3.org/2000/svg",
37
- viewBox: "0 0 24 24",
38
- fill: "none",
39
- stroke: "currentColor",
40
- "stroke-width": "2",
41
- "stroke-linecap": "round",
42
- "stroke-linejoin": "round",
43
- class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
44
- };
45
- function n1(t, e, n, a, s, i) {
46
- return r(), l("svg", o1, e[0] || (e[0] = [
47
- o("path", {
48
- stroke: "none",
49
- d: "M0 0h24v24H0z",
50
- fill: "none"
51
- }, null, -1),
52
- o("path", { d: "M6 9l6 6l6 -6" }, null, -1)
53
- ]));
54
- }
55
- const s1 = /* @__PURE__ */ h(t1, [["render", n1]]), r1 = {
56
- components: { IconChevronDown: s1 },
57
- props: { route: Object },
58
- mounted() {
59
- var t, e, n;
60
- (t = this.route) != null && t.menu && (n = (e = this.route) == null ? void 0 : e.menu) != null && n.some(
61
- (a) => {
62
- var s, i;
63
- return (a == null ? void 0 : a.path) === this.$route.path.replace("/", "") || ((i = (s = this.$route) == null ? void 0 : s.params) == null ? void 0 : i.table) === (a == null ? void 0 : a.table) && (a == null ? void 0 : a.table);
64
- }
65
- ) && (this.isOpen = !0);
66
- },
67
- data() {
68
- return {
69
- isOpen: !1
70
- };
71
- }
72
- }, l1 = {
73
- key: 0,
74
- class: ""
75
- }, a1 = { class: "ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer" }, i1 = { key: 1 };
76
- function c1(t, e, n, a, s, i) {
77
- var x, v, _, C, b, w, m, y, k, $, V, M, H;
78
- const f = p("IconChevronDown"), g = p("router-link");
79
- return (x = n.route) != null && x.menu ? (r(), l("div", l1, [
80
- o("button", {
81
- onClick: e[0] || (e[0] = (d) => s.isOpen = !s.isOpen),
82
- class: z(["flex cursor-pointer gap-x-3 py-2 px-3 text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300", [
83
- ((_ = (v = n.route) == null ? void 0 : v.menu) == null ? void 0 : _.some(
84
- (d) => {
85
- var c, L;
86
- return (d == null ? void 0 : d.path) === t.$route.path.replace("/", "") || (d == null ? void 0 : d.table) === ((L = (c = t.$route) == null ? void 0 : c.params) == null ? void 0 : L.table) && (d == null ? void 0 : d.table);
87
- }
88
- )) && "bg-gray-100"
89
- ]])
90
- }, [
91
- Z(I((C = n.route) == null ? void 0 : C.ua) + " ", 1),
92
- u(f, {
93
- class: z([[s.isOpen && "-rotate-180"], "ml-auto duration-300"]),
94
- width: "14",
95
- height: "14"
96
- }, null, 8, ["class"])
97
- ], 2),
98
- u(Q, { name: "fade" }, {
99
- default: D(() => {
100
- var d;
101
- return [
102
- F(o("ul", a1, [
103
- (r(!0), l(O, null, U((d = n.route) == null ? void 0 : d.menu, (c, L) => {
104
- var N, B;
105
- return r(), l("li", {
106
- key: L,
107
- class: "w-full"
108
- }, [
109
- u(g, {
110
- to: "/" + (c == null ? void 0 : c.path),
111
- class: z([[
112
- ((c == null ? void 0 : c.path) === t.$route.path.replace("/", "") || ((B = (N = t.$route) == null ? void 0 : N.params) == null ? void 0 : B.table) === (c == null ? void 0 : c.table) && (c == null ? void 0 : c.table)) && "bg-gray-100"
113
- ], "flex gap-x-4 py-2 px-3 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])
114
- }, {
115
- default: D(() => [
116
- Z(I(c == null ? void 0 : c.ua), 1)
117
- ]),
118
- _: 2
119
- }, 1032, ["to", "class"])
120
- ]);
121
- }), 128))
122
- ], 512), [
123
- [q, s.isOpen]
124
- ])
125
- ];
126
- }),
127
- _: 1
128
- })
129
- ])) : (r(), l("div", i1, [
130
- u(g, {
131
- to: ((w = (b = n.route) == null ? void 0 : b.path) == null ? void 0 : w[0]) === "/" ? (m = n.route) == null ? void 0 : m.path : "/" + ((y = n.route) == null ? void 0 : y.path),
132
- class: z([[
133
- (((k = n.route) == null ? void 0 : k.path.replace("/", "")) === t.$route.path.replace("/", "") || ((V = ($ = t.$route) == null ? void 0 : $.params) == null ? void 0 : V.table) === ((M = n.route) == null ? void 0 : M.table) && ((H = n.route) == null ? void 0 : H.table)) && "bg-gray-100"
134
- ], "flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])
135
- }, {
136
- default: D(() => {
137
- var d;
138
- return [
139
- Z(I((d = n.route) == null ? void 0 : d.ua), 1)
140
- ];
141
- }),
142
- _: 1
143
- }, 8, ["to", "class"])
144
- ]));
145
- }
146
- const u1 = /* @__PURE__ */ h(r1, [["render", c1]]), d1 = {
147
- components: { IconLogout: R, NavbarItem: u1, IconLogo: e1, IconSearch: T },
148
- data() {
149
- return {
150
- activeIndex: null,
151
- data: null,
152
- searchValue: ""
153
- };
154
- },
155
- computed: {
156
- data() {
157
- var t, e;
158
- return (t = this.searchValue) != null && t.trim() ? (e = this.flattenMenu(E.value)) == null ? void 0 : e.filter(
159
- (n) => {
160
- var a, s, i;
161
- return (i = (a = n == null ? void 0 : n.ua) == null ? void 0 : a.toLowerCase()) == null ? void 0 : i.includes((s = this.searchValue) == null ? void 0 : s.toLowerCase());
162
- }
163
- ) : E.value;
164
- }
165
- },
166
- methods: {
167
- flattenMenu(t) {
168
- const e = [];
169
- return t.forEach((n) => {
170
- n.menu ? e.push(...this.flattenMenu(n.menu)) : e.push(n);
171
- }), e;
172
- }
173
- }
174
- }, p1 = { class: "flex flex-col h-[100vh] border-r w-[260px] shrink-0" }, h1 = { class: "relative" }, f1 = { class: "p-[16px] 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" }, x1 = { class: "pb-3 w-full flex flex-col flex-wrap" }, C1 = {
175
- key: 0,
176
- class: "flex flex-col gap-[6px]"
177
- }, g1 = {
178
- key: 1,
179
- class: "text-gray-800 text-lg mt-[20px]"
180
- };
181
- function _1(t, e, n, a, s, i) {
182
- var _;
183
- const f = p("IconLogo"), g = p("IconSearch"), x = p("VsText"), v = p("NavbarItem");
184
- return r(), l("div", p1, [
185
- u(f, {
186
- height: "40",
187
- width: "200",
188
- class: "my-[20px] ml-[20px]"
189
- }),
190
- o("div", h1, [
191
- u(g, {
192
- height: "16",
193
- width: "16",
194
- class: "absolute top-[12px] left-[30px] text-gray-500 z-[1]"
195
- }),
196
- u(x, {
197
- type: "text",
198
- modelValue: s.searchValue,
199
- "onUpdate:modelValue": e[0] || (e[0] = (C) => s.searchValue = C),
200
- clearable: !0,
201
- placeholder: "Пошук по меню",
202
- class: "[&>input]:h-[40px] [&>input]:block [&>input]:rounded-none [&>input]:border-x-0 [&>input]:pl-[60px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"
203
- }, null, 8, ["modelValue"])
204
- ]),
205
- o("div", f1, [
206
- o("nav", x1, [
207
- (_ = i.data) != null && _.length ? (r(), l("ul", C1, [
208
- (r(!0), l(O, null, U(i.data, (C, b) => (r(), l("li", {
209
- key: b,
210
- class: "flex flex-col gap-[6px]"
211
- }, [
212
- u(v, { route: C }, null, 8, ["route"])
213
- ]))), 128))
214
- ])) : (r(), l("div", g1, "Не знайдено"))
215
- ])
216
- ])
217
- ]);
218
- }
219
- const b1 = /* @__PURE__ */ h(d1, [["render", _1]]), v1 = {}, w1 = {
220
- class: "flex-shrink-0 size-4",
221
- xmlns: "http://www.w3.org/2000/svg",
222
- viewBox: "0 0 24 24",
223
- fill: "none",
224
- stroke: "currentColor",
225
- "stroke-width": "2",
226
- "stroke-linecap": "round",
227
- "stroke-linejoin": "round"
228
- };
229
- function m1(t, e, n, a, s, i) {
230
- return r(), l("svg", w1, e[0] || (e[0] = [
231
- o("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }, null, -1),
232
- o("path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" }, null, -1)
233
- ]));
234
- }
235
- const y1 = /* @__PURE__ */ h(v1, [["render", m1]]), k1 = {
236
- components: { IconMessage: y1 },
237
- mounted() {
238
- this.getNotificationsCount;
239
- },
240
- data() {
241
- return {
242
- count: 0
243
- };
244
- },
245
- methods: {
246
- async getNotificationsCount() {
247
- try {
248
- const { data: t } = await axios.get("/api/user-info");
249
- this.count = t == null ? void 0 : t.notifications;
250
- } catch {
251
- }
252
- }
253
- }
254
- }, $1 = { class: "hs-tooltip [--placement:bottom] inline-block show" }, V1 = { class: "hs-tooltip-toggle relative 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" }, M1 = {
255
- key: 0,
256
- class: "flex absolute top-0 end-0 -mt-1.5 -me-1.5"
257
- }, H1 = { class: "relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1" };
258
- function I1(t, e, n, a, s, i) {
259
- const f = p("IconMessage");
260
- return r(), l("div", $1, [
261
- o("button", V1, [
262
- u(f, {
263
- height: "24",
264
- width: "24"
265
- }),
266
- s.count ? (r(), l("span", M1, [
267
- e[0] || (e[0] = o("span", { class: "absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600" }, null, -1)),
268
- o("span", H1, I(s.count), 1)
269
- ])) : j("", !0)
270
- ]),
271
- e[1] || (e[1] = o("span", {
272
- class: "hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",
273
- role: "tooltip",
274
- "data-popper-placement": "bottom",
275
- style: { position: "fixed", inset: "0px auto auto 0px", margin: "0px", transform: "translate(1686px, 53px)" }
276
- }, null, -1))
277
- ]);
278
- }
279
- const L1 = /* @__PURE__ */ h(k1, [["render", I1]]), z1 = {}, Z1 = {
280
- class: "flex-shrink-0 size-4",
281
- xmlns: "http://www.w3.org/2000/svg",
282
- viewBox: "0 0 24 24",
283
- fill: "none",
284
- stroke: "currentColor",
285
- "stroke-width": "2",
286
- "stroke-linecap": "round",
287
- "stroke-linejoin": "round"
288
- };
289
- function D1(t, e, n, a, s, i) {
290
- return r(), l("svg", Z1, e[0] || (e[0] = [
291
- o("circle", {
292
- cx: "12",
293
- cy: "12",
294
- r: "10"
295
- }, null, -1),
296
- o("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, null, -1),
297
- o("path", { d: "M12 17h.01" }, null, -1)
298
- ]));
299
- }
300
- const E1 = /* @__PURE__ */ h(z1, [["render", D1]]), O1 = {}, j1 = {
301
- xmlns: "http://www.w3.org/2000/svg",
302
- width: "24",
303
- height: "24",
304
- viewBox: "0 0 24 24",
305
- fill: "currentColor",
306
- class: "icon icon-tabler icons-tabler-filled icon-tabler-user"
307
- };
308
- function N1(t, e, n, a, s, i) {
309
- return r(), l("svg", j1, e[0] || (e[0] = [
310
- o("path", {
311
- stroke: "none",
312
- d: "M0 0h24v24H0z",
313
- fill: "none"
314
- }, null, -1),
315
- o("path", { d: "M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z" }, null, -1),
316
- o("path", { d: "M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z" }, null, -1)
317
- ]));
318
- }
319
- const B1 = /* @__PURE__ */ h(O1, [["render", N1]]), S1 = {
320
- components: { IconQuestion: E1, IconUser: B1, AdminNotifucation: L1 },
321
- mounted() {
322
- this.getUserData();
323
- },
324
- data() {
325
- return {
326
- userData: null,
327
- isVisible: !1
328
- };
329
- },
330
- watch: {
331
- isVisible(t) {
332
- t ? setTimeout(
333
- () => window.addEventListener("click", this.closeOnOutsideClick),
334
- 0
335
- ) : window.removeEventListener("click", this.closeOnOutsideClick);
336
- }
337
- },
338
- methods: {
339
- async getUserData() {
340
- try {
341
- const { data: t } = await S.get("/user");
342
- this.userData = t;
343
- } catch {
344
- }
345
- },
346
- async logout() {
347
- try {
348
- await S.get("/logout"), await window.history.pushState({}, "", "/login"), await location.reload(), localStorage.removeItem("user");
349
- } catch {
350
- }
351
- },
352
- closeOnOutsideClick() {
353
- this.isVisible = !1;
354
- }
355
- },
356
- beforeUnmount() {
357
- window.removeEventListener("click", this.closeOnOutsideClick);
358
- }
359
- }, U1 = {
360
- class: "h-[60px] border-b flex justify-end px-[20px]",
361
- style: { width: "calc(100vw - 260px)" }
362
- }, T1 = { class: "flex items-center gap-[6px]" }, A1 = {
363
- href: "docs-softpro.com",
364
- 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"
365
- }, Q1 = { class: "relative" }, F1 = ["src"], q1 = {
366
- key: 1,
367
- class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
368
- }, G1 = { class: "p-[10px] gap-[6px] items-center border-b flex justify-between" }, J1 = ["src"], K1 = {
369
- key: 1,
370
- class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
371
- }, P1 = { class: "text-[14px] mr-[10px] text-gray-500" }, R1 = { class: "flex flex-col p-[4px]" };
372
- function W1(t, e, n, a, s, i) {
373
- var _, C, b, w, m, y, k, $, V, M;
374
- const f = p("IconQuestion"), g = p("AdminNotifucation"), x = p("IconUser"), v = p("router-link");
375
- return r(), l("div", U1, [
376
- o("div", T1, [
377
- o("a", A1, [
378
- u(f, {
379
- height: "24",
380
- width: "24"
381
- })
382
- ]),
383
- u(g),
384
- e[4] || (e[4] = o("div", { class: "h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]" }, null, -1)),
385
- o("div", Q1, [
386
- o("div", {
387
- onClick: e[0] || (e[0] = (H) => s.isVisible = !0),
388
- class: "cursor-pointer"
389
- }, [
390
- (C = (_ = s.userData) == null ? void 0 : _.user) != null && C.avatar ? (r(), l("img", {
391
- key: 0,
392
- class: "flex-shrink-0 size-[30px] rounded-full",
393
- src: (w = (b = s.userData) == null ? void 0 : b.user) == null ? void 0 : w.avatar,
394
- alt: "Image Description"
395
- }, null, 8, F1)) : (r(), l("div", q1, [
396
- u(x)
397
- ]))
398
- ]),
399
- s.isVisible ? (r(), l("div", {
400
- key: 0,
401
- onClick: e[2] || (e[2] = G(() => {
402
- }, ["stop"])),
403
- class: "fixed bg-white w-[180px] top-[55px] right-[20px] shadow-xl rounded-xl z-[1]"
404
- }, [
405
- o("div", G1, [
406
- (y = (m = s.userData) == null ? void 0 : m.user) != null && y.avatar ? (r(), l("img", {
407
- key: 0,
408
- class: "flex-shrink-0 size-[30px] rounded-full",
409
- src: ($ = (k = s.userData) == null ? void 0 : k.user) == null ? void 0 : $.avatar,
410
- alt: "Image Description"
411
- }, null, 8, J1)) : (r(), l("div", K1, [
412
- u(x)
413
- ])),
414
- o("div", null, [
415
- o("p", P1, I((M = (V = s.userData) == null ? void 0 : V.user) == null ? void 0 : M.username), 1)
416
- ])
417
- ]),
418
- o("div", R1, [
419
- u(v, {
420
- disabled: !0,
421
- class: "p-[8px] block rounded-lg w-full mb-[4px] text-start hover:bg-gray-100 !duration-300"
422
- }, {
423
- default: D(() => e[3] || (e[3] = [
424
- Z("Профіль")
425
- ])),
426
- _: 1
427
- }),
428
- o("button", {
429
- onClick: e[1] || (e[1] = (...H) => i.logout && i.logout(...H)),
430
- class: "p-[8px] block rounded-lg w-full text-start hover:bg-gray-100 !duration-300"
431
- }, " Вийти ")
432
- ])
433
- ])) : j("", !0)
434
- ])
435
- ])
436
- ]);
437
- }
438
- const X1 = /* @__PURE__ */ h(S1, [["render", W1]]), Y1 = {
439
- components: { navbar: b1, AdminHeader: X1 },
440
- computed: {
441
- isMenu() {
442
- return E.value;
443
- }
444
- }
445
- }, ee = { class: "admin-wrapper" }, te = { class: "flex flex-col" };
446
- function oe(t, e, n, a, s, i) {
447
- const f = p("navbar"), g = p("admin-header"), x = p("router-view");
448
- return r(), l("div", ee, [
449
- u(f),
450
- o("div", te, [
451
- i.isMenu ? (r(), l(O, { key: 0 }, [
452
- u(g),
453
- u(x)
454
- ], 64)) : j("", !0)
455
- ])
456
- ]);
457
- }
458
- const re = /* @__PURE__ */ h(Y1, [["render", oe], ["__scopeId", "data-v-2f422765"]]);
459
- export {
460
- re as default
461
- };