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

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.
@@ -0,0 +1,1588 @@
1
+ import { defineComponent as X, ref as w, reactive as h, resolveComponent as f, createBlock as p, openBlock as a, withCtx as n, createVNode as s, createElementVNode as t, createTextVNode as m, toDisplayString as R, createElementBlock as F, createCommentVNode as G, withDirectives as I, vModelText as O, computed as Q, normalizeStyle as N, unref as g, onMounted as le, Fragment as W, renderList as Y } from "vue";
2
+ import { useConfirmation as ee, useModuleRoute as te, useModuleStorage as oe, useModuleBreadcrumbs as se } from "@oneclick.dev/cms-kit";
3
+ import { Circle as B, CircleCheckBig as A, ChevronLeft as ne, Plus as Z } from "lucide-vue-next";
4
+ const ae = { class: "grid py-4" }, re = { class: "grid grid-cols-2 gap-2 mb-6" }, de = { class: "relative" }, ie = { class: "grid grid-cols-3 gap-2 mb-6" }, ue = { class: "relative" }, ce = { class: "relative" }, me = { class: "relative" }, ye = { class: "grid grid-cols-1 gap-2 mb-6" }, pe = { class: "relative" }, ve = { class: "flex items-center space-x-2" }, be = { class: "flex items-center space-x-2" }, ge = { class: "grid grid-cols-2 gap-2 mb-6" }, fe = { key: 0 }, xe = { class: "relative" }, Ce = { key: 1 }, ke = { class: "relative" }, De = {
5
+ key: 0,
6
+ class: "bg-muted px-4 py-2 rounded-md text-sm"
7
+ }, Fe = /* @__PURE__ */ X({
8
+ __name: "SectionStyleDialog",
9
+ props: {
10
+ buttons: {
11
+ type: Array,
12
+ default: () => []
13
+ }
14
+ },
15
+ emits: ["add", "edit", "delete"],
16
+ setup(P, { expose: j, emit: $ }) {
17
+ const { confirm: T } = ee(), U = $, k = w(!1), D = w("create"), y = w(null), c = w(!1), e = h({
18
+ name: "",
19
+ rendering: "class",
20
+ className: "",
21
+ componentName: "",
22
+ styles: {
23
+ backgroundColor: "#FFFFFF",
24
+ titleColor: "#000000",
25
+ textColor: "#000000"
26
+ }
27
+ }), J = (S) => {
28
+ S ? (D.value = "edit", y.value = S.id, c.value = S.id === "DEFAULT", e.name = S.name || "", e.rendering = S.rendering || "class", e.className = S.className || "", e.componentName = S.componentName || "", e.styles.backgroundColor = S.styles.backgroundColor || "#FFFFFF", e.styles.titleColor = S.styles.titleColor || "#000000", e.styles.textColor = S.styles.textColor || "#000000") : (D.value = "create", y.value = null, c.value = !1, e.name = "", e.rendering = "class", e.className = "", e.componentName = "", e.styles.backgroundColor = "#FFFFFF", e.styles.titleColor = "#000000", e.styles.textColor = "#000000"), k.value = !0;
29
+ }, _ = () => {
30
+ U("add", e), k.value = !1;
31
+ }, M = () => {
32
+ c.value && (e.name = "Default"), U("edit", { id: y.value, ...e }), k.value = !1;
33
+ }, H = async () => {
34
+ if (c.value) return;
35
+ await T("Are you sure you want to delete this theme? This action cannot be undone.", "Delete Theme", "Delete") && (U("delete", y.value), k.value = !1);
36
+ }, K = () => {
37
+ e.styles.backgroundColor = "#FFFFFF", e.styles.titleColor = "#000000", e.styles.textColor = "#000000";
38
+ };
39
+ return j({
40
+ openDialog: J
41
+ }), (S, i) => {
42
+ const u = f("DialogTitle"), l = f("DialogDescription"), q = f("DialogHeader"), z = f("Label"), L = f("Input"), x = f("RadioGroupItem"), V = f("RadioGroup"), E = f("Button"), r = f("DialogFooter"), o = f("DialogScrollContent"), b = f("Dialog");
43
+ return a(), p(b, {
44
+ open: k.value,
45
+ "onUpdate:open": i[10] || (i[10] = (v) => k.value = v)
46
+ }, {
47
+ default: n(() => [
48
+ s(o, { class: "sm:max-w-2xl" }, {
49
+ default: n(() => [
50
+ s(q, null, {
51
+ default: n(() => [
52
+ s(u, null, {
53
+ default: n(() => [
54
+ m(R(D.value === "create" ? "Add New Section Style" : "Edit Section Style"), 1)
55
+ ]),
56
+ _: 1
57
+ }),
58
+ s(l, null, {
59
+ default: n(() => [...i[11] || (i[11] = [
60
+ m(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ", -1)
61
+ ])]),
62
+ _: 1
63
+ })
64
+ ]),
65
+ _: 1
66
+ }),
67
+ t("div", ae, [
68
+ t("div", re, [
69
+ t("div", null, [
70
+ s(z, {
71
+ class: "mb-2",
72
+ for: "collection-theme-dialog-theme-name"
73
+ }, {
74
+ default: n(() => [...i[12] || (i[12] = [
75
+ m("Display name", -1)
76
+ ])]),
77
+ _: 1
78
+ }),
79
+ t("div", de, [
80
+ s(L, {
81
+ modelValue: e.name,
82
+ "onUpdate:modelValue": i[0] || (i[0] = (v) => e.name = v),
83
+ id: "collection-theme-dialog-theme-name",
84
+ disabled: c.value
85
+ }, null, 8, ["modelValue", "disabled"])
86
+ ])
87
+ ])
88
+ ]),
89
+ i[21] || (i[21] = t("h2", { class: "font-semibold mb-4" }, "Style Settings", -1)),
90
+ t("div", ie, [
91
+ t("div", null, [
92
+ s(z, {
93
+ class: "mb-2",
94
+ for: "collection-theme-dialog-background-color"
95
+ }, {
96
+ default: n(() => [...i[13] || (i[13] = [
97
+ m("Background color", -1)
98
+ ])]),
99
+ _: 1
100
+ }),
101
+ t("div", ue, [
102
+ I(t("input", {
103
+ "onUpdate:modelValue": i[1] || (i[1] = (v) => e.styles.backgroundColor = v),
104
+ type: "color",
105
+ label: "Primary Color",
106
+ class: "absolute top-0.5 left-1 size-8"
107
+ }, null, 512), [
108
+ [O, e.styles.backgroundColor]
109
+ ]),
110
+ s(L, {
111
+ modelValue: e.styles.backgroundColor,
112
+ "onUpdate:modelValue": i[2] || (i[2] = (v) => e.styles.backgroundColor = v),
113
+ class: "pl-12",
114
+ id: "collection-theme-dialog-background-color"
115
+ }, null, 8, ["modelValue"])
116
+ ])
117
+ ]),
118
+ t("div", null, [
119
+ s(z, {
120
+ class: "mb-2",
121
+ for: "collection-theme-dialog-title-color"
122
+ }, {
123
+ default: n(() => [...i[14] || (i[14] = [
124
+ m("Heading color", -1)
125
+ ])]),
126
+ _: 1
127
+ }),
128
+ t("div", ce, [
129
+ I(t("input", {
130
+ "onUpdate:modelValue": i[3] || (i[3] = (v) => e.styles.titleColor = v),
131
+ type: "color",
132
+ label: "Primary Color",
133
+ class: "absolute top-0.5 left-1 size-8"
134
+ }, null, 512), [
135
+ [O, e.styles.titleColor]
136
+ ]),
137
+ s(L, {
138
+ modelValue: e.styles.titleColor,
139
+ "onUpdate:modelValue": i[4] || (i[4] = (v) => e.styles.titleColor = v),
140
+ class: "pl-12",
141
+ id: "collection-theme-dialog-title-color"
142
+ }, null, 8, ["modelValue"])
143
+ ])
144
+ ]),
145
+ t("div", null, [
146
+ s(z, {
147
+ class: "mb-2",
148
+ for: "collection-theme-dialog-text-color"
149
+ }, {
150
+ default: n(() => [...i[15] || (i[15] = [
151
+ m("Body text color", -1)
152
+ ])]),
153
+ _: 1
154
+ }),
155
+ t("div", me, [
156
+ I(t("input", {
157
+ "onUpdate:modelValue": i[5] || (i[5] = (v) => e.styles.textColor = v),
158
+ type: "color",
159
+ label: "Primary Color",
160
+ class: "absolute top-0.5 left-1 size-8"
161
+ }, null, 512), [
162
+ [O, e.styles.textColor]
163
+ ]),
164
+ s(L, {
165
+ modelValue: e.styles.textColor,
166
+ "onUpdate:modelValue": i[6] || (i[6] = (v) => e.styles.textColor = v),
167
+ class: "pl-12",
168
+ id: "collection-theme-dialog-text-color"
169
+ }, null, 8, ["modelValue"])
170
+ ])
171
+ ])
172
+ ]),
173
+ i[22] || (i[22] = t("h2", { class: "font-semibold mb-4" }, "Rendering Method", -1)),
174
+ t("div", ye, [
175
+ t("div", null, [
176
+ t("div", pe, [
177
+ s(z, { class: "mb-4 text-muted-foreground" }, {
178
+ default: n(() => [...i[16] || (i[16] = [
179
+ m("Choose how this section should be styled on your site:", -1)
180
+ ])]),
181
+ _: 1
182
+ }),
183
+ s(V, {
184
+ modelValue: e.rendering,
185
+ "onUpdate:modelValue": i[7] || (i[7] = (v) => e.rendering = v),
186
+ "default-value": "class"
187
+ }, {
188
+ default: n(() => [
189
+ t("div", ve, [
190
+ s(x, {
191
+ id: "collection-theme-dialog-render-class",
192
+ value: "class"
193
+ }),
194
+ s(z, { for: "collection-theme-dialog-render-class" }, {
195
+ default: n(() => [...i[17] || (i[17] = [
196
+ m("Use a CSS class", -1)
197
+ ])]),
198
+ _: 1
199
+ })
200
+ ]),
201
+ t("div", be, [
202
+ s(x, {
203
+ id: "collection-theme-dialog-render-component",
204
+ value: "component"
205
+ }),
206
+ s(z, { for: "collection-theme-dialog-render-component" }, {
207
+ default: n(() => [...i[18] || (i[18] = [
208
+ m("Custom component", -1)
209
+ ])]),
210
+ _: 1
211
+ })
212
+ ])
213
+ ]),
214
+ _: 1
215
+ }, 8, ["modelValue"])
216
+ ])
217
+ ])
218
+ ]),
219
+ t("div", ge, [
220
+ e.rendering === "class" ? (a(), F("div", fe, [
221
+ s(z, {
222
+ class: "mb-2",
223
+ for: "collection-theme-dialog-class-name"
224
+ }, {
225
+ default: n(() => [...i[19] || (i[19] = [
226
+ m("Class name", -1)
227
+ ])]),
228
+ _: 1
229
+ }),
230
+ t("div", xe, [
231
+ s(L, {
232
+ modelValue: e.className,
233
+ "onUpdate:modelValue": i[8] || (i[8] = (v) => e.className = v),
234
+ id: "collection-theme-dialog-class-name"
235
+ }, null, 8, ["modelValue"])
236
+ ])
237
+ ])) : (a(), F("div", Ce, [
238
+ s(z, {
239
+ class: "mb-2",
240
+ for: "collection-theme-dialog-component-name"
241
+ }, {
242
+ default: n(() => [...i[20] || (i[20] = [
243
+ m("Component name", -1)
244
+ ])]),
245
+ _: 1
246
+ }),
247
+ t("div", ke, [
248
+ s(L, {
249
+ modelValue: e.componentName,
250
+ "onUpdate:modelValue": i[9] || (i[9] = (v) => e.componentName = v),
251
+ id: "collection-theme-dialog-component-name"
252
+ }, null, 8, ["modelValue"])
253
+ ])
254
+ ]))
255
+ ]),
256
+ e.rendering === "class" ? (a(), F("pre", De, "." + R(e.className) + ` {
257
+ background-color: ` + R(e.styles.backgroundColor) + `;
258
+ color: ` + R(e.styles.textColor) + `;
259
+
260
+ h1, h2, h3, h4, h5, h6 {
261
+ color: ` + R(e.styles.titleColor) + `;
262
+ }
263
+ }
264
+ `, 1)) : G("", !0)
265
+ ]),
266
+ s(r, null, {
267
+ default: n(() => [
268
+ D.value === "edit" && !c.value ? (a(), p(E, {
269
+ key: 0,
270
+ variant: "destructive",
271
+ class: "mr-auto",
272
+ onClick: H
273
+ }, {
274
+ default: n(() => [...i[23] || (i[23] = [
275
+ m(" Delete Style ", -1)
276
+ ])]),
277
+ _: 1
278
+ })) : G("", !0),
279
+ D.value === "edit" && c.value ? (a(), p(E, {
280
+ key: 1,
281
+ variant: "outline",
282
+ class: "mr-auto",
283
+ onClick: K
284
+ }, {
285
+ default: n(() => [...i[24] || (i[24] = [
286
+ m(" Reset to Default ", -1)
287
+ ])]),
288
+ _: 1
289
+ })) : G("", !0),
290
+ D.value === "create" ? (a(), p(E, {
291
+ key: 2,
292
+ type: "submit",
293
+ onClick: _
294
+ }, {
295
+ default: n(() => [...i[25] || (i[25] = [
296
+ m(" Add Style ", -1)
297
+ ])]),
298
+ _: 1
299
+ })) : (a(), p(E, {
300
+ key: 3,
301
+ type: "submit",
302
+ onClick: M
303
+ }, {
304
+ default: n(() => [...i[26] || (i[26] = [
305
+ m(" Save Changes ", -1)
306
+ ])]),
307
+ _: 1
308
+ }))
309
+ ]),
310
+ _: 1
311
+ })
312
+ ]),
313
+ _: 1
314
+ })
315
+ ]),
316
+ _: 1
317
+ }, 8, ["open"]);
318
+ };
319
+ }
320
+ }), Se = { class: "grid py-4" }, $e = { class: "grid grid-cols-2 gap-2 mb-6" }, Te = { class: "relative" }, Ve = { class: "grid grid-cols-3 gap-2 mb-6" }, we = { class: "relative" }, Ne = { class: "relative" }, Ue = { class: "relative" }, ze = { class: "grid grid-cols-1 gap-2 mb-6" }, Be = { class: "relative" }, Ae = { class: "flex items-center space-x-2" }, Re = { class: "flex items-center space-x-2" }, Le = { class: "grid grid-cols-2 gap-2 mb-6" }, Ee = { key: 0 }, _e = { class: "relative" }, Ie = { key: 1 }, Oe = { class: "relative" }, Ge = {
321
+ key: 0,
322
+ class: "bg-muted px-4 py-2 rounded-md text-sm"
323
+ }, Je = /* @__PURE__ */ X({
324
+ __name: "ButtonStyleDialog",
325
+ props: {
326
+ defaultBackground: {
327
+ type: String,
328
+ default: "#FFFFFF"
329
+ }
330
+ },
331
+ emits: ["add", "edit", "delete"],
332
+ setup(P, { expose: j, emit: $ }) {
333
+ const { confirm: T } = ee(), U = $, k = w(!1), D = w("create"), y = w(null), c = w(!1), e = h({
334
+ name: "",
335
+ rendering: "class",
336
+ className: "",
337
+ componentName: "",
338
+ styles: {
339
+ backgroundColor: "#FFFFFF",
340
+ textColor: "#000000",
341
+ borderColor: "#000000",
342
+ buttonRoundness: "none",
343
+ buttonStyle: "default"
344
+ }
345
+ }), J = (u) => {
346
+ u ? (D.value = "edit", y.value = u.id, c.value = u.id === "DEFAULT", e.name = u.name || "", e.rendering = u.rendering || "class", e.className = u.className || "", e.componentName = u.componentName || "", e.styles.backgroundColor = u.styles.backgroundColor || "#FFFFFF", e.styles.textColor = u.styles.textColor || "#000000", e.styles.borderColor = u.styles.borderColor || "#000000", e.styles.buttonRoundness = u.styles.buttonRoundness || "none", e.styles.buttonStyle = u.styles.buttonStyle || "default") : (D.value = "create", y.value = null, c.value = !1, e.name = "", e.rendering = "class", e.className = "", e.componentName = "", e.styles.backgroundColor = "#FFFFFF", e.styles.textColor = "#000000", e.styles.borderColor = "#000000", e.styles.buttonRoundness = "none", e.styles.buttonStyle = "default"), k.value = !0;
347
+ }, _ = () => {
348
+ U("add", e), k.value = !1;
349
+ }, M = () => {
350
+ c.value && (e.name = "Default"), U("edit", { id: y.value, ...e }), k.value = !1;
351
+ }, H = async () => {
352
+ if (c.value) return;
353
+ await T("Are you sure you want to delete this theme? This action cannot be undone.", "Delete Theme", "Delete") && (U("delete", y.value), k.value = !1);
354
+ }, K = () => {
355
+ e.styles.backgroundColor = "#FFFFFF", e.styles.textColor = "#000000", e.styles.borderColor = "#000000", e.styles.buttonRoundness = "none", e.styles.buttonStyle = "default";
356
+ }, S = (u) => {
357
+ switch (u) {
358
+ case "none":
359
+ return 0;
360
+ case "small":
361
+ return 8;
362
+ case "medium":
363
+ return 12;
364
+ case "pill":
365
+ return 99;
366
+ default:
367
+ return 0;
368
+ }
369
+ }, i = Q(() => {
370
+ let u = "." + e.className + ` {
371
+ `;
372
+ return u += ` background-color: ${e.styles.backgroundColor};
373
+ `, u += ` color: ${e.styles.textColor};
374
+ `, e.styles.buttonStyle === "outline" ? u += ` border: 1px solid ${e.styles.borderColor};
375
+ ` : e.styles.buttonStyle === "shadow" ? u += ` box-shadow: 0 3px 6px #ccc;
376
+ ` : e.styles.buttonStyle === "retro" && (u += ` box-shadow: inset 0 0 0 2px ${e.styles.borderColor}, 2px 2px 0 ${e.styles.borderColor};
377
+ `), e.styles.buttonRoundness !== "none" && (u += ` border-radius: ${S(e.styles.buttonRoundness)}px;
378
+ `), u += `}
379
+ `, u;
380
+ });
381
+ return j({
382
+ openDialog: J
383
+ }), (u, l) => {
384
+ const q = f("DialogTitle"), z = f("DialogDescription"), L = f("DialogHeader"), x = f("Label"), V = f("Input"), E = f("RadioGroupItem"), r = f("RadioGroup"), o = f("Button"), b = f("DialogFooter"), v = f("DialogScrollContent"), C = f("Dialog");
385
+ return a(), p(C, {
386
+ open: k.value,
387
+ "onUpdate:open": l[18] || (l[18] = (d) => k.value = d)
388
+ }, {
389
+ default: n(() => [
390
+ s(v, { class: "sm:max-w-2xl" }, {
391
+ default: n(() => [
392
+ s(L, null, {
393
+ default: n(() => [
394
+ s(q, null, {
395
+ default: n(() => [
396
+ m(R(D.value === "create" ? "Add New Button Style" : "Edit Button Style"), 1)
397
+ ]),
398
+ _: 1
399
+ }),
400
+ s(z, null, {
401
+ default: n(() => [...l[19] || (l[19] = [
402
+ m(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ", -1)
403
+ ])]),
404
+ _: 1
405
+ })
406
+ ]),
407
+ _: 1
408
+ }),
409
+ t("div", Se, [
410
+ t("div", $e, [
411
+ t("div", null, [
412
+ s(x, {
413
+ class: "mb-2",
414
+ for: "collection-theme-dialog-theme-name"
415
+ }, {
416
+ default: n(() => [...l[20] || (l[20] = [
417
+ m("Display name", -1)
418
+ ])]),
419
+ _: 1
420
+ }),
421
+ t("div", Te, [
422
+ s(V, {
423
+ modelValue: e.name,
424
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => e.name = d),
425
+ id: "collection-theme-dialog-theme-name",
426
+ disabled: c.value
427
+ }, null, 8, ["modelValue", "disabled"])
428
+ ])
429
+ ])
430
+ ]),
431
+ l[38] || (l[38] = t("h2", { class: "font-semibold mb-4" }, "Style Settings", -1)),
432
+ t("div", Ve, [
433
+ t("div", null, [
434
+ s(x, {
435
+ class: "mb-2",
436
+ for: "collection-theme-dialog-background-color"
437
+ }, {
438
+ default: n(() => [...l[21] || (l[21] = [
439
+ m("Background color", -1)
440
+ ])]),
441
+ _: 1
442
+ }),
443
+ t("div", we, [
444
+ I(t("input", {
445
+ "onUpdate:modelValue": l[1] || (l[1] = (d) => e.styles.backgroundColor = d),
446
+ type: "color",
447
+ label: "Primary Color",
448
+ class: "absolute top-0.5 left-1 size-8"
449
+ }, null, 512), [
450
+ [O, e.styles.backgroundColor]
451
+ ]),
452
+ s(V, {
453
+ modelValue: e.styles.backgroundColor,
454
+ "onUpdate:modelValue": l[2] || (l[2] = (d) => e.styles.backgroundColor = d),
455
+ class: "pl-12",
456
+ id: "collection-theme-dialog-background-color"
457
+ }, null, 8, ["modelValue"])
458
+ ])
459
+ ]),
460
+ t("div", null, [
461
+ s(x, {
462
+ class: "mb-2",
463
+ for: "collection-theme-dialog-text-color"
464
+ }, {
465
+ default: n(() => [...l[22] || (l[22] = [
466
+ m("Text color", -1)
467
+ ])]),
468
+ _: 1
469
+ }),
470
+ t("div", Ne, [
471
+ I(t("input", {
472
+ "onUpdate:modelValue": l[3] || (l[3] = (d) => e.styles.textColor = d),
473
+ type: "color",
474
+ label: "Primary Color",
475
+ class: "absolute top-0.5 left-1 size-8"
476
+ }, null, 512), [
477
+ [O, e.styles.textColor]
478
+ ]),
479
+ s(V, {
480
+ modelValue: e.styles.textColor,
481
+ "onUpdate:modelValue": l[4] || (l[4] = (d) => e.styles.textColor = d),
482
+ class: "pl-12",
483
+ id: "collection-theme-dialog-text-color"
484
+ }, null, 8, ["modelValue"])
485
+ ])
486
+ ]),
487
+ t("div", null, [
488
+ s(x, {
489
+ class: "mb-2",
490
+ for: "collection-theme-dialog-border-color"
491
+ }, {
492
+ default: n(() => [...l[23] || (l[23] = [
493
+ m("Border color", -1)
494
+ ])]),
495
+ _: 1
496
+ }),
497
+ t("div", Ue, [
498
+ I(t("input", {
499
+ "onUpdate:modelValue": l[5] || (l[5] = (d) => e.styles.borderColor = d),
500
+ type: "color",
501
+ label: "Primary Color",
502
+ class: "absolute top-0.5 left-1 size-8"
503
+ }, null, 512), [
504
+ [O, e.styles.borderColor]
505
+ ]),
506
+ s(V, {
507
+ modelValue: e.styles.borderColor,
508
+ "onUpdate:modelValue": l[6] || (l[6] = (d) => e.styles.borderColor = d),
509
+ class: "pl-12",
510
+ id: "collection-theme-dialog-border-color"
511
+ }, null, 8, ["modelValue"])
512
+ ])
513
+ ])
514
+ ]),
515
+ t("div", {
516
+ style: N(`--button-background-color: ${e.styles.backgroundColor}; --button-text-color: ${e.styles.textColor}`)
517
+ }, [
518
+ s(x, { class: "mb-4" }, {
519
+ default: n(() => [...l[24] || (l[24] = [
520
+ m("Shape", -1)
521
+ ])]),
522
+ _: 1
523
+ }),
524
+ t("div", {
525
+ class: "grid grid-cols-4 gap-4 mb-6 p-2 rounded",
526
+ style: N({ backgroundColor: P.defaultBackground })
527
+ }, [
528
+ t("div", {
529
+ class: "flex flex-col gap-2 items-center cursor-pointer",
530
+ onClick: l[7] || (l[7] = (d) => e.styles.buttonRoundness = "none")
531
+ }, [
532
+ l[25] || (l[25] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)]" }, "Button", -1)),
533
+ e.styles.buttonRoundness !== "none" ? (a(), p(g(B), {
534
+ key: 0,
535
+ class: "size-4 text-black/30"
536
+ })) : (a(), p(g(A), {
537
+ key: 1,
538
+ class: "size-4 text-black"
539
+ }))
540
+ ]),
541
+ t("div", {
542
+ class: "flex flex-col gap-2 items-center cursor-pointer",
543
+ onClick: l[8] || (l[8] = (d) => e.styles.buttonRoundness = "small")
544
+ }, [
545
+ l[26] || (l[26] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[8px]" }, "Button", -1)),
546
+ e.styles.buttonRoundness !== "small" ? (a(), p(g(B), {
547
+ key: 0,
548
+ class: "size-4 text-black/30"
549
+ })) : (a(), p(g(A), {
550
+ key: 1,
551
+ class: "size-4 text-black"
552
+ }))
553
+ ]),
554
+ t("div", {
555
+ class: "flex flex-col gap-2 items-center cursor-pointer",
556
+ onClick: l[9] || (l[9] = (d) => e.styles.buttonRoundness = "medium")
557
+ }, [
558
+ l[27] || (l[27] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[12px]" }, "Button", -1)),
559
+ e.styles.buttonRoundness !== "medium" ? (a(), p(g(B), {
560
+ key: 0,
561
+ class: "size-4 text-black/30"
562
+ })) : (a(), p(g(A), {
563
+ key: 1,
564
+ class: "size-4 text-black"
565
+ }))
566
+ ]),
567
+ t("div", {
568
+ class: "flex flex-col gap-2 items-center cursor-pointer",
569
+ onClick: l[10] || (l[10] = (d) => e.styles.buttonRoundness = "pill")
570
+ }, [
571
+ l[28] || (l[28] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[99px]" }, "Button", -1)),
572
+ e.styles.buttonRoundness !== "pill" ? (a(), p(g(B), {
573
+ key: 0,
574
+ class: "size-4 text-black/30"
575
+ })) : (a(), p(g(A), {
576
+ key: 1,
577
+ class: "size-4 text-black"
578
+ }))
579
+ ])
580
+ ], 4),
581
+ s(x, { class: "mb-4" }, {
582
+ default: n(() => [...l[29] || (l[29] = [
583
+ m("Style", -1)
584
+ ])]),
585
+ _: 1
586
+ }),
587
+ t("div", {
588
+ class: "grid grid-cols-4 gap-4 mb-6 p-2 rounded",
589
+ style: N(`--button-border-radius: ${S(e.styles.buttonRoundness)}px; --button-border-color: ${e.styles.borderColor}; background-color: ${P.defaultBackground}`)
590
+ }, [
591
+ t("div", {
592
+ class: "flex flex-col gap-2 items-center cursor-pointer",
593
+ onClick: l[11] || (l[11] = (d) => e.styles.buttonStyle = "default")
594
+ }, [
595
+ l[30] || (l[30] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]" }, "Button", -1)),
596
+ e.styles.buttonStyle !== "default" ? (a(), p(g(B), {
597
+ key: 0,
598
+ class: "size-4 text-black/30"
599
+ })) : (a(), p(g(A), {
600
+ key: 1,
601
+ class: "size-4 text-black"
602
+ }))
603
+ ]),
604
+ t("div", {
605
+ class: "flex flex-col gap-2 items-center cursor-pointer",
606
+ onClick: l[12] || (l[12] = (d) => e.styles.buttonStyle = "outline")
607
+ }, [
608
+ l[31] || (l[31] = t("div", { class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)] border border-[var(--button-border-color)]" }, " Button ", -1)),
609
+ e.styles.buttonStyle !== "outline" ? (a(), p(g(B), {
610
+ key: 0,
611
+ class: "size-4 text-black/30"
612
+ })) : (a(), p(g(A), {
613
+ key: 1,
614
+ class: "size-4 text-black"
615
+ }))
616
+ ]),
617
+ t("div", {
618
+ class: "flex flex-col gap-2 items-center cursor-pointer",
619
+ onClick: l[13] || (l[13] = (d) => e.styles.buttonStyle = "shadow")
620
+ }, [
621
+ l[32] || (l[32] = t("div", {
622
+ class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",
623
+ style: { "box-shadow": "0 3px 6px #ccc" }
624
+ }, " Button ", -1)),
625
+ e.styles.buttonStyle !== "shadow" ? (a(), p(g(B), {
626
+ key: 0,
627
+ class: "size-4 text-black/30"
628
+ })) : (a(), p(g(A), {
629
+ key: 1,
630
+ class: "size-4 text-black"
631
+ }))
632
+ ]),
633
+ t("div", {
634
+ class: "flex flex-col gap-2 items-center cursor-pointer",
635
+ onClick: l[14] || (l[14] = (d) => e.styles.buttonStyle = "retro")
636
+ }, [
637
+ t("div", {
638
+ class: "text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",
639
+ style: N(`box-shadow: inset 0 0 0 2px ${e.styles.borderColor}, 2px 2px 0 ${e.styles.borderColor};`)
640
+ }, " Button ", 4),
641
+ e.styles.buttonStyle !== "retro" ? (a(), p(g(B), {
642
+ key: 0,
643
+ class: "size-4 text-black/30"
644
+ })) : (a(), p(g(A), {
645
+ key: 1,
646
+ class: "size-4 text-black"
647
+ }))
648
+ ])
649
+ ], 4)
650
+ ], 4),
651
+ l[39] || (l[39] = t("h2", { class: "font-semibold mb-4" }, "Rendering Method", -1)),
652
+ t("div", ze, [
653
+ t("div", null, [
654
+ t("div", Be, [
655
+ s(x, { class: "mb-4 text-muted-foreground" }, {
656
+ default: n(() => [...l[33] || (l[33] = [
657
+ m("Choose how this section should be styled on your site:", -1)
658
+ ])]),
659
+ _: 1
660
+ }),
661
+ s(r, {
662
+ modelValue: e.rendering,
663
+ "onUpdate:modelValue": l[15] || (l[15] = (d) => e.rendering = d),
664
+ "default-value": "class"
665
+ }, {
666
+ default: n(() => [
667
+ t("div", Ae, [
668
+ s(E, {
669
+ id: "collection-theme-dialog-render-class",
670
+ value: "class"
671
+ }),
672
+ s(x, { for: "collection-theme-dialog-render-class" }, {
673
+ default: n(() => [...l[34] || (l[34] = [
674
+ m("Use a CSS class", -1)
675
+ ])]),
676
+ _: 1
677
+ })
678
+ ]),
679
+ t("div", Re, [
680
+ s(E, {
681
+ id: "collection-theme-dialog-render-component",
682
+ value: "component"
683
+ }),
684
+ s(x, { for: "collection-theme-dialog-render-component" }, {
685
+ default: n(() => [...l[35] || (l[35] = [
686
+ m("Custom component", -1)
687
+ ])]),
688
+ _: 1
689
+ })
690
+ ])
691
+ ]),
692
+ _: 1
693
+ }, 8, ["modelValue"])
694
+ ])
695
+ ])
696
+ ]),
697
+ t("div", Le, [
698
+ e.rendering === "class" ? (a(), F("div", Ee, [
699
+ s(x, {
700
+ class: "mb-2",
701
+ for: "collection-theme-dialog-class-name"
702
+ }, {
703
+ default: n(() => [...l[36] || (l[36] = [
704
+ m("Class name", -1)
705
+ ])]),
706
+ _: 1
707
+ }),
708
+ t("div", _e, [
709
+ s(V, {
710
+ modelValue: e.className,
711
+ "onUpdate:modelValue": l[16] || (l[16] = (d) => e.className = d),
712
+ id: "collection-theme-dialog-class-name"
713
+ }, null, 8, ["modelValue"])
714
+ ])
715
+ ])) : (a(), F("div", Ie, [
716
+ s(x, {
717
+ class: "mb-2",
718
+ for: "collection-theme-dialog-component-name"
719
+ }, {
720
+ default: n(() => [...l[37] || (l[37] = [
721
+ m("Component name", -1)
722
+ ])]),
723
+ _: 1
724
+ }),
725
+ t("div", Oe, [
726
+ s(V, {
727
+ modelValue: e.componentName,
728
+ "onUpdate:modelValue": l[17] || (l[17] = (d) => e.componentName = d),
729
+ id: "collection-theme-dialog-component-name"
730
+ }, null, 8, ["modelValue"])
731
+ ])
732
+ ]))
733
+ ]),
734
+ e.rendering === "class" ? (a(), F("pre", Ge, R(i.value), 1)) : G("", !0)
735
+ ]),
736
+ s(b, null, {
737
+ default: n(() => [
738
+ D.value === "edit" && !c.value ? (a(), p(o, {
739
+ key: 0,
740
+ variant: "destructive",
741
+ class: "mr-auto",
742
+ onClick: H
743
+ }, {
744
+ default: n(() => [...l[40] || (l[40] = [
745
+ m(" Delete Style ", -1)
746
+ ])]),
747
+ _: 1
748
+ })) : G("", !0),
749
+ D.value === "edit" && c.value ? (a(), p(o, {
750
+ key: 1,
751
+ variant: "outline",
752
+ class: "mr-auto",
753
+ onClick: K
754
+ }, {
755
+ default: n(() => [...l[41] || (l[41] = [
756
+ m(" Reset to Default ", -1)
757
+ ])]),
758
+ _: 1
759
+ })) : G("", !0),
760
+ D.value === "create" ? (a(), p(o, {
761
+ key: 2,
762
+ type: "submit",
763
+ onClick: _
764
+ }, {
765
+ default: n(() => [...l[42] || (l[42] = [
766
+ m(" Add Style ", -1)
767
+ ])]),
768
+ _: 1
769
+ })) : (a(), p(o, {
770
+ key: 3,
771
+ type: "submit",
772
+ onClick: M
773
+ }, {
774
+ default: n(() => [...l[43] || (l[43] = [
775
+ m(" Save Changes ", -1)
776
+ ])]),
777
+ _: 1
778
+ }))
779
+ ]),
780
+ _: 1
781
+ })
782
+ ]),
783
+ _: 1
784
+ })
785
+ ]),
786
+ _: 1
787
+ }, 8, ["open"]);
788
+ };
789
+ }
790
+ }), Me = { class: "grid py-4" }, He = { class: "grid grid-cols-2 gap-2 mb-6" }, Pe = { class: "relative" }, je = { class: "grid grid-cols-4 gap-2 mb-6" }, Ke = { class: "relative" }, qe = { class: "relative" }, Qe = { class: "relative" }, We = { class: "relative" }, Xe = { class: "grid grid-cols-1 gap-2 mb-6" }, Ye = { class: "relative" }, Ze = { class: "flex items-center space-x-2" }, he = { class: "flex items-center space-x-2" }, el = { class: "grid grid-cols-2 gap-2 mb-6" }, ll = { key: 0 }, tl = { class: "relative" }, ol = { key: 1 }, sl = { class: "relative" }, nl = {
791
+ key: 0,
792
+ class: "bg-muted px-4 py-2 rounded-md text-sm"
793
+ }, al = /* @__PURE__ */ X({
794
+ __name: "CardStyleDialog",
795
+ props: {
796
+ defaultBackground: {
797
+ type: String,
798
+ default: "#FFFFFF"
799
+ }
800
+ },
801
+ emits: ["add", "edit", "delete"],
802
+ setup(P, { expose: j, emit: $ }) {
803
+ const { confirm: T } = ee(), U = $, k = w(!1), D = w("create"), y = w(null), c = w(!1), e = h({
804
+ name: "",
805
+ rendering: "class",
806
+ className: "",
807
+ componentName: "",
808
+ styles: {
809
+ backgroundColor: "#FFFFFF",
810
+ titleColor: "#000000",
811
+ textColor: "#000000",
812
+ borderColor: "#000000",
813
+ roundness: "none",
814
+ style: "default"
815
+ }
816
+ }), J = (u) => {
817
+ u ? (D.value = "edit", y.value = u.id, c.value = u.id === "DEFAULT", e.name = u.name || "", e.rendering = u.rendering || "class", e.className = u.className || "", e.componentName = u.componentName || "", e.styles.backgroundColor = u.styles.backgroundColor || "#FFFFFF", e.styles.titleColor = u.styles.titleColor || "#000000", e.styles.textColor = u.styles.textColor || "#000000", e.styles.borderColor = u.styles.borderColor || "#000000", e.styles.roundness = u.styles.roundness || "none", e.styles.style = u.styles.style || "default") : (D.value = "create", y.value = null, c.value = !1, e.name = "", e.rendering = "class", e.className = "", e.componentName = "", e.styles.backgroundColor = "#FFFFFF", e.styles.titleColor = "#000000", e.styles.textColor = "#000000", e.styles.borderColor = "#000000", e.styles.roundness = "none", e.styles.style = "default"), k.value = !0;
818
+ }, _ = () => {
819
+ U("add", e), k.value = !1;
820
+ }, M = () => {
821
+ c.value && (e.name = "Default"), U("edit", { id: y.value, ...e }), k.value = !1;
822
+ }, H = async () => {
823
+ if (c.value) return;
824
+ await T("Are you sure you want to delete this theme? This action cannot be undone.", "Delete Theme", "Delete") && (U("delete", y.value), k.value = !1);
825
+ }, K = () => {
826
+ e.styles.backgroundColor = "#FFFFFF", e.styles.titleColor = "#000000", e.styles.textColor = "#000000", e.styles.borderColor = "#000000", e.styles.roundness = "none", e.styles.style = "default";
827
+ }, S = (u) => {
828
+ switch (u) {
829
+ case "none":
830
+ return 0;
831
+ case "small":
832
+ return 8;
833
+ case "medium":
834
+ return 12;
835
+ default:
836
+ return 0;
837
+ }
838
+ }, i = Q(() => {
839
+ let u = "." + e.className + ` {
840
+ `;
841
+ return u += ` background-color: ${e.styles.backgroundColor};
842
+ `, u += ` color: ${e.styles.textColor};
843
+ `, e.styles.style === "outline" ? u += ` border: 1px solid ${e.styles.borderColor};
844
+ ` : e.styles.style === "shadow" ? u += ` box-shadow: 0 3px 6px #ccc;
845
+ ` : e.styles.style === "retro" && (u += ` box-shadow: inset 0 0 0 2px ${e.styles.borderColor}, 2px 2px 0 ${e.styles.borderColor};
846
+ `), e.styles.roundness !== "none" && (u += ` border-radius: ${S(e.styles.roundness)}px;
847
+ `), u += `}
848
+ `, u;
849
+ });
850
+ return j({
851
+ openDialog: J
852
+ }), (u, l) => {
853
+ const q = f("DialogTitle"), z = f("DialogDescription"), L = f("DialogHeader"), x = f("Label"), V = f("Input"), E = f("RadioGroupItem"), r = f("RadioGroup"), o = f("Button"), b = f("DialogFooter"), v = f("DialogScrollContent"), C = f("Dialog");
854
+ return a(), p(C, {
855
+ open: k.value,
856
+ "onUpdate:open": l[19] || (l[19] = (d) => k.value = d)
857
+ }, {
858
+ default: n(() => [
859
+ s(v, { class: "sm:max-w-2xl" }, {
860
+ default: n(() => [
861
+ s(L, null, {
862
+ default: n(() => [
863
+ s(q, null, {
864
+ default: n(() => [
865
+ m(R(D.value === "create" ? "Add New Card Style" : "Edit Card Style"), 1)
866
+ ]),
867
+ _: 1
868
+ }),
869
+ s(z, null, {
870
+ default: n(() => [...l[20] || (l[20] = [
871
+ m(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ", -1)
872
+ ])]),
873
+ _: 1
874
+ })
875
+ ]),
876
+ _: 1
877
+ }),
878
+ t("div", Me, [
879
+ t("div", He, [
880
+ t("div", null, [
881
+ s(x, {
882
+ class: "mb-2",
883
+ for: "collection-theme-dialog-theme-name"
884
+ }, {
885
+ default: n(() => [...l[21] || (l[21] = [
886
+ m("Display name", -1)
887
+ ])]),
888
+ _: 1
889
+ }),
890
+ t("div", Pe, [
891
+ s(V, {
892
+ modelValue: e.name,
893
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => e.name = d),
894
+ id: "collection-theme-dialog-theme-name",
895
+ disabled: c.value
896
+ }, null, 8, ["modelValue", "disabled"])
897
+ ])
898
+ ])
899
+ ]),
900
+ l[40] || (l[40] = t("h2", { class: "font-semibold mb-4" }, "Style Settings", -1)),
901
+ t("div", je, [
902
+ t("div", null, [
903
+ s(x, {
904
+ class: "mb-2",
905
+ for: "collection-theme-dialog-background-color"
906
+ }, {
907
+ default: n(() => [...l[22] || (l[22] = [
908
+ m("Background color", -1)
909
+ ])]),
910
+ _: 1
911
+ }),
912
+ t("div", Ke, [
913
+ I(t("input", {
914
+ "onUpdate:modelValue": l[1] || (l[1] = (d) => e.styles.backgroundColor = d),
915
+ type: "color",
916
+ label: "Background color",
917
+ class: "absolute top-0.5 left-1 size-8"
918
+ }, null, 512), [
919
+ [O, e.styles.backgroundColor]
920
+ ]),
921
+ s(V, {
922
+ modelValue: e.styles.backgroundColor,
923
+ "onUpdate:modelValue": l[2] || (l[2] = (d) => e.styles.backgroundColor = d),
924
+ class: "pl-12",
925
+ id: "collection-theme-dialog-background-color"
926
+ }, null, 8, ["modelValue"])
927
+ ])
928
+ ]),
929
+ t("div", null, [
930
+ s(x, {
931
+ class: "mb-2",
932
+ for: "collection-theme-dialog-title-color"
933
+ }, {
934
+ default: n(() => [...l[23] || (l[23] = [
935
+ m("Heading color", -1)
936
+ ])]),
937
+ _: 1
938
+ }),
939
+ t("div", qe, [
940
+ I(t("input", {
941
+ "onUpdate:modelValue": l[3] || (l[3] = (d) => e.styles.titleColor = d),
942
+ type: "color",
943
+ label: "Heading color",
944
+ class: "absolute top-0.5 left-1 size-8"
945
+ }, null, 512), [
946
+ [O, e.styles.titleColor]
947
+ ]),
948
+ s(V, {
949
+ modelValue: e.styles.titleColor,
950
+ "onUpdate:modelValue": l[4] || (l[4] = (d) => e.styles.titleColor = d),
951
+ class: "pl-12",
952
+ id: "collection-theme-dialog-title-color"
953
+ }, null, 8, ["modelValue"])
954
+ ])
955
+ ]),
956
+ t("div", null, [
957
+ s(x, {
958
+ class: "mb-2",
959
+ for: "collection-theme-dialog-text-color"
960
+ }, {
961
+ default: n(() => [...l[24] || (l[24] = [
962
+ m("Text color", -1)
963
+ ])]),
964
+ _: 1
965
+ }),
966
+ t("div", Qe, [
967
+ I(t("input", {
968
+ "onUpdate:modelValue": l[5] || (l[5] = (d) => e.styles.textColor = d),
969
+ type: "color",
970
+ label: "Text color",
971
+ class: "absolute top-0.5 left-1 size-8"
972
+ }, null, 512), [
973
+ [O, e.styles.textColor]
974
+ ]),
975
+ s(V, {
976
+ modelValue: e.styles.textColor,
977
+ "onUpdate:modelValue": l[6] || (l[6] = (d) => e.styles.textColor = d),
978
+ class: "pl-12",
979
+ id: "collection-theme-dialog-text-color"
980
+ }, null, 8, ["modelValue"])
981
+ ])
982
+ ]),
983
+ t("div", null, [
984
+ s(x, {
985
+ class: "mb-2",
986
+ for: "collection-theme-dialog-border-color"
987
+ }, {
988
+ default: n(() => [...l[25] || (l[25] = [
989
+ m("Border color", -1)
990
+ ])]),
991
+ _: 1
992
+ }),
993
+ t("div", We, [
994
+ I(t("input", {
995
+ "onUpdate:modelValue": l[7] || (l[7] = (d) => e.styles.borderColor = d),
996
+ type: "color",
997
+ label: "Border color",
998
+ class: "absolute top-0.5 left-1 size-8"
999
+ }, null, 512), [
1000
+ [O, e.styles.borderColor]
1001
+ ]),
1002
+ s(V, {
1003
+ modelValue: e.styles.borderColor,
1004
+ "onUpdate:modelValue": l[8] || (l[8] = (d) => e.styles.borderColor = d),
1005
+ class: "pl-12",
1006
+ id: "collection-theme-dialog-border-color"
1007
+ }, null, 8, ["modelValue"])
1008
+ ])
1009
+ ])
1010
+ ]),
1011
+ t("div", {
1012
+ style: N(`--card-background-color: ${e.styles.backgroundColor}; --card-title-color: ${e.styles.titleColor}; --card-text-color: ${e.styles.textColor}`)
1013
+ }, [
1014
+ s(x, { class: "mb-4" }, {
1015
+ default: n(() => [...l[26] || (l[26] = [
1016
+ m("Shape", -1)
1017
+ ])]),
1018
+ _: 1
1019
+ }),
1020
+ t("div", {
1021
+ class: "grid grid-cols-3 gap-4 mb-6 p-2 rounded",
1022
+ style: N({ backgroundColor: P.defaultBackground })
1023
+ }, [
1024
+ t("div", {
1025
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1026
+ onClick: l[9] || (l[9] = (d) => e.styles.roundness = "none")
1027
+ }, [
1028
+ l[27] || (l[27] = t("div", { class: "text-center px-8 py-4 bg-[var(--card-background-color)]" }, [
1029
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1030
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1031
+ ], -1)),
1032
+ e.styles.roundness !== "none" ? (a(), p(g(B), {
1033
+ key: 0,
1034
+ class: "size-4 text-black/30"
1035
+ })) : (a(), p(g(A), {
1036
+ key: 1,
1037
+ class: "size-4 text-black"
1038
+ }))
1039
+ ]),
1040
+ t("div", {
1041
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1042
+ onClick: l[10] || (l[10] = (d) => e.styles.roundness = "small")
1043
+ }, [
1044
+ l[28] || (l[28] = t("div", { class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[8px]" }, [
1045
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1046
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1047
+ ], -1)),
1048
+ e.styles.roundness !== "small" ? (a(), p(g(B), {
1049
+ key: 0,
1050
+ class: "size-4 text-black/30"
1051
+ })) : (a(), p(g(A), {
1052
+ key: 1,
1053
+ class: "size-4 text-black"
1054
+ }))
1055
+ ]),
1056
+ t("div", {
1057
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1058
+ onClick: l[11] || (l[11] = (d) => e.styles.roundness = "medium")
1059
+ }, [
1060
+ l[29] || (l[29] = t("div", { class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[12px]" }, [
1061
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1062
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1063
+ ], -1)),
1064
+ e.styles.roundness !== "medium" ? (a(), p(g(B), {
1065
+ key: 0,
1066
+ class: "size-4 text-black/30"
1067
+ })) : (a(), p(g(A), {
1068
+ key: 1,
1069
+ class: "size-4 text-black"
1070
+ }))
1071
+ ])
1072
+ ], 4),
1073
+ s(x, { class: "mb-4" }, {
1074
+ default: n(() => [...l[30] || (l[30] = [
1075
+ m("Style", -1)
1076
+ ])]),
1077
+ _: 1
1078
+ }),
1079
+ t("div", {
1080
+ class: "grid grid-cols-4 gap-4 mb-6 p-2 rounded",
1081
+ style: N(`--card-border-radius: ${S(e.styles.roundness)}px; --card-border-color: ${e.styles.borderColor}; background-color: ${P.defaultBackground}`)
1082
+ }, [
1083
+ t("div", {
1084
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1085
+ onClick: l[12] || (l[12] = (d) => e.styles.style = "default")
1086
+ }, [
1087
+ l[31] || (l[31] = t("div", { class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]" }, [
1088
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1089
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1090
+ ], -1)),
1091
+ e.styles.style !== "default" ? (a(), p(g(B), {
1092
+ key: 0,
1093
+ class: "size-4 text-black/30"
1094
+ })) : (a(), p(g(A), {
1095
+ key: 1,
1096
+ class: "size-4 text-black"
1097
+ }))
1098
+ ]),
1099
+ t("div", {
1100
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1101
+ onClick: l[13] || (l[13] = (d) => e.styles.style = "outline")
1102
+ }, [
1103
+ l[32] || (l[32] = t("div", { class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)] border border-[var(--card-border-color)]" }, [
1104
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1105
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1106
+ ], -1)),
1107
+ e.styles.style !== "outline" ? (a(), p(g(B), {
1108
+ key: 0,
1109
+ class: "size-4 text-black/30"
1110
+ })) : (a(), p(g(A), {
1111
+ key: 1,
1112
+ class: "size-4 text-black"
1113
+ }))
1114
+ ]),
1115
+ t("div", {
1116
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1117
+ onClick: l[14] || (l[14] = (d) => e.styles.style = "shadow")
1118
+ }, [
1119
+ l[33] || (l[33] = t("div", {
1120
+ class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",
1121
+ style: { "box-shadow": "0 3px 6px #ccc" }
1122
+ }, [
1123
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card"),
1124
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.")
1125
+ ], -1)),
1126
+ e.styles.style !== "shadow" ? (a(), p(g(B), {
1127
+ key: 0,
1128
+ class: "size-4 text-black/30"
1129
+ })) : (a(), p(g(A), {
1130
+ key: 1,
1131
+ class: "size-4 text-black"
1132
+ }))
1133
+ ]),
1134
+ t("div", {
1135
+ class: "flex flex-col gap-2 items-center cursor-pointer",
1136
+ onClick: l[15] || (l[15] = (d) => e.styles.style = "retro")
1137
+ }, [
1138
+ t("div", {
1139
+ class: "text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",
1140
+ style: N(`box-shadow: inset 0 0 0 2px ${e.styles.borderColor}, 2px 2px 0 ${e.styles.borderColor};`)
1141
+ }, [...l[34] || (l[34] = [
1142
+ t("strong", { class: "text-2xl text-[var(--card-title-color)]" }, "Card", -1),
1143
+ t("p", { class: "text-[var(--card-text-color)]" }, "Lorem ipsum dolor sit amet.", -1)
1144
+ ])], 4),
1145
+ e.styles.style !== "retro" ? (a(), p(g(B), {
1146
+ key: 0,
1147
+ class: "size-4 text-black/30"
1148
+ })) : (a(), p(g(A), {
1149
+ key: 1,
1150
+ class: "size-4 text-black"
1151
+ }))
1152
+ ])
1153
+ ], 4)
1154
+ ], 4),
1155
+ l[41] || (l[41] = t("h2", { class: "font-semibold mb-4" }, "Rendering Method", -1)),
1156
+ t("div", Xe, [
1157
+ t("div", null, [
1158
+ t("div", Ye, [
1159
+ s(x, { class: "mb-4 text-muted-foreground" }, {
1160
+ default: n(() => [...l[35] || (l[35] = [
1161
+ m("Choose how this section should be styled on your site:", -1)
1162
+ ])]),
1163
+ _: 1
1164
+ }),
1165
+ s(r, {
1166
+ modelValue: e.rendering,
1167
+ "onUpdate:modelValue": l[16] || (l[16] = (d) => e.rendering = d),
1168
+ "default-value": "class"
1169
+ }, {
1170
+ default: n(() => [
1171
+ t("div", Ze, [
1172
+ s(E, {
1173
+ id: "collection-theme-dialog-render-class",
1174
+ value: "class"
1175
+ }),
1176
+ s(x, { for: "collection-theme-dialog-render-class" }, {
1177
+ default: n(() => [...l[36] || (l[36] = [
1178
+ m("Use a CSS class", -1)
1179
+ ])]),
1180
+ _: 1
1181
+ })
1182
+ ]),
1183
+ t("div", he, [
1184
+ s(E, {
1185
+ id: "collection-theme-dialog-render-component",
1186
+ value: "component"
1187
+ }),
1188
+ s(x, { for: "collection-theme-dialog-render-component" }, {
1189
+ default: n(() => [...l[37] || (l[37] = [
1190
+ m("Custom component", -1)
1191
+ ])]),
1192
+ _: 1
1193
+ })
1194
+ ])
1195
+ ]),
1196
+ _: 1
1197
+ }, 8, ["modelValue"])
1198
+ ])
1199
+ ])
1200
+ ]),
1201
+ t("div", el, [
1202
+ e.rendering === "class" ? (a(), F("div", ll, [
1203
+ s(x, {
1204
+ class: "mb-2",
1205
+ for: "collection-theme-dialog-class-name"
1206
+ }, {
1207
+ default: n(() => [...l[38] || (l[38] = [
1208
+ m("Class name", -1)
1209
+ ])]),
1210
+ _: 1
1211
+ }),
1212
+ t("div", tl, [
1213
+ s(V, {
1214
+ modelValue: e.className,
1215
+ "onUpdate:modelValue": l[17] || (l[17] = (d) => e.className = d),
1216
+ id: "collection-theme-dialog-class-name"
1217
+ }, null, 8, ["modelValue"])
1218
+ ])
1219
+ ])) : (a(), F("div", ol, [
1220
+ s(x, {
1221
+ class: "mb-2",
1222
+ for: "collection-theme-dialog-component-name"
1223
+ }, {
1224
+ default: n(() => [...l[39] || (l[39] = [
1225
+ m("Component name", -1)
1226
+ ])]),
1227
+ _: 1
1228
+ }),
1229
+ t("div", sl, [
1230
+ s(V, {
1231
+ modelValue: e.componentName,
1232
+ "onUpdate:modelValue": l[18] || (l[18] = (d) => e.componentName = d),
1233
+ id: "collection-theme-dialog-component-name"
1234
+ }, null, 8, ["modelValue"])
1235
+ ])
1236
+ ]))
1237
+ ]),
1238
+ e.rendering === "class" ? (a(), F("pre", nl, R(i.value), 1)) : G("", !0)
1239
+ ]),
1240
+ s(b, null, {
1241
+ default: n(() => [
1242
+ D.value === "edit" && !c.value ? (a(), p(o, {
1243
+ key: 0,
1244
+ variant: "destructive",
1245
+ class: "mr-auto",
1246
+ onClick: H
1247
+ }, {
1248
+ default: n(() => [...l[42] || (l[42] = [
1249
+ m(" Delete Style ", -1)
1250
+ ])]),
1251
+ _: 1
1252
+ })) : G("", !0),
1253
+ D.value === "edit" && c.value ? (a(), p(o, {
1254
+ key: 1,
1255
+ variant: "outline",
1256
+ class: "mr-auto",
1257
+ onClick: K
1258
+ }, {
1259
+ default: n(() => [...l[43] || (l[43] = [
1260
+ m(" Reset to Default ", -1)
1261
+ ])]),
1262
+ _: 1
1263
+ })) : G("", !0),
1264
+ D.value === "create" ? (a(), p(o, {
1265
+ key: 2,
1266
+ type: "submit",
1267
+ onClick: _
1268
+ }, {
1269
+ default: n(() => [...l[44] || (l[44] = [
1270
+ m(" Add Style ", -1)
1271
+ ])]),
1272
+ _: 1
1273
+ })) : (a(), p(o, {
1274
+ key: 3,
1275
+ type: "submit",
1276
+ onClick: M
1277
+ }, {
1278
+ default: n(() => [...l[45] || (l[45] = [
1279
+ m(" Save Changes ", -1)
1280
+ ])]),
1281
+ _: 1
1282
+ }))
1283
+ ]),
1284
+ _: 1
1285
+ })
1286
+ ]),
1287
+ _: 1
1288
+ })
1289
+ ]),
1290
+ _: 1
1291
+ }, 8, ["open"]);
1292
+ };
1293
+ }
1294
+ }), rl = { class: "w-full" }, dl = { class: "flex items-center justify-between gap-4 w-full my-4" }, il = {
1295
+ key: 0,
1296
+ class: "flex gap-4 flex-wrap mb-8"
1297
+ }, ul = ["onClick"], cl = { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, ml = {
1298
+ key: 1,
1299
+ class: "flex gap-4 flex-wrap mb-8"
1300
+ }, yl = {
1301
+ key: 2,
1302
+ class: "flex gap-4 flex-wrap mb-8"
1303
+ }, pl = ["onClick"], vl = { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, bl = {
1304
+ key: 3,
1305
+ class: "flex gap-4 flex-wrap mb-8"
1306
+ }, gl = {
1307
+ key: 4,
1308
+ class: "flex gap-4 flex-wrap mb-8"
1309
+ }, fl = ["onClick"], xl = { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, Cl = {
1310
+ key: 5,
1311
+ class: "flex gap-4 flex-wrap mb-8"
1312
+ }, Sl = /* @__PURE__ */ X({
1313
+ __name: "GlobalStyling",
1314
+ setup(P) {
1315
+ const { navigateTo: j } = te(), { getModuleData: $, setModuleData: T } = oe();
1316
+ se(() => [
1317
+ { text: "Global Styling" }
1318
+ ]);
1319
+ const U = w(""), k = w(""), D = w(""), y = w(null), c = w(null), e = w(null), J = Q(() => y.value === null ? null : y.value && y.value.find((r) => r.id === "DEFAULT") ? y.value : [
1320
+ { id: "DEFAULT", name: "Default", className: "", styles: { backgroundColor: "#FFFFFF", textColor: "#000000" } },
1321
+ ...y.value
1322
+ ]), _ = Q(() => J.value?.find((r) => r.id === "DEFAULT")?.styles.backgroundColor ?? "#FFFFFF"), M = Q(() => c.value === null ? null : c.value && c.value.find((r) => r.id === "DEFAULT") ? c.value : [
1323
+ { id: "DEFAULT", name: "Default", className: "", styles: { backgroundColor: "#FFFFFF", textColor: "#000000" } },
1324
+ ...c.value
1325
+ ]), H = Q(() => e.value === null ? null : e.value && e.value.find((r) => r.id === "DEFAULT") ? e.value : [
1326
+ { id: "DEFAULT", name: "Default", className: "", styles: { backgroundColor: "#FFFFFF", textColor: "#000000" } },
1327
+ ...e.value
1328
+ ]);
1329
+ async function K(r) {
1330
+ let o = JSON.parse(JSON.stringify(r)), b = crypto.randomUUID();
1331
+ o.id = b, y.value.push(o), y.value = await $("sectionThemes") || [], y.value.push(o), T("sectionThemes", y.value);
1332
+ }
1333
+ async function S(r) {
1334
+ let o = JSON.parse(JSON.stringify(r)), b = y.value.findIndex((v) => v.id === o.id);
1335
+ b !== -1 ? y.value[b] = o : o.id === "DEFAULT" && (Array.isArray(y.value) || (y.value = []), y.value = [
1336
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1337
+ ...y.value
1338
+ ]), y.value = await $("sectionThemes") || [], b = y.value.findIndex((v) => v.id === o.id), b !== -1 ? (y.value[b] = o, T("sectionThemes", y.value)) : o.id === "DEFAULT" && (Array.isArray(y.value) || (y.value = []), y.value = [
1339
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1340
+ ...y.value
1341
+ ], T("sectionThemes", y.value));
1342
+ }
1343
+ async function i(r) {
1344
+ y.value = y.value.filter((o) => o.id !== r), y.value = await $("sectionThemes") || [], y.value = y.value.filter((o) => o.id !== r), T("sectionThemes", y.value);
1345
+ }
1346
+ async function u(r) {
1347
+ let o = JSON.parse(JSON.stringify(r)), b = crypto.randomUUID();
1348
+ o.id = b, c.value.push(o), c.value = await $("buttonThemes") || [], c.value.push(o), T("buttonThemes", c.value);
1349
+ }
1350
+ async function l(r) {
1351
+ let o = JSON.parse(JSON.stringify(r)), b = c.value.findIndex((v) => v.id === o.id);
1352
+ b !== -1 ? c.value[b] = o : o.id === "DEFAULT" && (Array.isArray(c.value) || (c.value = []), c.value = [
1353
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1354
+ ...c.value
1355
+ ]), c.value = await $("buttonThemes") || [], b = c.value.findIndex((v) => v.id === o.id), b !== -1 ? (c.value[b] = o, T("buttonThemes", c.value)) : o.id === "DEFAULT" && (Array.isArray(c.value) || (c.value = []), c.value = [
1356
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1357
+ ...c.value
1358
+ ], T("buttonThemes", c.value));
1359
+ }
1360
+ async function q(r) {
1361
+ c.value = c.value.filter((o) => o.id !== r), c.value = await $("buttonThemes") || [], c.value = c.value.filter((o) => o.id !== r), T("buttonThemes", c.value);
1362
+ }
1363
+ const z = function(r) {
1364
+ let o = {};
1365
+ if (o.backgroundColor = r.styles.backgroundColor, o.color = r.styles.textColor, r.styles.buttonStyle === "outline" ? o.border = `1px solid ${r.styles.borderColor}` : r.styles.buttonStyle === "shadow" ? o.boxShadow = "0 3px 6px #ccc" : r.styles.buttonStyle === "retro" && (o.boxShadow = `inset 0 0 0 2px ${r.styles.borderColor}, 2px 2px 0 ${r.styles.borderColor}`), r.styles.buttonRoundness !== "none") {
1366
+ let b = 0;
1367
+ r.styles.buttonRoundness === "small" ? b = 4 : r.styles.buttonRoundness === "medium" ? b = 8 : r.styles.buttonRoundness === "pill" && (b = 9999), o.borderRadius = `${b}px`;
1368
+ }
1369
+ return o;
1370
+ };
1371
+ async function L(r) {
1372
+ let o = JSON.parse(JSON.stringify(r)), b = crypto.randomUUID();
1373
+ o.id = b, e.value.push(o), e.value = await $("cardThemes") || [], e.value.push(o), T("cardThemes", e.value);
1374
+ }
1375
+ async function x(r) {
1376
+ let o = JSON.parse(JSON.stringify(r)), b = e.value.findIndex((v) => v.id === o.id);
1377
+ b !== -1 ? e.value[b] = o : o.id === "DEFAULT" && (Array.isArray(e.value) || (e.value = []), e.value = [
1378
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1379
+ ...e.value
1380
+ ]), e.value = await $("cardThemes") || [], b = e.value.findIndex((v) => v.id === o.id), b !== -1 ? (e.value[b] = o, T("cardThemes", e.value)) : o.id === "DEFAULT" && (Array.isArray(e.value) || (e.value = []), e.value = [
1381
+ { id: "DEFAULT", name: "Default", styles: o.styles },
1382
+ ...e.value
1383
+ ], T("cardThemes", e.value));
1384
+ }
1385
+ async function V(r) {
1386
+ e.value = e.value.filter((o) => o.id !== r), e.value = await $("cardThemes") || [], e.value = e.value.filter((o) => o.id !== r), T("cardThemes", e.value);
1387
+ }
1388
+ const E = function(r) {
1389
+ let o = {};
1390
+ if (o.backgroundColor = r.styles.backgroundColor, o.color = r.styles.textColor, r.styles.style === "outline" ? o.border = `1px solid ${r.styles.borderColor}` : r.styles.style === "shadow" ? o.boxShadow = "0 3px 6px #ccc" : r.styles.style === "retro" && (o.boxShadow = `inset 0 0 0 2px ${r.styles.borderColor}, 2px 2px 0 ${r.styles.borderColor}`), r.styles.roundness !== "none") {
1391
+ let b = 0;
1392
+ r.styles.roundness === "small" ? b = 4 : r.styles.roundness === "medium" && (b = 8), o.borderRadius = `${b}px`;
1393
+ }
1394
+ return o;
1395
+ };
1396
+ return le(() => {
1397
+ $("sectionThemes").then((r) => {
1398
+ y.value = r || [];
1399
+ }), $("buttonThemes").then((r) => {
1400
+ c.value = r || [];
1401
+ }), $("cardThemes").then((r) => {
1402
+ e.value = r || [];
1403
+ });
1404
+ }), (r, o) => {
1405
+ const b = f("Button"), v = f("Skeleton");
1406
+ return a(), F(W, null, [
1407
+ t("div", rl, [
1408
+ t("div", dl, [
1409
+ s(b, {
1410
+ onClick: o[0] || (o[0] = (C) => g(j)("/")),
1411
+ variant: "link",
1412
+ class: "!pl-0"
1413
+ }, {
1414
+ default: n(() => [
1415
+ s(g(ne), { class: "size-4" }),
1416
+ o[4] || (o[4] = m(" Collections ", -1))
1417
+ ]),
1418
+ _: 1
1419
+ })
1420
+ ]),
1421
+ o[10] || (o[10] = t("h1", { class: "text-3xl mb-8" }, "Global Styling", -1)),
1422
+ o[11] || (o[11] = t("h3", { class: "text-2xl mb-2" }, "Section Variants", -1)),
1423
+ o[12] || (o[12] = t("p", { class: "mb-6 max-w-3xl text-muted-foreground" }, " Set up the default design variants for your sections. These styles will be available across all collections by default, but you can choose to disable them within individual collections if needed. ", -1)),
1424
+ J.value !== null ? (a(), F("div", il, [
1425
+ t("div", {
1426
+ class: "group/item flex flex-col gap-2 items-center",
1427
+ onClick: o[1] || (o[1] = (C) => U.value.openDialog())
1428
+ }, [
1429
+ s(b, {
1430
+ variant: "outline",
1431
+ class: "size-44 border-dotted",
1432
+ tabindex: "-1"
1433
+ }, {
1434
+ default: n(() => [
1435
+ s(g(Z), { class: "size-14" })
1436
+ ]),
1437
+ _: 1
1438
+ }),
1439
+ o[5] || (o[5] = t("p", { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, "New Style", -1))
1440
+ ]),
1441
+ (a(!0), F(W, null, Y(J.value, (C) => (a(), F("div", {
1442
+ class: "group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",
1443
+ key: C.id,
1444
+ onClick: (d) => U.value.openDialog(C)
1445
+ }, [
1446
+ t("div", {
1447
+ class: "flex flex-col items-start rounded-md p-4 size-44",
1448
+ style: N({ backgroundColor: C.styles.backgroundColor, border: "1px solid #E5E7EB" })
1449
+ }, [
1450
+ t("strong", {
1451
+ class: "text-2xl",
1452
+ style: N({ color: C.styles.titleColor })
1453
+ }, "Title", 4),
1454
+ t("p", {
1455
+ class: "mb-1",
1456
+ style: N({ color: C.styles.textColor })
1457
+ }, [...o[6] || (o[6] = [
1458
+ m("Lorem ipsum dolor", -1),
1459
+ t("br", null, null, -1),
1460
+ m("sit amet.", -1)
1461
+ ])], 4),
1462
+ C.className ? (a(), F("p", {
1463
+ key: 0,
1464
+ class: "px-3 py-1.5 rounded-[99px]",
1465
+ style: N({ backgroundColor: C.styles.textColor, color: C.styles.backgroundColor })
1466
+ }, "." + R(C.className), 5)) : G("", !0)
1467
+ ], 4),
1468
+ t("p", cl, R(C.name), 1)
1469
+ ], 8, ul))), 128))
1470
+ ])) : (a(), F("div", ml, [
1471
+ s(v, { class: "size-44 rounded-md" }),
1472
+ s(v, { class: "size-44 rounded-md" })
1473
+ ])),
1474
+ o[13] || (o[13] = t("h3", { class: "text-2xl mb-2" }, "Button Variants", -1)),
1475
+ o[14] || (o[14] = t("p", { class: "mb-6 max-w-3xl text-muted-foreground" }, " Define your standard button styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ", -1)),
1476
+ M.value !== null ? (a(), F("div", yl, [
1477
+ t("div", {
1478
+ class: "group/item flex flex-col gap-2 items-center",
1479
+ onClick: o[2] || (o[2] = (C) => k.value.openDialog())
1480
+ }, [
1481
+ s(b, {
1482
+ variant: "outline",
1483
+ class: "size-44 border-dotted",
1484
+ tabindex: "-1"
1485
+ }, {
1486
+ default: n(() => [
1487
+ s(g(Z), { class: "size-14" })
1488
+ ]),
1489
+ _: 1
1490
+ }),
1491
+ o[7] || (o[7] = t("p", { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, "New Style", -1))
1492
+ ]),
1493
+ (a(!0), F(W, null, Y(M.value, (C) => (a(), F("div", {
1494
+ class: "group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",
1495
+ key: C.id,
1496
+ onClick: (d) => k.value.openDialog(C)
1497
+ }, [
1498
+ t("div", {
1499
+ class: "flex flex-col items-center justify-center rounded-md p-4 size-44",
1500
+ style: N({ backgroundColor: _.value })
1501
+ }, [
1502
+ t("div", {
1503
+ style: N(z(C)),
1504
+ class: "px-4 py-2"
1505
+ }, " Button ", 4)
1506
+ ], 4),
1507
+ t("p", vl, R(C.name), 1)
1508
+ ], 8, pl))), 128))
1509
+ ])) : (a(), F("div", bl, [
1510
+ s(v, { class: "size-44 rounded-md" }),
1511
+ s(v, { class: "size-44 rounded-md" })
1512
+ ])),
1513
+ o[15] || (o[15] = t("h3", { class: "text-2xl mb-2" }, "Card Variants", -1)),
1514
+ o[16] || (o[16] = t("p", { class: "mb-6 max-w-3xl text-muted-foreground" }, " Define your standard card styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ", -1)),
1515
+ H.value !== null ? (a(), F("div", gl, [
1516
+ t("div", {
1517
+ class: "group/item flex flex-col gap-2 items-center",
1518
+ onClick: o[3] || (o[3] = (C) => D.value.openDialog())
1519
+ }, [
1520
+ s(b, {
1521
+ variant: "outline",
1522
+ class: "size-44 border-dotted",
1523
+ tabindex: "-1"
1524
+ }, {
1525
+ default: n(() => [
1526
+ s(g(Z), { class: "size-14" })
1527
+ ]),
1528
+ _: 1
1529
+ }),
1530
+ o[8] || (o[8] = t("p", { class: "text-muted-foreground group-hover/item:text-white transition-colors duration-300" }, "New Style", -1))
1531
+ ]),
1532
+ (a(!0), F(W, null, Y(H.value, (C) => (a(), F("div", {
1533
+ class: "group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",
1534
+ key: C.id,
1535
+ onClick: (d) => D.value.openDialog(C)
1536
+ }, [
1537
+ t("div", {
1538
+ class: "flex flex-col items-center justify-center rounded-md p-4 size-44",
1539
+ style: N({ backgroundColor: _.value })
1540
+ }, [
1541
+ t("div", {
1542
+ style: N(E(C)),
1543
+ class: "p-4"
1544
+ }, [
1545
+ t("strong", {
1546
+ class: "text-2xl",
1547
+ style: N({ color: C.styles.titleColor })
1548
+ }, "Card", 4),
1549
+ o[9] || (o[9] = t("p", null, "Lorem ipsum dolor sit amet.", -1))
1550
+ ], 4)
1551
+ ], 4),
1552
+ t("p", xl, R(C.name), 1)
1553
+ ], 8, fl))), 128))
1554
+ ])) : (a(), F("div", Cl, [
1555
+ s(v, { class: "size-44 rounded-md" }),
1556
+ s(v, { class: "size-44 rounded-md" })
1557
+ ]))
1558
+ ]),
1559
+ s(Fe, {
1560
+ ref_key: "sectionStyleDialog",
1561
+ ref: U,
1562
+ onAdd: K,
1563
+ onEdit: S,
1564
+ onDelete: i
1565
+ }, null, 512),
1566
+ s(Je, {
1567
+ ref_key: "buttonStyleDialog",
1568
+ ref: k,
1569
+ defaultBackground: _.value,
1570
+ onAdd: u,
1571
+ onEdit: l,
1572
+ onDelete: q
1573
+ }, null, 8, ["defaultBackground"]),
1574
+ s(al, {
1575
+ ref_key: "cardStyleDialog",
1576
+ ref: D,
1577
+ defaultBackground: _.value,
1578
+ onAdd: L,
1579
+ onEdit: x,
1580
+ onDelete: V
1581
+ }, null, 8, ["defaultBackground"])
1582
+ ], 64);
1583
+ };
1584
+ }
1585
+ });
1586
+ export {
1587
+ Sl as default
1588
+ };