@feedmepos/mf-connect 0.1.38-beta.76 → 0.1.38-beta.78

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 (115) hide show
  1. package/dist/{Analytic-BrBxRQue.js → Analytic-VCsXA7tN.js} +29 -30
  2. package/dist/{App-CE_19YJc.js → App-C3h7BzvW.js} +7 -7
  3. package/dist/{AuditLogs-CQtMmVIp.js → AuditLogs-DChTm0o7.js} +9 -9
  4. package/dist/{Bin-D9CHhiUb.js → Bin-Ctg5MEH1.js} +8 -8
  5. package/dist/{Broadcast-Dg6eBL_f.js → Broadcast-BC0Dn5KX.js} +22 -23
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CSv0R9XX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DixbhtL0.js} +6 -6
  7. package/dist/{Card-BTkf67i1.js → Card-CPf78WVe.js} +18 -18
  8. package/dist/{Collections-Czq4nsdu.js → Collections-CFaHjMsW.js} +13 -14
  9. package/dist/{Credit-B3nX8aJA.js → Credit-CUfndg2i.js} +30 -31
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D2gTuN97.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKv94j3F.js} +33 -33
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-5U6cSZGZ.js → EffectSheet.vue_vue_type_style_index_0_lang-B3Hrhp0c.js} +6 -6
  12. package/dist/{Experience-B9Vn3NTH.js → Experience-BjkhGFFu.js} +11 -12
  13. package/dist/{FileSaver.min-CJaOkSQt.js → FileSaver.min-CwKsfqnU.js} +1 -1
  14. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  15. package/dist/{Game-DTx_EsM3.js → Game-fI2GMPAc.js} +12 -13
  16. package/dist/{Grab-B29W7rka.js → Grab-DK4Bs9T-.js} +31 -32
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DyegKNzM.js → ImageInput.vue_vue_type_script_setup_true_lang-CKVKss1k.js} +1 -1
  18. package/dist/{Index-Fk8EP5dG.js → Index-CCobdOFl.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-D2XPGgTM.js → LocationPicker.vue_vue_type_script_setup_true_lang-BNHNFP5D.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-K8qUYrPk.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C1T1qoUS.js} +1 -1
  21. package/dist/{MainLayout-BFmqJkE_.js → MainLayout-C4qzV9tn.js} +1 -1
  22. package/dist/Marketing-6qXWCcNA.js +157 -0
  23. package/dist/MarketingMaterialEdit-C74xVj4y.js +857 -0
  24. package/dist/{Member-DwPJNAo9.js → Member-B85PlRE2.js} +11 -11
  25. package/dist/{MemberList-mS1W0qHY.js → MemberList-DPmz3Opy.js} +26 -26
  26. package/dist/{MemberTransactions-BV3xvFYS.js → MemberTransactions-Dsa9w9W-.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DzKqVp2O.js → MessageInput.vue_vue_type_script_setup_true_lang-CNaz513g.js} +9 -9
  28. package/dist/{Mission-QmoURSu4.js → Mission-C4SBvbNg.js} +22 -23
  29. package/dist/{Overview-CaTMLlq-.js → Overview-ClDQbGY4.js} +18 -18
  30. package/dist/{Point-CjG77Sma.js → Point-BVKIWsY3.js} +11 -12
  31. package/dist/{Promotion-C5I-1qPN.js → Promotion-BF9d5lk2.js} +12 -13
  32. package/dist/{Queue-BaIBCCaX.js → Queue-qahb5fft.js} +10 -10
  33. package/dist/{Record-DqpGwZIU.js → Record-BUV8ZdU3.js} +9 -9
  34. package/dist/{Review-Bq-edSOO.js → Review-CA23dkxd.js} +4 -4
  35. package/dist/{ReviewFacebookCallback-yaC4rLki.js → ReviewFacebookCallback-DeMiZX62.js} +4 -4
  36. package/dist/{ReviewGoogleCallback-uxrrCQdu.js → ReviewGoogleCallback-BvJSLV9F.js} +4 -4
  37. package/dist/{Reward-DGP65n5t.js → Reward-CvBYF099.js} +16 -16
  38. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-bNMoMZOy.js → RewardGroup.vue_vue_type_script_setup_true_lang-D_eHt5fI.js} +11 -11
  39. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dgrc6vXF.js → RuleGroup.vue_vue_type_script_setup_true_lang-6RN-20vi.js} +14 -14
  40. package/dist/{Segment-CNz0sR3c.js → Segment-BFbGGvOI.js} +24 -24
  41. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DLZEzpve.js → SelectItems.vue_vue_type_script_setup_true_lang-BHG6QOaW.js} +2 -2
  42. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CLdIeyef.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-JZ5VuHF1.js} +12 -12
  43. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Dgyofqk8.js +226 -0
  44. package/dist/{Setting-BKDSGYBR.js → Setting-D6Yt2Hyr.js} +14 -14
  45. package/dist/{SettingAdvertisements-B2GMFfN9.js → SettingAdvertisements-Y6ODltcR.js} +12 -12
  46. package/dist/{Store-C6uLl_Ue.js → Store-Mhkl6zhg.js} +21 -21
  47. package/dist/{StoreRewards-D4728UDf.js → StoreRewards-Bv-zwdt_.js} +15 -15
  48. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CG09fJTP.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BQO12vA9.js} +21 -21
  49. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B0_bMK5u.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BTfT4QAC.js} +2 -2
  50. package/dist/{Tier-BNzTa1_w.js → Tier-BYXIBg8s.js} +25 -26
  51. package/dist/{Title-DY5knovF.js → Title-kpCJmPvQ.js} +29 -30
  52. package/dist/{Transaction-Ct4yAJ9n.js → Transaction-DQy-t6tK.js} +2 -2
  53. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CHnxi3XZ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DiW7jXt6.js} +6 -6
  54. package/dist/{Voucher-DFTMRPT0.js → Voucher-BA_9PgA2.js} +15 -16
  55. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DZU7XVlZ.js → VoucherEditor.vue_vue_type_script_setup_true_lang-OoPMbbWd.js} +12 -12
  56. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BndLHmHB.js → ZodTextField.vue_vue_type_script_setup_true_lang-Dq2TlOIT.js} +2 -2
  57. package/dist/{app-6lG4w5PT.js → app-DJxUak8Q.js} +328 -419
  58. package/dist/app.js +1 -1
  59. package/dist/{business-CrfQ56D0.js → business-Dx3tPdK2.js} +1 -1
  60. package/dist/campaign-7Eu0LkpH.js +219 -0
  61. package/dist/{campaign-B_iIaTKz.js → campaign-D2xK0tWG.js} +8 -8
  62. package/dist/{campaign.enum-BAHf0dSv.js → campaign.enum-IZBI1M64.js} +1 -1
  63. package/dist/{campaign.fn-DDEgBzH2.js → campaign.fn-DG6v0D4_.js} +128 -128
  64. package/dist/{collectible.enum-9os2zr5a.js → collectible.enum-Bz9l4gWn.js} +1 -1
  65. package/dist/{collection.fn-7qP_m2MW.js → collection.fn-DAcLdA9r.js} +2 -2
  66. package/dist/{dto-C2hLQKuu.js → dto-CTdVFjCy.js} +4 -4
  67. package/dist/{duplicateCampaign-C6RXfeWE.js → duplicateCampaign-DmuOz8P8.js} +2 -2
  68. package/dist/{effect-DGVfWyIc.js → effect-BHqMMiuI.js} +1 -1
  69. package/dist/{email-addresses-BHa_qQBd.js → email-addresses-DO9FPEJG.js} +2 -2
  70. package/dist/{export-CRPfo4hq.js → export-Dq1ecGOS.js} +3 -3
  71. package/dist/{helper-0_zrz4kj.js → helper-C4R3niUO.js} +1 -1
  72. package/dist/{index-DeaGdUSH.js → index-B5R3rD12.js} +3 -3
  73. package/dist/{index-C8L2jQ_6.js → index-Bqp0JS4s.js} +5 -3
  74. package/dist/{index-CO5kQMIK.js → index-C5O0JUok.js} +1 -1
  75. package/dist/{index-QUvYZydO.js → index-C8YsAeR2.js} +1 -1
  76. package/dist/{index-lwxV5iX0.js → index-CDYkEmcE.js} +4 -4
  77. package/dist/{index-Dp1J9Fxa.js → index-CGKANfLZ.js} +1 -1
  78. package/dist/{index-By2wenzb.js → index-CSzWCoI-.js} +1 -1
  79. package/dist/{index-DbJGJ2fB.js → index-Cvoa_YhV.js} +1 -1
  80. package/dist/{index-BpdSswT6.js → index-DZr2PzPy.js} +1 -1
  81. package/dist/{index-4bX0ewBJ.js → index-Dd8Hbv6_.js} +1 -1
  82. package/dist/{index-CW_ub4cF.js → index-QqOuFoKd.js} +3 -3
  83. package/dist/{index-4Vl1VXum.js → index-imR50hIb.js} +6 -6
  84. package/dist/{index-D6Te1BQZ.js → index-mVFLfIAw.js} +3 -3
  85. package/dist/{index.esm2017-ofRmIpjY.js → index.esm2017-Ee5QhYIY.js} +1 -1
  86. package/dist/{loading-8_73fcXo.js → loading-C5QxXpCJ.js} +1 -1
  87. package/dist/{lodash-Bz_vrY3P.js → lodash-BauupBJE.js} +1 -1
  88. package/dist/{membership-CpB39vNW.js → membership-C3FS3V4K.js} +3 -3
  89. package/dist/{money-DALHjzjF.js → money-C_h2PBKm.js} +1 -1
  90. package/dist/{number-D_GJahxw.js → number-CEyqGZhi.js} +1 -1
  91. package/dist/{objectid-BZSH63yc.js → objectid-sT4x06Nd.js} +7 -7
  92. package/dist/{plugins-A4jDcmfS.js → plugins-Cr4fq1-c.js} +3 -3
  93. package/dist/remy-r12bZ_gw.js +46 -0
  94. package/dist/{reward-BqFB2Yn2.js → reward-ZRg3PKdQ.js} +1 -1
  95. package/dist/{rule-DNylZfIG.js → rule-DtQ_9tIs.js} +3 -3
  96. package/dist/{rule-builder-2iT04EOj.js → rule-builder-xRhvszfI.js} +1 -1
  97. package/dist/style.css +1 -1
  98. package/dist/{template-D7rpG7FN.js → template-CviIoV5v.js} +6 -6
  99. package/dist/{timezone-BW17tvi2.js → timezone-Cn4t-gUq.js} +5 -3
  100. package/dist/{trigger-CbVrS2i6.js → trigger-cMNYhqNs.js} +5 -5
  101. package/dist/usePagination-Bb-4w-Ty.js +220 -0
  102. package/dist/{user-Ck-m3cB3.js → user-h4SJx-05.js} +1 -1
  103. package/dist/{vue-i18n-BvqmcBWZ.js → vue-i18n-BVlH2-Q3.js} +326 -326
  104. package/dist/{xlsx-CkqDfUNs.js → xlsx-BfvWsPoE.js} +440 -440
  105. package/dist/{zod-B0YxCfoE.js → zod-C_G8JfBL.js} +1 -1
  106. package/package.json +1 -1
  107. package/dist/GenerateMaterial-C3J9_YHw.js +0 -589
  108. package/dist/Marketing-BRHQHAWD.js +0 -145
  109. package/dist/MarketingMaterialEdit-7s3WEDyJ.js +0 -746
  110. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-ocCdtbbe.js +0 -147
  111. package/dist/campaign-B9fR7RwT.js +0 -100
  112. package/dist/index-Bj0TV_D5.js +0 -36
  113. package/dist/index-Cp8wkBus.js +0 -124
  114. package/dist/remy-D_Deb3ue.js +0 -13
  115. package/dist/usePagination-dXSoqxfG.js +0 -266
@@ -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-BauupBJE.js";
3
+ import "./index-CGKANfLZ.js";
4
+ import { useRoute as q, useRouter as oe } from "vue-router";
5
+ import { u as G } from "./vue-i18n-BVlH2-Q3.js";
6
+ import { u as K, m as N } from "./remy-r12bZ_gw.js";
7
+ import { useClientEvent as Y, ChatPanel as ne } from "@feedmepos/mf-remy-panel";
8
+ import { a as ae } from "./plugins-Cr4fq1-c.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-C5QxXpCJ.js";
13
+ import { R as H } from "./app-DJxUak8Q.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
+ };