@oneclick.dev/cms-core-modules 0.0.53 → 0.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/CalendarDate-CRT2Viyt.mjs +830 -0
  2. package/dist/CalendarDate-CWtpXgpD.js +1 -0
  3. package/dist/Components-D9yIIosM.mjs +623 -0
  4. package/dist/Components-DXbx0RLV.js +1 -0
  5. package/dist/ContentEditor-DRJFQKCv.mjs +34915 -0
  6. package/dist/ContentEditor-DzTi8fSZ.js +290 -0
  7. package/dist/Create-BP8TX6rj.js +1 -0
  8. package/dist/Create-Bwf1RXdG.mjs +1248 -0
  9. package/dist/DateFormatter-BbcSwTs4.js +1 -0
  10. package/dist/DateFormatter-CbO0PVUK.mjs +99 -0
  11. package/dist/Detail-B-PnkcXD.mjs +3473 -0
  12. package/dist/Detail-BVlGSjOq.mjs +380 -0
  13. package/dist/Detail-C4E1T87K.mjs +26 -0
  14. package/dist/Detail-CNfTDUE5.js +1 -0
  15. package/dist/Detail-Cd5CBVN0.js +1 -0
  16. package/dist/Detail-CpfOQChd.mjs +585 -0
  17. package/dist/Detail-CwagT6gQ.mjs +650 -0
  18. package/dist/Detail-DUo6qKqO.js +1 -0
  19. package/dist/Detail-Dd_OkpcN.js +1 -0
  20. package/dist/Detail-mvSGbnFU.js +1 -0
  21. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +1 -0
  22. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +55 -0
  23. package/dist/Entries-DcpPvlYj.js +1 -0
  24. package/dist/Entries-QLMtTYLX.mjs +713 -0
  25. package/dist/Find-BPR0uU-Z.mjs +229 -0
  26. package/dist/Find-BidEQJxT.js +1 -0
  27. package/dist/GlobalStyling-CMzPRd18.js +17 -0
  28. package/dist/GlobalStyling-DoLHUJeV.mjs +988 -0
  29. package/dist/Overview-BDlBCUI_.js +1 -0
  30. package/dist/Overview-BH3NwvNX.mjs +26 -0
  31. package/dist/Overview-BLsZMHNW.mjs +178 -0
  32. package/dist/Overview-BNMZ9MUK.js +1 -0
  33. package/dist/Overview-BbvfH1u-.js +1 -0
  34. package/dist/Overview-CDN88OSM.mjs +190 -0
  35. package/dist/Overview-CEPodGCn.mjs +311 -0
  36. package/dist/Overview-CvquDPhB.js +1 -0
  37. package/dist/Overview-D54pjmI6.mjs +633 -0
  38. package/dist/Overview-D67UjG6n.mjs +947 -0
  39. package/dist/Overview-KT2Mgfh5.js +1 -0
  40. package/dist/Overview-T-lsy3UZ.js +1 -0
  41. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +1 -0
  42. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +392 -0
  43. package/dist/TableView-CpO53xcX.js +111 -0
  44. package/dist/TableView-D9J5rUls.mjs +72921 -0
  45. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
  46. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs +40 -0
  47. package/dist/View-DlHBZbFu.js +1 -0
  48. package/dist/View-Dv5QMrSn.mjs +25 -0
  49. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  50. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  51. package/dist/agenda-B49oKGeh.mjs +706 -0
  52. package/dist/agenda-DipQ5IWP.js +1 -0
  53. package/dist/availability-C7q9tq6l.js +1 -0
  54. package/dist/availability-DeCkqiu8.mjs +613 -0
  55. package/dist/cms-core-modules.css +1 -1
  56. package/dist/countries-BTPvmrsb.mjs +4 -0
  57. package/dist/countries-CgZ081No.js +1 -0
  58. package/dist/exceptions-D3b18TiY.mjs +647 -0
  59. package/dist/exceptions-DJ9zWX3k.js +1 -0
  60. package/dist/floating-ui.dom-C82nbomj.js +1 -0
  61. package/dist/floating-ui.dom-ouSgPqty.mjs +1133 -0
  62. package/dist/google-CvtuJwgk.mjs +4 -0
  63. package/dist/google-D4N3gb01.js +1 -0
  64. package/dist/index--jjEzba7.mjs +24 -0
  65. package/dist/index-9HVlmvK3.js +1 -0
  66. package/dist/index-BEGU8Kme.mjs +12 -0
  67. package/dist/index-Bwi1mtkq.mjs +24 -0
  68. package/dist/index-BzuHN-r8.mjs +24 -0
  69. package/dist/index-CImCyE3L.mjs +24 -0
  70. package/dist/index-CKPshlZ8-BQiiP6r_.mjs +1264 -0
  71. package/dist/index-CKPshlZ8-CIz1tDwX.js +1 -0
  72. package/dist/index-CQiY-oTN.mjs +24 -0
  73. package/dist/index-CSxYBeVA.js +1 -0
  74. package/dist/index-CkiNvRzs.js +1 -0
  75. package/dist/index-Co4ON2Di.js +1 -0
  76. package/dist/index-CwqrAU-H.js +1 -0
  77. package/dist/index-Cz-baGax.js +1 -0
  78. package/dist/index-D2a6wEPh.js +1 -0
  79. package/dist/index-DFQGVHTs.js +1 -0
  80. package/dist/index-DI6mydpm.mjs +138 -0
  81. package/dist/index-DMoyoaks.mjs +22 -0
  82. package/dist/index-DT1wWnUk.mjs +24 -0
  83. package/dist/index-DUeFrD-B.js +1 -0
  84. package/dist/index-DsnoK4ia.mjs +579 -0
  85. package/dist/index-R2oUDsjx.js +1 -0
  86. package/dist/index-RLz1QPrf.mjs +203 -0
  87. package/dist/index-UtjLbLw-.js +1 -0
  88. package/dist/index-_mG-aU3Z.mjs +87 -0
  89. package/dist/index-_sQDF1pH.js +1 -0
  90. package/dist/index-ijdf0d9-.js +1 -0
  91. package/dist/index-klI238nT.mjs +24 -0
  92. package/dist/index.cjs.js +1 -330
  93. package/dist/index.mjs +287 -69051
  94. package/dist/interpolation-BNUjI7LH.js +1 -0
  95. package/dist/interpolation-BpGXqOz8.mjs +59 -0
  96. package/dist/payment-kTjsV0Jj.js +1 -0
  97. package/dist/payment-zpCM0LD-.mjs +981 -0
  98. package/dist/regular-C4_3YXqx.mjs +602 -0
  99. package/dist/regular-DFwPEbZO.js +1 -0
  100. package/dist/regular-slots-4ooEpICB.mjs +67 -0
  101. package/dist/regular-slots-BAVGbomI.js +1 -0
  102. package/dist/resources-MpQkSstv.mjs +563 -0
  103. package/dist/resources-iM28T3dD.js +1 -0
  104. package/dist/src/appointments/index.d.ts +4 -28
  105. package/dist/src/appointments/routes.d.ts +3 -9
  106. package/dist/src/content-manager/index.d.ts +5 -147
  107. package/dist/src/content-manager/routes.d.ts +4 -128
  108. package/dist/src/custom/index.d.ts +2 -2
  109. package/dist/src/custom/routes.d.ts +1 -1
  110. package/dist/src/mail-templates/index.d.ts +2 -30
  111. package/dist/src/mail-templates/routes.d.ts +1 -11
  112. package/dist/src/product-collections/index.d.ts +2 -30
  113. package/dist/src/product-collections/routes.d.ts +1 -11
  114. package/dist/src/products/index.d.ts +2 -30
  115. package/dist/src/products/routes.d.ts +1 -11
  116. package/dist/src/promo-codes/index.d.ts +2 -30
  117. package/dist/src/promo-codes/routes.d.ts +1 -11
  118. package/dist/src/shipping-options/index.d.ts +2 -30
  119. package/dist/src/shipping-options/routes.d.ts +1 -11
  120. package/dist/src/table/index.d.ts +2 -70
  121. package/dist/src/table/routes.d.ts +1 -51
  122. package/dist/utils-BVKy9S2J.mjs +29 -0
  123. package/dist/utils-D6CaKJbp.js +2 -0
  124. package/dist/vee-validate-zod-BPQyEfpF.js +1 -0
  125. package/dist/vee-validate-zod-IXkfh-6Q.mjs +4402 -0
  126. package/package.json +3 -3
