@feedmepos/mf-connect 0.1.38-beta.77 → 0.1.38-beta.79

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 (113) hide show
  1. package/dist/{Analytic-CPlnEHSZ.js → Analytic-BtGEGEGL.js} +29 -30
  2. package/dist/{App-Cu4p6gbW.js → App-CM9aBxJr.js} +7 -7
  3. package/dist/{AuditLogs-CcFMAscb.js → AuditLogs-09UavG85.js} +9 -9
  4. package/dist/{Bin-gtBK8XVY.js → Bin-BD1xPlub.js} +8 -8
  5. package/dist/{Broadcast-4xWTsz3e.js → Broadcast-Dq9wmUEn.js} +22 -23
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DjfHJS4N.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D905MMEW.js} +6 -6
  7. package/dist/{Card-Bpyi1Mqh.js → Card-DhnCDqSN.js} +18 -18
  8. package/dist/{Collections-BXJpy-Z6.js → Collections-CCseLCL7.js} +13 -14
  9. package/dist/{Credit-CACj5WA5.js → Credit-CSgZEOT6.js} +30 -31
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNp7zgbE.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CvMOpYi2.js} +33 -33
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Dtu40xSp.js → EffectSheet.vue_vue_type_style_index_0_lang-CvgJSO26.js} +6 -6
  12. package/dist/{Experience-ERwGbs6_.js → Experience-BDPVZ_ns.js} +11 -12
  13. package/dist/{FileSaver.min-CCloVqBK.js → FileSaver.min-CMoiB2I5.js} +1 -1
  14. package/dist/{Game-nn5Kroc_.js → Game-DwBq7XGd.js} +12 -13
  15. package/dist/{Grab-Baqpbxdr.js → Grab-K3EWocfl.js} +31 -32
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Dc2Wxjrq.js → ImageInput.vue_vue_type_script_setup_true_lang-Dut7gYOX.js} +1 -1
  17. package/dist/{Index-CYB1KuDA.js → Index-BIGJrre2.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B15IWMTx.js → LocationPicker.vue_vue_type_script_setup_true_lang-E6Q8vnHJ.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BFwur41g.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dc5x9a6A.js} +1 -1
  20. package/dist/{MainLayout-DQI5pMKt.js → MainLayout-CYNuN2cF.js} +1 -1
  21. package/dist/Marketing-C8-ncIy4.js +157 -0
  22. package/dist/MarketingMaterialEdit-B8JgrE3B.js +857 -0
  23. package/dist/{Member-D97fw6Cd.js → Member-sE89Rk48.js} +11 -11
  24. package/dist/{MemberList-DDRtiYhf.js → MemberList-auzbzT-5.js} +26 -26
  25. package/dist/{MemberTransactions-08ct4MMf.js → MemberTransactions-ByBl7XiD.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Mm-Chxx1.js → MessageInput.vue_vue_type_script_setup_true_lang-C1VS2F7D.js} +9 -9
  27. package/dist/{Mission-B1sZbVOv.js → Mission-B89i7mO_.js} +22 -23
  28. package/dist/{Overview-CihI2Ydx.js → Overview-D2qL0W9D.js} +18 -18
  29. package/dist/{Point-jggxL54s.js → Point-_HDc2SCM.js} +11 -12
  30. package/dist/{Promotion-DCFVPRw9.js → Promotion-BeN0Vy5v.js} +12 -13
  31. package/dist/{Queue-BCfueANY.js → Queue-Baj0BbgX.js} +10 -10
  32. package/dist/{Record-cFWNJD__.js → Record-9oPdpBcs.js} +9 -9
  33. package/dist/{Review-BnYNAJHr.js → Review-v1fVKxAr.js} +4 -4
  34. package/dist/{ReviewFacebookCallback-DxuDeLaX.js → ReviewFacebookCallback-1D_ZaZGb.js} +4 -4
  35. package/dist/{ReviewGoogleCallback-CzUOYUhc.js → ReviewGoogleCallback-BHiBNLgu.js} +4 -4
  36. package/dist/{Reward-C3IQT6Vm.js → Reward-b5rUgN3X.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BHQbHhGE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DHh9AMQ6.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CL0gWNDv.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bu20Wcqx.js} +14 -14
  39. package/dist/{Segment-Di328H19.js → Segment-DzYhjSW_.js} +24 -24
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CiEEE545.js → SelectItems.vue_vue_type_script_setup_true_lang-DhQcyNgt.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DyKJC5rS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLmg8HcJ.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9PkNlUG.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang--8WZ6xlI.js} +4 -4
  43. package/dist/Setting-DzovXb3B.js +2039 -0
  44. package/dist/{SettingAdvertisements-CrLcIibQ.js → SettingAdvertisements-BoKc8qSK.js} +12 -12
  45. package/dist/{Store-Dr_fUsGl.js → Store-gSqR73BE.js} +21 -21
  46. package/dist/{StoreRewards-CJjRph_y.js → StoreRewards-DU0UhMxA.js} +15 -15
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CcG8ez-X.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DfkyYxHU.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CQwJ43lC.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CPrdceO6.js} +5 -3
  49. package/dist/{Tier-CSfFMEO6.js → Tier-BP04ZxdT.js} +25 -26
  50. package/dist/{Title-BJeyjdmZ.js → Title-CrbNoc7V.js} +29 -30
  51. package/dist/{Transaction-CYT59iim.js → Transaction-dN0swuKY.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Bhpfk_pP.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BbK-6L-F.js} +6 -6
  53. package/dist/{Voucher-B7bbNebL.js → Voucher-era4Eycu.js} +15 -16
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BWaL1UD_.js → VoucherEditor.vue_vue_type_script_setup_true_lang-K1qIuCSQ.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C75XExhq.js → ZodTextField.vue_vue_type_script_setup_true_lang-CwjRRB0A.js} +2 -2
  56. package/dist/{app-DW87VLhM.js → app-BouVWQhY.js} +334 -421
  57. package/dist/app.js +1 -1
  58. package/dist/{business-CKorj1jI.js → business-D5KDLLwg.js} +1 -1
  59. package/dist/{campaign-v-IDnBOH.js → campaign-6nUwWV5D.js} +8 -8
  60. package/dist/campaign-BjmCjj3h.js +219 -0
  61. package/dist/{campaign.enum-Y2VyD9Rk.js → campaign.enum-FgA1G6S4.js} +1 -1
  62. package/dist/{campaign.fn-J0h3DHY7.js → campaign.fn-BgFZ-ChV.js} +49 -49
  63. package/dist/{collectible.enum-Ct4EH1-M.js → collectible.enum-BLewqQ0q.js} +1 -1
  64. package/dist/{collection.fn-4EwI__Kd.js → collection.fn-Tp_EtB5_.js} +2 -2
  65. package/dist/{dto-CzQ5ZPnM.js → dto-CeIfb65t.js} +4 -4
  66. package/dist/{duplicateCampaign-DH4GTkl4.js → duplicateCampaign-D0uQX9ys.js} +2 -2
  67. package/dist/{effect-CSmAbPw5.js → effect-Ch96Bfk2.js} +1 -1
  68. package/dist/{email-addresses-CDQTaGMc.js → email-addresses-COwrf0Tm.js} +2 -2
  69. package/dist/{export-CWGMDCOS.js → export-BEp24MNH.js} +3 -3
  70. package/dist/{helper-BTMcmkY-.js → helper-CoD4vHLo.js} +1 -1
  71. package/dist/{index-c7bs3-sB.js → index-BMIzyh4m.js} +1 -1
  72. package/dist/{index-BalocitS.js → index-BmtHTgh-.js} +3 -3
  73. package/dist/{index-nxwskabW.js → index-CG2cS6sA.js} +1 -1
  74. package/dist/{index-CHwxbJ-k.js → index-C_Km4WT4.js} +1 -1
  75. package/dist/{index-DQxSSe7u.js → index-CuQ6dH_B.js} +6 -6
  76. package/dist/{index-DafBqawi.js → index-DFsb5Grh.js} +1 -1
  77. package/dist/{index-BGP2XsfH.js → index-DHUcUC52.js} +1 -1
  78. package/dist/{index-DNgP9oPe.js → index-DQgkDtnc.js} +3 -3
  79. package/dist/{index-DuKr4NrF.js → index-D_WNS8Xf.js} +4 -4
  80. package/dist/{index-KfVh_1Mq.js → index-DgpU9EKP.js} +2 -2
  81. package/dist/{index-Ds0iCyTa.js → index-DyXi5bAB.js} +1 -1
  82. package/dist/{index-DpYrJ9BA.js → index-Zx-VSSsd.js} +1 -1
  83. package/dist/{index-Th2v5uhF.js → index-_H7aC0Ah.js} +3 -3
  84. package/dist/{index.esm2017-BaIOtNg6.js → index.esm2017-lXZHu4UH.js} +1 -1
  85. package/dist/{loading-IPAu72W9.js → loading-D4wCz8YA.js} +1 -1
  86. package/dist/{lodash-8i9BuEpy.js → lodash-BPMVlMRE.js} +1 -1
  87. package/dist/{membership-D3C6uxZn.js → membership-rWHLFUMU.js} +3 -3
  88. package/dist/{money-DgJ-Eu1j.js → money-C5fzCxyR.js} +1 -1
  89. package/dist/{number-DYvUlYUV.js → number-29vjGOi4.js} +1 -1
  90. package/dist/{objectid-DXtt7nvA.js → objectid-BF-KZmAL.js} +10 -10
  91. package/dist/{plugins-DOuRSYyI.js → plugins-DrYaK3sg.js} +3 -3
  92. package/dist/remy-cu0ZxtgL.js +46 -0
  93. package/dist/{reward-DnUBE-5Q.js → reward-BtVM0wBo.js} +1 -1
  94. package/dist/{rule-2xz8bsfH.js → rule-BNaOKKIP.js} +3 -3
  95. package/dist/{rule-builder-BUbfKVI2.js → rule-builder-C_Wnr_cG.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/{template-DIFr5du7.js → template-DjL-7G_y.js} +6 -6
  98. package/dist/{timezone-BLOuoWcc.js → timezone-DYSvVFho.js} +2 -2
  99. package/dist/{trigger-CTBnJR5J.js → trigger-Bc4B0C4k.js} +5 -5
  100. package/dist/{usePagination-6vyp3VrT.js → usePagination-BDH-wHmM.js} +1 -1
  101. package/dist/{user-oKms24rP.js → user-Do7ZHSuU.js} +1 -1
  102. package/dist/{vue-i18n-C1UXB6UQ.js → vue-i18n-EKFakVFp.js} +327 -327
  103. package/dist/{xlsx-CdtGyyAC.js → xlsx-CFbJ9vXV.js} +1 -1
  104. package/dist/{zod-C2KjnyQW.js → zod-CPCWf_hU.js} +1 -1
  105. package/package.json +1 -1
  106. package/dist/GenerateMaterial-uhORX0wE.js +0 -589
  107. package/dist/Marketing-BDDNIPbj.js +0 -145
  108. package/dist/MarketingMaterialEdit-CCEojq5A.js +0 -746
  109. package/dist/Setting-D8it6u-5.js +0 -2000
  110. package/dist/campaign-KUqRHHsx.js +0 -100
  111. package/dist/index-CINZ-bnq.js +0 -36
  112. package/dist/index-DbSJ3Kqw.js +0 -124
  113. package/dist/remy-D_Deb3ue.js +0 -13
@@ -0,0 +1,857 @@
1
+ import { defineComponent as C, resolveComponent as x, openBlock as l, createBlock as S, withCtx as j, createElementVNode as e, createVNode as n, createElementBlock as u, ref as k, watch as B, Fragment as L, unref as s, createCommentVNode as U, withModifiers as V, Teleport as J, Transition as Q, toDisplayString as _, isRef as W, renderList as X, createTextVNode as Z, computed as P, onMounted as ee, resolveDynamicComponent as te } from "vue";
2
+ import { _ as D } from "./lodash-BPMVlMRE.js";
3
+ import "./index-Zx-VSSsd.js";
4
+ import { useRoute as q, useRouter as oe } from "vue-router";
5
+ import { u as G } from "./vue-i18n-EKFakVFp.js";
6
+ import { u as K, m as N } from "./remy-cu0ZxtgL.js";
7
+ import { useClientEvent as Y, ChatPanel as ne } from "@feedmepos/mf-remy-panel";
8
+ import { a as ae } from "./plugins-DrYaK3sg.js";
9
+ import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ import { useSnackbar as le, useDialog as ie } from "@feedmepos/ui-library";
11
+ import { useCoreStore as R } from "@feedmepos/mf-common";
12
+ import { u as re } from "./loading-D4wCz8YA.js";
13
+ import { R as H } from "./app-BouVWQhY.js";
14
+ const A = /* @__PURE__ */ C({
15
+ __name: "ActionToolbarButton",
16
+ props: {
17
+ icon: {},
18
+ tooltip: {}
19
+ },
20
+ emits: ["click"],
21
+ setup(r, { emit: m }) {
22
+ const p = m;
23
+ return (i, c) => {
24
+ const d = x("FmIcon"), t = x("FmTooltip");
25
+ return l(), S(t, {
26
+ content: r.tooltip,
27
+ placement: "bottom",
28
+ "z-index": 60,
29
+ variant: "rich"
30
+ }, {
31
+ default: j(() => [
32
+ e("button", {
33
+ class: "p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors text-white flex items-center justify-center",
34
+ onClick: c[0] || (c[0] = (a) => p("click"))
35
+ }, [
36
+ n(d, {
37
+ name: r.icon,
38
+ size: "md"
39
+ }, null, 8, ["name"])
40
+ ])
41
+ ]),
42
+ _: 1
43
+ }, 8, ["content"]);
44
+ };
45
+ }
46
+ }), ce = { class: "flex gap-8" }, me = /* @__PURE__ */ C({
47
+ __name: "ActionToolbar",
48
+ props: {
49
+ imageUrl: {}
50
+ },
51
+ emits: ["edit", "close"],
52
+ setup(r, { emit: m }) {
53
+ const p = r, i = m;
54
+ async function c() {
55
+ if (p.imageUrl)
56
+ try {
57
+ const t = await (await fetch(p.imageUrl)).blob(), a = URL.createObjectURL(t), g = document.createElement("a");
58
+ g.href = a, g.download = "marketing-material", g.click(), URL.revokeObjectURL(a);
59
+ } catch {
60
+ window.open(p.imageUrl, "_blank");
61
+ }
62
+ }
63
+ return (d, t) => (l(), u("div", ce, [
64
+ n(A, {
65
+ icon: "edit",
66
+ tooltip: "Edit",
67
+ onClick: t[0] || (t[0] = (a) => i("edit"))
68
+ }),
69
+ n(A, {
70
+ icon: "download",
71
+ tooltip: "Download",
72
+ onClick: c
73
+ }),
74
+ n(A, {
75
+ icon: "close",
76
+ tooltip: "Close",
77
+ onClick: t[1] || (t[1] = (a) => i("close"))
78
+ })
79
+ ]));
80
+ }
81
+ }), de = ["src"], ue = {
82
+ key: 1,
83
+ class: "absolute inset-0 flex items-center justify-center bg-black/40"
84
+ }, pe = { class: "relative" }, fe = ["src"], ge = /* @__PURE__ */ C({
85
+ __name: "Thumbnail",
86
+ props: {
87
+ imageUrl: {}
88
+ },
89
+ emits: ["edit", "update:imageUrl"],
90
+ setup(r, { emit: m }) {
91
+ const p = r, i = m, c = q(), d = k(!1), t = k(p.imageUrl);
92
+ B(
93
+ () => p.imageUrl,
94
+ (b) => {
95
+ t.value = b;
96
+ }
97
+ );
98
+ const a = k(!1);
99
+ function g() {
100
+ d.value = !1, i("edit", t.value);
101
+ }
102
+ Y(
103
+ "apply-edited-banner",
104
+ async ({ imageUrl: b }) => {
105
+ c.query.id && (t.value = b, i("update:imageUrl", b));
106
+ }
107
+ );
108
+ async function $() {
109
+ if (t.value)
110
+ try {
111
+ const v = await (await fetch(t.value)).blob(), F = URL.createObjectURL(v), h = document.createElement("a");
112
+ h.href = F, h.download = "marketing-material", h.click(), URL.revokeObjectURL(F);
113
+ } catch {
114
+ window.open(t.value, "_blank");
115
+ }
116
+ }
117
+ function I() {
118
+ t.value && window.open(t.value, "_blank");
119
+ }
120
+ async function z() {
121
+ t.value && await ae(t.value, {
122
+ successMessage: "Image link copied to clipboard"
123
+ });
124
+ }
125
+ return (b, v) => {
126
+ const F = x("FmButton"), h = x("FmMenuItem"), M = x("FmMenu");
127
+ return l(), u(L, null, [
128
+ e("div", {
129
+ class: "relative group cursor-pointer rounded-xl overflow-hidden fm-shadow-light-200 w-[150px] h-[150px] bg-white",
130
+ onClick: v[1] || (v[1] = (f) => d.value = !0)
131
+ }, [
132
+ s(t) ? (l(), u("img", {
133
+ key: 0,
134
+ src: s(t),
135
+ alt: "Generated Material",
136
+ class: "w-full h-full object-contain"
137
+ }, null, 8, de)) : U("", !0),
138
+ e("div", {
139
+ class: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
140
+ onClick: v[0] || (v[0] = V(() => {
141
+ }, ["stop"]))
142
+ }, [
143
+ n(M, { placement: "right-start" }, {
144
+ "menu-button": j(() => [
145
+ n(F, {
146
+ icon: "more_horiz",
147
+ variant: "tertiary",
148
+ class: "bg-white hover:bg-gray-100 text-black shadow-sm"
149
+ })
150
+ ]),
151
+ default: j(() => [
152
+ n(h, {
153
+ icon: "open_in_new",
154
+ label: "Open image in new tab",
155
+ onClick: I
156
+ }),
157
+ n(h, {
158
+ icon: "download",
159
+ label: "Download",
160
+ onClick: $
161
+ }),
162
+ n(h, {
163
+ icon: "content_copy",
164
+ label: "Copy link",
165
+ onClick: z
166
+ }),
167
+ n(h, {
168
+ icon: "edit",
169
+ label: "Regenerate image",
170
+ onClick: g
171
+ })
172
+ ]),
173
+ _: 1
174
+ })
175
+ ]),
176
+ s(a) ? (l(), u("div", ue, [...v[4] || (v[4] = [
177
+ e("div", { class: "w-10 h-10 rounded-full border-4 border-white/30 border-t-white animate-spin" }, null, -1)
178
+ ])])) : U("", !0)
179
+ ]),
180
+ (l(), S(J, { to: "body" }, [
181
+ n(Q, { name: "fade" }, {
182
+ default: j(() => [
183
+ s(d) ? (l(), u("div", {
184
+ key: 0,
185
+ class: "fixed inset-0 z-50 bg-black/80 flex items-center justify-center",
186
+ onClick: v[3] || (v[3] = V((f) => d.value = !1, ["self"]))
187
+ }, [
188
+ e("div", pe, [
189
+ n(me, {
190
+ class: "absolute top-0 right-0 z-10 -translate-y-full p-4",
191
+ "image-url": s(t),
192
+ onEdit: g,
193
+ onClose: v[2] || (v[2] = (f) => d.value = !1)
194
+ }, null, 8, ["image-url"]),
195
+ s(t) ? (l(), u("img", {
196
+ key: 0,
197
+ src: s(t),
198
+ alt: "Preview",
199
+ class: "max-h-[80vh] max-w-[90vw] object-contain rounded-xl"
200
+ }, null, 8, fe)) : U("", !0)
201
+ ])
202
+ ])) : U("", !0)
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]))
207
+ ], 64);
208
+ };
209
+ }
210
+ }), ye = /* @__PURE__ */ se(ge, [["__scopeId", "data-v-af97692a"]]), ve = { class: "flex gap-4 shrink-0 mt-2" }, O = /* @__PURE__ */ C({
211
+ __name: "TextActionWidget",
212
+ props: {
213
+ text: {}
214
+ },
215
+ emits: ["editWithRemy"],
216
+ setup(r, { emit: m }) {
217
+ const p = m, i = le();
218
+ async function c(d) {
219
+ d && (await navigator.clipboard.writeText(d), i.open({ message: "Copied to clipboard!", type: "success" }));
220
+ }
221
+ return (d, t) => {
222
+ const a = x("FmIcon"), g = x("FmTooltip");
223
+ return l(), u("div", ve, [
224
+ n(g, {
225
+ content: "Remy AI",
226
+ placement: "top",
227
+ "hide-arrow": !1
228
+ }, {
229
+ default: j(() => [
230
+ e("button", {
231
+ class: "p-8 rounded-md hover:bg-fm-color-neutral-gray-100 transition-colors",
232
+ onClick: t[0] || (t[0] = ($) => p("editWithRemy"))
233
+ }, [
234
+ n(a, {
235
+ name: "auto_awesome",
236
+ size: "sm",
237
+ color: "neutral-gray-400"
238
+ })
239
+ ])
240
+ ]),
241
+ _: 1
242
+ }),
243
+ n(g, {
244
+ content: "Copy",
245
+ placement: "top",
246
+ "hide-arrow": !1
247
+ }, {
248
+ default: j(() => [
249
+ e("button", {
250
+ class: "p-8 rounded-md hover:bg-fm-color-neutral-gray-100 transition-colors",
251
+ onClick: t[1] || (t[1] = ($) => c(r.text))
252
+ }, [
253
+ n(a, {
254
+ name: "content_copy",
255
+ size: "sm",
256
+ color: "neutral-gray-400"
257
+ })
258
+ ])
259
+ ]),
260
+ _: 1
261
+ })
262
+ ]);
263
+ };
264
+ }
265
+ }), xe = { class: "border-l border-fm-color-neutral-gray-100 p-24" }, be = { class: "flex flex-col gap-24" }, he = { class: "flex flex-col gap-12" }, _e = { class: "flex flex-col gap-8" }, we = { class: "flex flex-col gap-8" }, ke = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, $e = { class: "flex flex-col gap-8" }, Ue = /* @__PURE__ */ C({
266
+ __name: "MarketingMaterialContentDetails",
267
+ props: {
268
+ marketingMaterial: {}
269
+ },
270
+ emits: ["update:imageUrl", "update:headline", "update:caption"],
271
+ setup(r, { emit: m }) {
272
+ const p = r, i = m, { t: c } = G(), d = K(), t = k(p.marketingMaterial.headline), a = k(p.marketingMaterial.caption), g = k("Learn More"), $ = k(p.marketingMaterial.headline), I = k(p.marketingMaterial.caption), z = k(!1), b = k(!1);
273
+ B(
274
+ () => p.marketingMaterial.headline,
275
+ (f) => {
276
+ if (z.value) {
277
+ z.value = !1;
278
+ return;
279
+ }
280
+ t.value = f, $.value = f;
281
+ }
282
+ ), B(
283
+ () => p.marketingMaterial.caption,
284
+ (f) => {
285
+ if (b.value) {
286
+ b.value = !1;
287
+ return;
288
+ }
289
+ a.value = f ?? "", I.value = f;
290
+ }
291
+ ), Y(
292
+ "apply-edited-copy",
293
+ async ({ headline: f, caption: o }) => {
294
+ f !== void 0 && (t.value = f, $.value = f, z.value = !0, i("update:headline", f)), o !== void 0 && (a.value = o, I.value = o, b.value = !0, i("update:caption", o));
295
+ }
296
+ );
297
+ function v() {
298
+ d.activate({
299
+ command: "editMarketingBanner",
300
+ prompt: "",
301
+ attachments: [
302
+ {
303
+ value: p.marketingMaterial,
304
+ key: "marketingMaterial"
305
+ }
306
+ ]
307
+ });
308
+ }
309
+ function F() {
310
+ d.activate({
311
+ command: "editCopy",
312
+ attachments: [
313
+ {
314
+ value: p.marketingMaterial,
315
+ key: "marketingMaterial"
316
+ }
317
+ ]
318
+ });
319
+ }
320
+ async function h(f) {
321
+ const o = f === "headline" ? t.value : a.value, y = f === "headline" ? $.value : I.value;
322
+ o !== y && (f === "headline" ? $.value = o : I.value = o);
323
+ }
324
+ function M(f, o) {
325
+ f === "headline" ? (t.value = o, z.value = !0, i("update:headline", o)) : (a.value = o, b.value = !0, i("update:caption", o));
326
+ }
327
+ return (f, o) => {
328
+ const y = x("FmTextField"), E = x("FmTextarea");
329
+ return l(), u("section", xe, [
330
+ o[9] || (o[9] = e("h2", { class: "mb-24 align-middle font-['Inter'] text-[22px] font-semibold leading-[24px] tracking-[-0.015em] text-fm-color-typo-primary [leading-trim:none]" }, " Content Details ", -1)),
331
+ e("div", be, [
332
+ e("div", he, [
333
+ o[6] || (o[6] = e("p", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, " Image ", -1)),
334
+ n(ye, {
335
+ "image-url": r.marketingMaterial.imageUrl,
336
+ onEdit: v,
337
+ "onUpdate:imageUrl": o[0] || (o[0] = (w) => i("update:imageUrl", w))
338
+ }, null, 8, ["image-url"])
339
+ ]),
340
+ e("div", _e, [
341
+ o[7] || (o[7] = e("p", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, " Header ", -1)),
342
+ n(y, {
343
+ "model-value": s(t),
344
+ "onUpdate:modelValue": o[1] || (o[1] = (w) => M("headline", w)),
345
+ onFocusChanged: o[2] || (o[2] = (w) => !w && h("headline"))
346
+ }, {
347
+ append: j(() => [
348
+ n(O, {
349
+ text: s(t),
350
+ onEditWithRemy: F
351
+ }, null, 8, ["text"])
352
+ ]),
353
+ _: 1
354
+ }, 8, ["model-value"])
355
+ ]),
356
+ e("div", we, [
357
+ e("p", ke, _(s(c)("connect.marketing.materialEdit.caption")), 1),
358
+ n(E, {
359
+ "model-value": s(a),
360
+ "onUpdate:modelValue": o[3] || (o[3] = (w) => M("caption", w)),
361
+ onFocusChanged: o[4] || (o[4] = (w) => !w && h("caption")),
362
+ rows: "4"
363
+ }, {
364
+ append: j(() => [
365
+ n(O, {
366
+ text: s(a),
367
+ onEditWithRemy: F
368
+ }, null, 8, ["text"])
369
+ ]),
370
+ _: 1
371
+ }, 8, ["model-value"])
372
+ ]),
373
+ e("div", $e, [
374
+ o[8] || (o[8] = e("p", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary uppercase tracking-wide" }, " Call to Action ", -1)),
375
+ n(y, {
376
+ modelValue: s(g),
377
+ "onUpdate:modelValue": o[5] || (o[5] = (w) => W(g) ? g.value = w : null)
378
+ }, null, 8, ["modelValue"])
379
+ ])
380
+ ])
381
+ ]);
382
+ };
383
+ }
384
+ }), Ce = { class: "flex items-center px-4" }, Fe = { class: "px-[4px] py-[6px] text-xs text-fm-color-typo-secondary" }, Me = /* @__PURE__ */ C({
385
+ __name: "ActionBar",
386
+ setup(r) {
387
+ const m = [
388
+ { icon: "thumb_up", count: "10k+" },
389
+ { icon: "mode_comment", count: "128" },
390
+ { icon: "share", count: "56" }
391
+ ];
392
+ return (p, i) => {
393
+ const c = x("FmIcon");
394
+ return l(), u("div", Ce, [
395
+ (l(), u(L, null, X(m, (d) => e("button", {
396
+ key: d.icon,
397
+ class: "flex px-12 py-[6px] items-center justify-center text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-50 transition-colors fm-typo-en-body-sm-400"
398
+ }, [
399
+ n(c, {
400
+ class: "px-[4px] py-[6px]",
401
+ name: d.icon,
402
+ size: "md",
403
+ color: "neutral-gray-400",
404
+ outline: ""
405
+ }, null, 8, ["name"]),
406
+ e("span", Fe, _(d.count), 1)
407
+ ])), 64))
408
+ ]);
409
+ };
410
+ }
411
+ }), Ie = { class: "max-w-[500px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, ze = { class: "flex items-center gap-12 px-16 py-12" }, je = { class: "w-40 h-40 rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center shrink-0 overflow-hidden" }, Te = ["src"], Se = { class: "flex-1 min-w-0" }, Re = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary leading-tight font-semibold" }, Ee = { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary leading-tight text-xs flex items-center gap-4" }, Pe = {
412
+ key: 0,
413
+ class: "px-16 pb-12"
414
+ }, Ae = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-primary whitespace-pre-wrap" }, Be = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, Le = ["src"], Ve = {
415
+ key: 1,
416
+ class: "aspect-square flex items-center justify-center"
417
+ }, De = { class: "px-16 py-12 bg-fm-color-neutral-gray-50 border-t border-fm-color-neutral-gray-200" }, Ne = { class: "fm-typo-en-body-sm-700 text-fm-color-typo-primary line-clamp-2" }, He = /* @__PURE__ */ C({
418
+ __name: "FacebookPostPreview",
419
+ props: {
420
+ imageUrl: {},
421
+ headline: {},
422
+ caption: {}
423
+ },
424
+ setup(r) {
425
+ const { currentBusiness: m } = R();
426
+ return (p, i) => {
427
+ var d, t;
428
+ const c = x("FmIcon");
429
+ return l(), u("div", Ie, [
430
+ e("div", ze, [
431
+ e("div", je, [
432
+ (d = s(m)) != null && d.thumbnail ? (l(), u("img", {
433
+ key: 0,
434
+ src: s(m).thumbnail,
435
+ class: "w-full h-full object-cover",
436
+ alt: "Business logo"
437
+ }, null, 8, Te)) : (l(), S(c, {
438
+ key: 1,
439
+ name: "storefront",
440
+ size: "sm",
441
+ color: "neutral-gray-400"
442
+ }))
443
+ ]),
444
+ e("div", Se, [
445
+ e("p", Re, _(((t = s(m)) == null ? void 0 : t.name) ?? "Your Business"), 1),
446
+ e("p", Ee, [
447
+ i[0] || (i[0] = Z(" Sponsored · ", -1)),
448
+ n(c, {
449
+ name: "public",
450
+ size: "sm",
451
+ color: "neutral-gray-400"
452
+ })
453
+ ])
454
+ ]),
455
+ n(c, {
456
+ name: "more_horiz",
457
+ size: "sm",
458
+ color: "neutral-gray-400"
459
+ })
460
+ ]),
461
+ r.caption ? (l(), u("div", Pe, [
462
+ e("p", Ae, _(r.caption), 1)
463
+ ])) : U("", !0),
464
+ e("div", Be, [
465
+ r.imageUrl ? (l(), u("img", {
466
+ key: 0,
467
+ src: r.imageUrl,
468
+ alt: "Post image",
469
+ class: "w-full h-auto block"
470
+ }, null, 8, Le)) : (l(), u("div", Ve, [
471
+ n(c, {
472
+ name: "image",
473
+ size: "xl",
474
+ color: "neutral-gray-300"
475
+ })
476
+ ]))
477
+ ]),
478
+ e("div", De, [
479
+ i[1] || (i[1] = e("p", { class: "fm-typo-en-body-xs-400 text-fm-color-typo-secondary uppercase tracking-wide mb-2" }, " yourbusiness.com ", -1)),
480
+ e("p", Ne, _(r.headline ?? "—"), 1)
481
+ ]),
482
+ n(Me)
483
+ ]);
484
+ };
485
+ }
486
+ }), Oe = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, We = ["src"], qe = {
487
+ key: 1,
488
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
489
+ }, Ge = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Ke = { class: "flex items-center gap-8" }, Ye = { class: "w-32 h-32 rounded-full bg-fm-color-neutral-gray-200 shrink-0 overflow-hidden border-2 border-white" }, Je = ["src"], Qe = { class: "flex-1 min-w-0" }, Xe = { class: "text-white text-xs font-semibold leading-tight truncate" }, Ze = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, et = {
490
+ key: 0,
491
+ class: "text-white text-xs mb-12 line-clamp-3"
492
+ }, tt = { class: "flex justify-center" }, ot = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, nt = /* @__PURE__ */ C({
493
+ __name: "FacebookStoryPreview",
494
+ props: {
495
+ imageUrl: {},
496
+ headline: {},
497
+ caption: {}
498
+ },
499
+ setup(r) {
500
+ const { currentBusiness: m } = R();
501
+ return (p, i) => {
502
+ var d, t;
503
+ const c = x("FmIcon");
504
+ return l(), u("div", Oe, [
505
+ r.imageUrl ? (l(), u("img", {
506
+ key: 0,
507
+ src: r.imageUrl,
508
+ alt: "Story image",
509
+ class: "absolute inset-0 w-full h-full object-contain"
510
+ }, null, 8, We)) : (l(), u("div", qe, [
511
+ n(c, {
512
+ name: "image",
513
+ size: "xl",
514
+ color: "neutral-gray-500"
515
+ })
516
+ ])),
517
+ e("div", Ge, [
518
+ i[1] || (i[1] = e("div", { class: "flex gap-4 mb-10" }, [
519
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
520
+ ], -1)),
521
+ e("div", Ke, [
522
+ e("div", Ye, [
523
+ (d = s(m)) != null && d.thumbnail ? (l(), u("img", {
524
+ key: 0,
525
+ src: s(m).thumbnail,
526
+ class: "w-full h-full object-cover",
527
+ alt: "Business logo"
528
+ }, null, 8, Je)) : (l(), S(c, {
529
+ key: 1,
530
+ name: "storefront",
531
+ size: "sm",
532
+ color: "neutral-gray-400"
533
+ }))
534
+ ]),
535
+ e("div", Qe, [
536
+ e("p", Xe, _(((t = s(m)) == null ? void 0 : t.name) ?? "Your Business"), 1),
537
+ i[0] || (i[0] = e("p", { class: "text-white/70 text-[10px] leading-tight" }, "Sponsored", -1))
538
+ ]),
539
+ n(c, {
540
+ name: "more_vert",
541
+ size: "sm",
542
+ color: "neutral-white"
543
+ }),
544
+ n(c, {
545
+ name: "close",
546
+ size: "sm",
547
+ color: "neutral-white"
548
+ })
549
+ ])
550
+ ]),
551
+ e("div", Ze, [
552
+ r.caption ? (l(), u("p", et, _(r.caption), 1)) : U("", !0),
553
+ e("div", tt, [
554
+ e("button", ot, _(r.headline ?? "Learn More"), 1)
555
+ ])
556
+ ])
557
+ ]);
558
+ };
559
+ }
560
+ }), at = { class: "max-w-[400px] mx-auto rounded-lg border border-fm-color-neutral-gray-200 fm-shadow-light-200 overflow-hidden bg-white" }, st = { class: "flex items-center gap-12 px-12 py-10" }, lt = { class: "w-32 h-32 rounded-full bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 p-[2px] shrink-0" }, it = { class: "w-full h-full rounded-full bg-white p-[1px] overflow-hidden" }, rt = ["src"], ct = {
561
+ key: 1,
562
+ class: "w-full h-full rounded-full bg-fm-color-neutral-gray-200 flex items-center justify-center"
563
+ }, mt = { class: "flex-1 min-w-0" }, dt = { class: "text-sm font-semibold text-fm-color-typo-primary leading-tight truncate" }, ut = { class: "w-full bg-fm-color-neutral-gray-100 overflow-hidden" }, pt = ["src"], ft = {
564
+ key: 1,
565
+ class: "aspect-square flex items-center justify-center"
566
+ }, gt = { class: "flex items-center gap-12 px-12 pt-10 pb-4" }, yt = {
567
+ key: 0,
568
+ class: "px-12 pb-12"
569
+ }, vt = { class: "text-xs text-fm-color-typo-primary" }, xt = { class: "font-semibold mr-4" }, bt = { class: "line-clamp-2" }, ht = /* @__PURE__ */ C({
570
+ __name: "InstagramPostPreview",
571
+ props: {
572
+ imageUrl: {},
573
+ headline: {},
574
+ caption: {}
575
+ },
576
+ setup(r) {
577
+ const { currentBusiness: m } = R();
578
+ return (p, i) => {
579
+ var d, t, a;
580
+ const c = x("FmIcon");
581
+ return l(), u("div", at, [
582
+ e("div", st, [
583
+ e("div", lt, [
584
+ e("div", it, [
585
+ (d = s(m)) != null && d.thumbnail ? (l(), u("img", {
586
+ key: 0,
587
+ src: s(m).thumbnail,
588
+ class: "w-full h-full object-cover rounded-full",
589
+ alt: "Business logo"
590
+ }, null, 8, rt)) : (l(), u("div", ct, [
591
+ n(c, {
592
+ name: "storefront",
593
+ size: "sm",
594
+ color: "neutral-gray-400"
595
+ })
596
+ ]))
597
+ ])
598
+ ]),
599
+ e("div", mt, [
600
+ e("p", dt, _(((t = s(m)) == null ? void 0 : t.name) ?? "yourbusiness"), 1),
601
+ i[0] || (i[0] = e("p", { class: "text-[10px] text-fm-color-typo-secondary leading-tight" }, " Sponsored ", -1))
602
+ ]),
603
+ n(c, {
604
+ name: "more_horiz",
605
+ size: "sm",
606
+ color: "neutral-gray-400"
607
+ })
608
+ ]),
609
+ e("div", ut, [
610
+ r.imageUrl ? (l(), u("img", {
611
+ key: 0,
612
+ src: r.imageUrl,
613
+ alt: "Post image",
614
+ class: "w-full h-auto block"
615
+ }, null, 8, pt)) : (l(), u("div", ft, [
616
+ n(c, {
617
+ name: "image",
618
+ size: "xl",
619
+ color: "neutral-gray-300"
620
+ })
621
+ ]))
622
+ ]),
623
+ e("div", gt, [
624
+ n(c, {
625
+ name: "favorite_border",
626
+ size: "md",
627
+ color: "neutral-gray-700"
628
+ }),
629
+ n(c, {
630
+ name: "mode_comment",
631
+ size: "md",
632
+ color: "neutral-gray-700",
633
+ outline: ""
634
+ }),
635
+ n(c, {
636
+ name: "send",
637
+ size: "md",
638
+ color: "neutral-gray-700"
639
+ }),
640
+ i[1] || (i[1] = e("div", { class: "flex-1" }, null, -1)),
641
+ n(c, {
642
+ name: "bookmark_border",
643
+ size: "md",
644
+ color: "neutral-gray-700"
645
+ })
646
+ ]),
647
+ i[2] || (i[2] = e("div", { class: "px-12 pb-4" }, [
648
+ e("p", { class: "text-xs font-semibold text-fm-color-typo-primary" }, " 10,428 likes ")
649
+ ], -1)),
650
+ r.caption || r.headline ? (l(), u("div", yt, [
651
+ e("p", vt, [
652
+ e("span", xt, _(((a = s(m)) == null ? void 0 : a.name) ?? "yourbusiness"), 1),
653
+ e("span", bt, _(r.caption ?? r.headline), 1)
654
+ ])
655
+ ])) : U("", !0)
656
+ ]);
657
+ };
658
+ }
659
+ }), _t = { class: "max-w-[300px] mx-auto rounded-2xl overflow-hidden fm-shadow-light-200 relative aspect-[9/16] bg-black" }, wt = ["src"], kt = {
660
+ key: 1,
661
+ class: "absolute inset-0 flex items-center justify-center bg-fm-color-neutral-gray-800"
662
+ }, $t = { class: "absolute inset-x-0 top-0 px-12 pt-12 pb-24 bg-gradient-to-b from-black/60 to-transparent" }, Ut = { class: "flex items-center gap-8" }, Ct = { class: "w-32 h-32 rounded-full p-[2px] bg-gradient-to-tr from-yellow-400 via-pink-500 to-purple-600 shrink-0" }, Ft = { class: "w-full h-full rounded-full bg-black/30 overflow-hidden" }, Mt = ["src"], It = {
663
+ key: 1,
664
+ class: "w-full h-full flex items-center justify-center"
665
+ }, zt = { class: "flex-1 min-w-0" }, jt = { class: "text-white text-xs font-semibold leading-tight truncate" }, Tt = { class: "absolute inset-x-0 bottom-0 px-16 pb-24 pt-40 bg-gradient-to-t from-black/70 to-transparent" }, St = {
666
+ key: 0,
667
+ class: "text-white text-xs mb-12 line-clamp-3"
668
+ }, Rt = { class: "flex justify-center" }, Et = { class: "px-24 py-8 rounded-full bg-white text-fm-color-typo-primary text-xs font-semibold" }, Pt = /* @__PURE__ */ C({
669
+ __name: "InstagramStoryPreview",
670
+ props: {
671
+ imageUrl: {},
672
+ headline: {},
673
+ caption: {}
674
+ },
675
+ setup(r) {
676
+ const { currentBusiness: m } = R();
677
+ return (p, i) => {
678
+ var d, t;
679
+ const c = x("FmIcon");
680
+ return l(), u("div", _t, [
681
+ r.imageUrl ? (l(), u("img", {
682
+ key: 0,
683
+ src: r.imageUrl,
684
+ alt: "Story image",
685
+ class: "absolute inset-0 w-full h-full object-contain"
686
+ }, null, 8, wt)) : (l(), u("div", kt, [
687
+ n(c, {
688
+ name: "image",
689
+ size: "xl",
690
+ color: "neutral-gray-500"
691
+ })
692
+ ])),
693
+ e("div", $t, [
694
+ i[1] || (i[1] = e("div", { class: "flex gap-4 mb-10" }, [
695
+ e("div", { class: "h-[2px] flex-1 rounded-full bg-white" })
696
+ ], -1)),
697
+ e("div", Ut, [
698
+ e("div", Ct, [
699
+ e("div", Ft, [
700
+ (d = s(m)) != null && d.thumbnail ? (l(), u("img", {
701
+ key: 0,
702
+ src: s(m).thumbnail,
703
+ class: "w-full h-full object-cover",
704
+ alt: "Business logo"
705
+ }, null, 8, Mt)) : (l(), u("div", It, [
706
+ n(c, {
707
+ name: "storefront",
708
+ size: "sm",
709
+ color: "neutral-gray-400"
710
+ })
711
+ ]))
712
+ ])
713
+ ]),
714
+ e("div", zt, [
715
+ e("p", jt, _(((t = s(m)) == null ? void 0 : t.name) ?? "yourbusiness"), 1),
716
+ i[0] || (i[0] = e("p", { class: "text-white/70 text-[10px] leading-tight" }, "Sponsored", -1))
717
+ ]),
718
+ n(c, {
719
+ name: "more_vert",
720
+ size: "sm",
721
+ color: "neutral-white"
722
+ }),
723
+ n(c, {
724
+ name: "close",
725
+ size: "sm",
726
+ color: "neutral-white"
727
+ })
728
+ ])
729
+ ]),
730
+ e("div", Tt, [
731
+ r.caption ? (l(), u("p", St, _(r.caption), 1)) : U("", !0),
732
+ e("div", Rt, [
733
+ e("button", Et, _(r.headline ?? "Learn More"), 1)
734
+ ])
735
+ ])
736
+ ]);
737
+ };
738
+ }
739
+ }), At = { class: "mx-auto mb-24 grid max-w-[856px] grid-cols-2 rounded-2xl border border-fm-color-neutral-gray-200 md:grid-cols-1" }, Bt = { class: "min-w-0 bg-fm-color-neutral-gray-50 xs:p-16" }, Lt = { class: "mx-auto flex max-w-[560px] flex-col" }, Vt = { class: "p-24" }, Dt = { class: "rounded-bl-2xl bg-fm-color-neutral-gray-100 p-24 xs:p-12" }, to = /* @__PURE__ */ C({
740
+ __name: "MarketingMaterialEdit",
741
+ setup(r) {
742
+ const { t: m } = G(), p = oe(), i = q(), c = K(), d = ie(), { minor: t } = re, a = k(null), g = k(null), $ = P(() => !a.value || !g.value ? !1 : a.value.imageUrl !== g.value.imageUrl || a.value.headline !== g.value.headline || a.value.caption !== g.value.caption), I = P(() => ({
743
+ label: m("connect.common.save"),
744
+ value: "save",
745
+ isPrimary: !0,
746
+ disabled: !$.value
747
+ })), z = {
748
+ label: m("connect.common.cancel"),
749
+ value: "cancel",
750
+ isPrimary: !1
751
+ };
752
+ async function b() {
753
+ $.value ? d.open({
754
+ title: m("connect.campaign.common.unsaved_changes"),
755
+ message: m("connect.campaign.common.unsaved_changes"),
756
+ primaryActions: {
757
+ text: m("connect.campaign.common.unsaved_changes_confirm"),
758
+ close: !0
759
+ },
760
+ secondaryActions: {
761
+ text: m("connect.campaign.common.unsaved_changes_cancel"),
762
+ close: !1
763
+ }
764
+ }).onPrimary(() => {
765
+ p.push({ name: H["$connect-MARKETING"] });
766
+ }).onSecondary(() => {
767
+ d.close();
768
+ }) : p.push({ name: H["$connect-MARKETING"] });
769
+ }
770
+ async function v() {
771
+ !a.value || !$.value || await t(
772
+ async () => {
773
+ const o = a.value._id, y = await N.updateMarketingMaterial(o, {
774
+ imageUrl: a.value.imageUrl,
775
+ headline: a.value.headline,
776
+ caption: a.value.caption
777
+ });
778
+ a.value = y, g.value = D.cloneDeep(y);
779
+ },
780
+ {
781
+ message: "Saving changes...",
782
+ successMessage: "Changes saved successfully"
783
+ }
784
+ );
785
+ }
786
+ async function F(o) {
787
+ o === "save" ? await v() : o === "cancel" && await b();
788
+ }
789
+ const h = [
790
+ { label: "Facebook Post", value: "facebook-post" },
791
+ { label: "Facebook Story", value: "facebook-story" },
792
+ { label: "Instagram Post", value: "instagram-post" },
793
+ { label: "Instagram Story", value: "instagram-story" }
794
+ ], M = k(h[0].value), f = P(() => {
795
+ switch (M.value) {
796
+ case "facebook-story":
797
+ return nt;
798
+ case "instagram-post":
799
+ return ht;
800
+ case "instagram-story":
801
+ return Pt;
802
+ default:
803
+ return He;
804
+ }
805
+ });
806
+ return ee(async () => {
807
+ const o = i.query.id;
808
+ if (!o) return;
809
+ const y = await N.getMarketingMaterial(o);
810
+ a.value = y, g.value = D.cloneDeep(y);
811
+ }), (o, y) => {
812
+ const E = x("FmPageHead"), w = x("FmSelect");
813
+ return l(), u(L, null, [
814
+ n(E, {
815
+ "back-button": !0,
816
+ title: s(m)("connect.marketing.materialEdit.title"),
817
+ class: "xs:hidden",
818
+ actions: [z, s(I)],
819
+ "onClick:back": b,
820
+ "onClick:action": F
821
+ }, null, 8, ["title", "actions"]),
822
+ e("div", At, [
823
+ e("section", Bt, [
824
+ e("div", Lt, [
825
+ e("div", Vt, [
826
+ n(w, {
827
+ modelValue: s(M),
828
+ "onUpdate:modelValue": y[0] || (y[0] = (T) => W(M) ? M.value = T : null),
829
+ items: h
830
+ }, null, 8, ["modelValue"])
831
+ ]),
832
+ e("div", Dt, [
833
+ s(a) ? (l(), S(te(s(f)), {
834
+ key: 0,
835
+ "image-url": s(a).imageUrl,
836
+ headline: s(a).headline,
837
+ caption: s(a).caption
838
+ }, null, 8, ["image-url", "headline", "caption"])) : U("", !0)
839
+ ])
840
+ ])
841
+ ]),
842
+ s(a) ? (l(), S(Ue, {
843
+ key: 0,
844
+ "marketing-material": s(a),
845
+ "onUpdate:imageUrl": y[1] || (y[1] = (T) => s(a).imageUrl = T),
846
+ "onUpdate:headline": y[2] || (y[2] = (T) => s(a).headline = T),
847
+ "onUpdate:caption": y[3] || (y[3] = (T) => s(a).caption = T)
848
+ }, null, 8, ["marketing-material"])) : U("", !0)
849
+ ]),
850
+ s(c).dialogShowing ? (l(), S(s(ne), { key: 0 })) : U("", !0)
851
+ ], 64);
852
+ };
853
+ }
854
+ });
855
+ export {
856
+ to as default
857
+ };