@@ -0,0 +1,311 @@
1
+ import { defineComponent as X, ref as A, resolveComponent as l, createElementBlock as f, openBlock as s, Fragment as S, createElementVNode as u, createBlock as E, createVNode as t, withCtx as n, unref as c, createTextVNode as i, createCommentVNode as T, toDisplayString as O, renderList as q, normalizeClass as K } from "vue";
2
+ import { useModule as Q, useFirebaseIntegration as W, useModuleRoute as Z, useConfirmation as ee, useModuleBreadcrumbs as te } from "@oneclick.dev/cms-kit";
3
+ import { CalendarX as ne, MoreHorizontalIcon as V, Copy as oe, ChevronsLeftRightEllipsis as le, Upload as ae, Trash2Icon as se, ImportIcon as ie } from "lucide-vue-next";
4
+ const de = { class: "container mx-auto p-8" }, re = { key: 0 }, ue = { class: "flex gap-2" }, ce = { key: 2 }, pe = { class: "flex justify-between items-center gap-4 mb-4" }, fe = {
5
+ key: 0,
6
+ class: "flex items-center gap-2"
7
+ }, me = { class: "mr-2" }, ve = ["onClick"], _e = { class: "flex justify-between items-center mb-2" }, ge = { class: "flex flex-col items-start" }, ye = { class: "text-lg font-medium" }, Ce = { class: "text-sm text-muted-foreground" }, ke = { key: 0 }, we = { key: 1 }, xe = { class: "flex justify-end mt-8" }, Ie = /* @__PURE__ */ X({
8
+ __name: "Overview",
9
+ setup(be) {
10
+ const { config: _ } = Q(), C = W(_.project), { navigateTo: M } = Z(), { confirm: z } = ee();
11
+ te(() => []);
12
+ const k = A(null), m = A(!1), d = A([]), I = A("importAgendasInput"), G = (a) => {
13
+ m.value = !0, d.value = [a];
14
+ }, x = async () => {
15
+ k.value = await C.find(_.agendaCollection);
16
+ }, R = async (a) => {
17
+ const e = await C.get(_.agendaCollection, a);
18
+ if (!e) {
19
+ alert("Agenda not found");
20
+ return;
21
+ }
22
+ const r = prompt("Enter name for duplicated agenda", e.serviceName + " (Copy)");
23
+ if (!r)
24
+ return;
25
+ const p = { ...e, serviceName: r };
26
+ delete p.id, await C.add(_.agendaCollection, p), await x();
27
+ }, H = async (a) => {
28
+ await z("Are you sure you want to delete this agenda? This action cannot be undone.") && (await C.remove(_.agendaCollection, a), await x());
29
+ }, J = async () => {
30
+ let a = k.value.filter((p) => d.value.includes(p.id));
31
+ a = a.map((p) => {
32
+ const { id: g, ...y } = p;
33
+ return y;
34
+ });
35
+ const e = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(a, null, 2)), r = document.createElement("a");
36
+ r.setAttribute("href", e), r.setAttribute("download", "agendas_export.json"), document.body.appendChild(r), r.click(), r.remove(), m.value = !1, d.value = [];
37
+ }, F = async (a) => {
38
+ const e = a.target;
39
+ if (!e.files || e.files.length === 0)
40
+ return;
41
+ const p = await e.files[0].text();
42
+ let g;
43
+ try {
44
+ g = JSON.parse(p);
45
+ } catch {
46
+ alert("Invalid JSON file");
47
+ return;
48
+ }
49
+ if (!Array.isArray(g)) {
50
+ alert("Invalid agendas format");
51
+ return;
52
+ }
53
+ for (const y of g)
54
+ await C.add(_.agendaCollection, y);
55
+ e.value = "", await x();
56
+ };
57
+ return x(), (a, e) => {
58
+ const r = l("Spinner"), p = l("EmptyMedia"), g = l("EmptyTitle"), y = l("EmptyDescription"), L = l("EmptyHeader"), v = l("Button"), U = l("EmptyContent"), Y = l("Empty"), D = l("DropdownMenuTrigger"), w = l("DropdownMenuItem"), N = l("DropdownMenuGroup"), $ = l("DropdownMenuContent"), h = l("DropdownMenu"), j = l("ButtonGroup"), B = l("Checkbox");
59
+ return s(), f(S, null, [
60
+ u("div", de, [
61
+ k.value === null ? (s(), f("div", re, [
62
+ t(r, { class: "mx-auto" })
63
+ ])) : k.value.length === 0 ? (s(), E(Y, { key: 1 }, {
64
+ default: n(() => [
65
+ t(L, null, {
66
+ default: n(() => [
67
+ t(p, { variant: "icon" }, {
68
+ default: n(() => [
69
+ t(c(ne), { class: "size-4-6" })
70
+ ]),
71
+ _: 1
72
+ }),
73
+ t(g, null, {
74
+ default: n(() => [...e[4] || (e[4] = [
75
+ i("No Agendas Yet", -1)
76
+ ])]),
77
+ _: 1
78
+ }),
79
+ t(y, null, {
80
+ default: n(() => [...e[5] || (e[5] = [
81
+ i(" You haven't created any agenda yet. Get started by creating your first agenda. ", -1)
82
+ ])]),
83
+ _: 1
84
+ })
85
+ ]),
86
+ _: 1
87
+ }),
88
+ t(U, null, {
89
+ default: n(() => [
90
+ u("div", ue, [
91
+ t(v, {
92
+ onClick: e[0] || (e[0] = (o) => c(M)("/create"))
93
+ }, {
94
+ default: n(() => [...e[6] || (e[6] = [
95
+ i("Create Agenda", -1)
96
+ ])]),
97
+ _: 1
98
+ })
99
+ ])
100
+ ]),
101
+ _: 1
102
+ })
103
+ ]),
104
+ _: 1
105
+ })) : (s(), f("div", ce, [
106
+ u("div", pe, [
107
+ e[9] || (e[9] = u("h2", { class: "text-2xl font-bold" }, "Agendas", -1)),
108
+ m.value ? (s(), f("div", fe, [
109
+ u("span", me, O(d.value.length) + " selected", 1),
110
+ t(v, {
111
+ variant: "outline",
112
+ onClick: e[1] || (e[1] = (o) => {
113
+ m.value = !1, d.value = [];
114
+ })
115
+ }, {
116
+ default: n(() => [...e[7] || (e[7] = [
117
+ i(" Cancel ", -1)
118
+ ])]),
119
+ _: 1
120
+ }),
121
+ t(v, {
122
+ onClick: J,
123
+ disabled: d.value.length === 0
124
+ }, {
125
+ default: n(() => [...e[8] || (e[8] = [
126
+ i(" Export ", -1)
127
+ ])]),
128
+ _: 1
129
+ }, 8, ["disabled"])
130
+ ])) : T("", !0)
131
+ ]),
132
+ (s(!0), f(S, null, q(k.value, (o) => (s(), f("button", {
133
+ key: o.id,
134
+ class: K(["block w-full mb-4 p-4 border rounded-md bg-background", { "cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50": m.value }]),
135
+ onClick: (b) => m.value ? d.value.includes(o.id) ? d.value = d.value.filter((P) => P !== o.id) : d.value.push(o.id) : null
136
+ }, [
137
+ u("div", _e, [
138
+ u("div", ge, [
139
+ u("h3", ye, O(o.serviceName), 1),
140
+ u("p", Ce, [
141
+ o.type === "regular" ? (s(), f("span", ke, "Regular Agenda")) : T("", !0)
142
+ ])
143
+ ]),
144
+ m.value ? (s(), f("div", we, [
145
+ d.value.includes(o.id) ? (s(), E(B, {
146
+ key: 0,
147
+ tabindex: "-1",
148
+ defaultValue: !0
149
+ })) : (s(), E(B, {
150
+ key: 1,
151
+ tabindex: "-1",
152
+ defaultValue: !1
153
+ }))
154
+ ])) : (s(), E(j, { key: 0 }, {
155
+ default: n(() => [
156
+ t(v, {
157
+ variant: "outline",
158
+ onClick: (b) => c(M)(`/edit/${o.id}`)
159
+ }, {
160
+ default: n(() => [...e[10] || (e[10] = [
161
+ i(" Edit Agenda ", -1)
162
+ ])]),
163
+ _: 1
164
+ }, 8, ["onClick"]),
165
+ t(h, null, {
166
+ default: n(() => [
167
+ t(D, { "as-child": "" }, {
168
+ default: n(() => [
169
+ t(v, {
170
+ variant: "outline",
171
+ size: "icon",
172
+ "aria-label": "More Options"
173
+ }, {
174
+ default: n(() => [
175
+ t(c(V))
176
+ ]),
177
+ _: 1
178
+ })
179
+ ]),
180
+ _: 1
181
+ }),
182
+ t($, {
183
+ align: "end",
184
+ class: "w-52"
185
+ }, {
186
+ default: n(() => [
187
+ t(N, null, {
188
+ default: n(() => [
189
+ t(w, {
190
+ onClick: (b) => R(o.id)
191
+ }, {
192
+ default: n(() => [
193
+ t(c(oe)),
194
+ e[11] || (e[11] = i(" Duplicate Agenda ", -1))
195
+ ]),
196
+ _: 1
197
+ }, 8, ["onClick"]),
198
+ t(w, null, {
199
+ default: n(() => [
200
+ t(c(le)),
201
+ e[12] || (e[12] = i(" API Set-up ", -1))
202
+ ]),
203
+ _: 1
204
+ }),
205
+ t(w, {
206
+ onClick: (b) => G(o.id)
207
+ }, {
208
+ default: n(() => [
209
+ t(c(ae)),
210
+ e[13] || (e[13] = i(" Export Agenda ", -1))
211
+ ]),
212
+ _: 1
213
+ }, 8, ["onClick"]),
214
+ t(w, {
215
+ variant: "destructive",
216
+ onClick: (b) => H(o.id)
217
+ }, {
218
+ default: n(() => [
219
+ t(c(se)),
220
+ e[14] || (e[14] = i(" Remove Agenda ", -1))
221
+ ]),
222
+ _: 1
223
+ }, 8, ["onClick"])
224
+ ]),
225
+ _: 2
226
+ }, 1024)
227
+ ]),
228
+ _: 2
229
+ }, 1024)
230
+ ]),
231
+ _: 2
232
+ }, 1024)
233
+ ]),
234
+ _: 2
235
+ }, 1024))
236
+ ])
237
+ ], 10, ve))), 128)),
238
+ u("div", xe, [
239
+ t(j, null, {
240
+ default: n(() => [
241
+ t(v, {
242
+ onClick: e[2] || (e[2] = (o) => c(M)("/create")),
243
+ class: "border-r"
244
+ }, {
245
+ default: n(() => [...e[15] || (e[15] = [
246
+ i("New Agenda", -1)
247
+ ])]),
248
+ _: 1
249
+ }),
250
+ t(h, null, {
251
+ default: n(() => [
252
+ t(D, { "as-child": "" }, {
253
+ default: n(() => [
254
+ t(v, {
255
+ size: "icon",
256
+ "aria-label": "More Options"
257
+ }, {
258
+ default: n(() => [
259
+ t(c(V))
260
+ ]),
261
+ _: 1
262
+ })
263
+ ]),
264
+ _: 1
265
+ }),
266
+ t($, {
267
+ align: "end",
268
+ class: "w-52"
269
+ }, {
270
+ default: n(() => [
271
+ t(N, null, {
272
+ default: n(() => [
273
+ t(w, {
274
+ onClick: e[3] || (e[3] = (o) => I.value.click())
275
+ }, {
276
+ default: n(() => [
277
+ t(c(ie)),
278
+ e[16] || (e[16] = i(" Import Agendas... ", -1))
279
+ ]),
280
+ _: 1
281
+ })
282
+ ]),
283
+ _: 1
284
+ })
285
+ ]),
286
+ _: 1
287
+ })
288
+ ]),
289
+ _: 1
290
+ })
291
+ ]),
292
+ _: 1
293
+ })
294
+ ])
295
+ ]))
296
+ ]),
297
+ u("input", {
298
+ type: "file",
299
+ ref_key: "importAgendasInput",
300
+ ref: I,
301
+ class: "hidden",
302
+ accept: ".json,application/json",
303
+ onChange: F
304
+ }, null, 544)
305
+ ], 64);
306
+ };
307
+ }
308
+ });
309
+ export {
310
+ Ie as default
311
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("@oneclick.dev/cms-kit"),d=require("lucide-vue-next"),O={class:"container mx-auto p-8"},z={key:0},G={class:"flex gap-2"},R={key:2},H={class:"flex justify-between items-center gap-4 mb-4"},q={key:0,class:"flex items-center gap-2"},F={class:"mr-2"},J=["onClick"],L={class:"flex justify-between items-center mb-2"},P={class:"flex flex-col items-start"},U={class:"text-lg font-medium"},Y={class:"text-sm text-muted-foreground"},K={key:0},X={key:1},Q={class:"flex justify-end mt-8"},W=e.defineComponent({__name:"Overview",setup(Z){const{config:c}=C.useModule(),m=C.useFirebaseIntegration(c.project),{navigateTo:g}=C.useModuleRoute(),{confirm:b}=C.useConfirmation();C.useModuleBreadcrumbs(()=>[]);const f=e.ref(null),i=e.ref(!1),a=e.ref([]),_=e.ref("importAgendasInput"),A=n=>{i.value=!0,a.value=[n]},x=async()=>{f.value=await m.find(c.agendaCollection)},B=async n=>{const t=await m.get(c.agendaCollection,n);if(!t){alert("Agenda not found");return}const l=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!l)return;const r={...t,serviceName:l};delete r.id,await m.add(c.agendaCollection,r),await x()},M=async n=>{await b("Are you sure you want to delete this agenda? This action cannot be undone.")&&(await m.remove(c.agendaCollection,n),await x())},T=async()=>{let n=f.value.filter(r=>a.value.includes(r.id));n=n.map(r=>{const{id:u,...p}=r;return p});const t="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(n,null,2)),l=document.createElement("a");l.setAttribute("href",t),l.setAttribute("download","agendas_export.json"),document.body.appendChild(l),l.click(),l.remove(),i.value=!1,a.value=[]},I=async n=>{const t=n.target;if(!t.files||t.files.length===0)return;const r=await t.files[0].text();let u;try{u=JSON.parse(r)}catch{alert("Invalid JSON file");return}if(!Array.isArray(u)){alert("Invalid agendas format");return}for(const p of u)await m.add(c.agendaCollection,p);t.value="",await x()};return x(),(n,t)=>{const l=e.resolveComponent("Spinner"),r=e.resolveComponent("EmptyMedia"),u=e.resolveComponent("EmptyTitle"),p=e.resolveComponent("EmptyDescription"),D=e.resolveComponent("EmptyHeader"),s=e.resolveComponent("Button"),S=e.resolveComponent("EmptyContent"),$=e.resolveComponent("Empty"),V=e.resolveComponent("DropdownMenuTrigger"),v=e.resolveComponent("DropdownMenuItem"),w=e.resolveComponent("DropdownMenuGroup"),k=e.resolveComponent("DropdownMenuContent"),y=e.resolveComponent("DropdownMenu"),E=e.resolveComponent("ButtonGroup"),h=e.resolveComponent("Checkbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",O,[f.value===null?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(l,{class:"mx-auto"})])):f.value.length===0?(e.openBlock(),e.createBlock($,{key:1},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(r,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" You haven't created any agenda yet. Get started by creating your first agenda. ",-1)])]),_:1})]),_:1}),e.createVNode(S,null,{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createVNode(s,{onClick:t[0]||(t[0]=o=>e.unref(g)("/create"))},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Create Agenda",-1)])]),_:1})])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",H,[t[9]||(t[9]=e.createElementVNode("h2",{class:"text-2xl font-bold"},"Agendas",-1)),i.value?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("span",F,e.toDisplayString(a.value.length)+" selected",1),e.createVNode(s,{variant:"outline",onClick:t[1]||(t[1]=o=>{i.value=!1,a.value=[]})},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(s,{onClick:T,disabled:a.value.length===0},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Export ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,class:e.normalizeClass(["block w-full mb-4 p-4 border rounded-md bg-background",{"cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50":i.value}]),onClick:N=>i.value?a.value.includes(o.id)?a.value=a.value.filter(j=>j!==o.id):a.value.push(o.id):null},[e.createElementVNode("div",L,[e.createElementVNode("div",P,[e.createElementVNode("h3",U,e.toDisplayString(o.serviceName),1),e.createElementVNode("p",Y,[o.type==="regular"?(e.openBlock(),e.createElementBlock("span",K,"Regular Agenda")):e.createCommentVNode("",!0)])]),i.value?(e.openBlock(),e.createElementBlock("div",X,[a.value.includes(o.id)?(e.openBlock(),e.createBlock(h,{key:0,tabindex:"-1",defaultValue:!0})):(e.openBlock(),e.createBlock(h,{key:1,tabindex:"-1",defaultValue:!1}))])):(e.openBlock(),e.createBlock(E,{key:0},{default:e.withCtx(()=>[e.createVNode(s,{variant:"outline",onClick:N=>e.unref(g)(`/edit/${o.id}`)},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode(" Edit Agenda ",-1)])]),_:1},8,["onClick"]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(V,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(s,{variant:"outline",size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(k,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,{onClick:N=>B(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Copy)),t[11]||(t[11]=e.createTextVNode(" Duplicate Agenda ",-1))]),_:1},8,["onClick"]),e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(e.unref(d.ChevronsLeftRightEllipsis)),t[12]||(t[12]=e.createTextVNode(" API Set-up ",-1))]),_:1}),e.createVNode(v,{onClick:N=>A(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Upload)),t[13]||(t[13]=e.createTextVNode(" Export Agenda ",-1))]),_:1},8,["onClick"]),e.createVNode(v,{variant:"destructive",onClick:N=>M(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Trash2Icon)),t[14]||(t[14]=e.createTextVNode(" Remove Agenda ",-1))]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))])],10,J))),128)),e.createElementVNode("div",Q,[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(s,{onClick:t[2]||(t[2]=o=>e.unref(g)("/create")),class:"border-r"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("New Agenda",-1)])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(V,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(s,{size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(k,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,{onClick:t[3]||(t[3]=o=>_.value.click())},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ImportIcon)),t[16]||(t[16]=e.createTextVNode(" Import Agendas... ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:_,class:"hidden",accept:".json,application/json",onChange:I},null,544)],64)}}});exports.default=W;