@planetaexo/design-system 0.24.3 → 0.26.0

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.
package/dist/index.js CHANGED
@@ -3848,6 +3848,700 @@ ${content}
3848
3848
  </html>`;
3849
3849
  }
3850
3850
  var DEFAULT_LABELS = {
3851
+ travellersHeading: "TRAVELLERS",
3852
+ detailsHeading: "DETAILS",
3853
+ pricesHeading: "PRICES",
3854
+ subtotalLabel: "Subtotal",
3855
+ travellersCountLabel: (n) => `${n} traveller(s)`,
3856
+ lineItemSeparator: "\xD7",
3857
+ lineItemEquals: "=",
3858
+ includedHeading: "O que est\xE1 incluso",
3859
+ notIncludedHeading: "O que n\xE3o est\xE1 incluso",
3860
+ childBadge: "child",
3861
+ adultsUnit: "adult(s)",
3862
+ childrenUnit: "child(ren)"
3863
+ };
3864
+ function BookingAdventureCard({
3865
+ tag,
3866
+ name,
3867
+ startDate,
3868
+ endDate,
3869
+ travellerCount,
3870
+ slots,
3871
+ travellers,
3872
+ itinerary,
3873
+ description,
3874
+ image,
3875
+ imageAlt,
3876
+ location,
3877
+ destination,
3878
+ included,
3879
+ notIncluded,
3880
+ lineItems,
3881
+ subtotal,
3882
+ labels,
3883
+ className
3884
+ }) {
3885
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
3886
+ const l = {
3887
+ travellersHeading: (_a = labels == null ? void 0 : labels.travellersHeading) != null ? _a : DEFAULT_LABELS.travellersHeading,
3888
+ detailsHeading: (_b = labels == null ? void 0 : labels.detailsHeading) != null ? _b : DEFAULT_LABELS.detailsHeading,
3889
+ pricesHeading: (_c = labels == null ? void 0 : labels.pricesHeading) != null ? _c : DEFAULT_LABELS.pricesHeading,
3890
+ subtotalLabel: (_d = labels == null ? void 0 : labels.subtotalLabel) != null ? _d : DEFAULT_LABELS.subtotalLabel,
3891
+ travellersCountLabel: (_e = labels == null ? void 0 : labels.travellersCountLabel) != null ? _e : DEFAULT_LABELS.travellersCountLabel,
3892
+ lineItemSeparator: (_f = labels == null ? void 0 : labels.lineItemSeparator) != null ? _f : DEFAULT_LABELS.lineItemSeparator,
3893
+ lineItemEquals: (_g = labels == null ? void 0 : labels.lineItemEquals) != null ? _g : DEFAULT_LABELS.lineItemEquals,
3894
+ includedHeading: (_h = labels == null ? void 0 : labels.includedHeading) != null ? _h : DEFAULT_LABELS.includedHeading,
3895
+ notIncludedHeading: (_i = labels == null ? void 0 : labels.notIncludedHeading) != null ? _i : DEFAULT_LABELS.notIncludedHeading,
3896
+ childBadge: (_j = labels == null ? void 0 : labels.childBadge) != null ? _j : DEFAULT_LABELS.childBadge,
3897
+ adultsUnit: (_k = labels == null ? void 0 : labels.adultsUnit) != null ? _k : DEFAULT_LABELS.adultsUnit,
3898
+ childrenUnit: (_l = labels == null ? void 0 : labels.childrenUnit) != null ? _l : DEFAULT_LABELS.childrenUnit
3899
+ };
3900
+ const hasTravellers = !!travellers && travellers.length > 0;
3901
+ const hasItinerary = !!itinerary && itinerary.length > 0;
3902
+ const hasDescription = !!description && description.trim().length > 0;
3903
+ const hasIncluded = !!included && included.length > 0;
3904
+ const hasNotIncluded = !!notIncluded && notIncluded.length > 0;
3905
+ const hasLineItems = lineItems.length > 0;
3906
+ const dateRange = endDate ? `${startDate} \u2192 ${endDate}` : startDate;
3907
+ const showSlots = !!slots;
3908
+ const slotsText = showSlots ? [
3909
+ slots.adults ? `${slots.adults} ${l.adultsUnit}` : null,
3910
+ slots.children ? `${slots.children} ${l.childrenUnit}` : null
3911
+ ].filter(Boolean).join(" \xB7 ") : "";
3912
+ const showTravellersCount = !showSlots && typeof travellerCount === "number" && travellerCount > 0;
3913
+ return /* @__PURE__ */ jsxs(
3914
+ "div",
3915
+ {
3916
+ style: {
3917
+ borderRadius: "16px",
3918
+ border: `1px solid ${emailTokens.border}`,
3919
+ backgroundColor: emailTokens.white,
3920
+ overflow: "hidden"
3921
+ },
3922
+ className,
3923
+ children: [
3924
+ image && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", backgroundColor: emailTokens.muted }, children: /* @__PURE__ */ jsx(
3925
+ "img",
3926
+ {
3927
+ src: image,
3928
+ alt: imageAlt != null ? imageAlt : name,
3929
+ style: { width: "100%", height: "auto", display: "block" }
3930
+ }
3931
+ ) }),
3932
+ /* @__PURE__ */ jsxs("div", { style: { padding: "20px" }, children: [
3933
+ tag && /* @__PURE__ */ jsx("div", { style: { marginBottom: "10px" }, children: /* @__PURE__ */ jsx(
3934
+ "span",
3935
+ {
3936
+ style: {
3937
+ display: "inline-block",
3938
+ backgroundColor: emailTokens.primaryLight,
3939
+ color: emailTokens.primary,
3940
+ padding: "2px 8px",
3941
+ borderRadius: "6px",
3942
+ fontSize: "12px",
3943
+ fontWeight: 600,
3944
+ letterSpacing: "0.05em"
3945
+ },
3946
+ children: tag
3947
+ }
3948
+ ) }),
3949
+ /* @__PURE__ */ jsx(
3950
+ "h3",
3951
+ {
3952
+ style: {
3953
+ fontSize: "20px",
3954
+ fontWeight: 700,
3955
+ color: emailTokens.foreground,
3956
+ lineHeight: "1.3",
3957
+ margin: "0 0 10px 0"
3958
+ },
3959
+ children: name
3960
+ }
3961
+ ),
3962
+ /* @__PURE__ */ jsx(
3963
+ "table",
3964
+ {
3965
+ cellPadding: 0,
3966
+ cellSpacing: 0,
3967
+ style: { borderCollapse: "collapse", marginBottom: "10px" },
3968
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
3969
+ /* @__PURE__ */ jsx(
3970
+ "td",
3971
+ {
3972
+ style: {
3973
+ verticalAlign: "middle",
3974
+ paddingRight: "6px",
3975
+ width: "16px"
3976
+ },
3977
+ children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F4C5}" })
3978
+ }
3979
+ ),
3980
+ /* @__PURE__ */ jsx(
3981
+ "td",
3982
+ {
3983
+ style: {
3984
+ verticalAlign: "middle",
3985
+ fontSize: "14px",
3986
+ color: emailTokens.mutedForeground,
3987
+ lineHeight: "1"
3988
+ },
3989
+ children: dateRange
3990
+ }
3991
+ )
3992
+ ] }) })
3993
+ }
3994
+ ),
3995
+ location && /* @__PURE__ */ jsx(
3996
+ "table",
3997
+ {
3998
+ cellPadding: 0,
3999
+ cellSpacing: 0,
4000
+ style: { borderCollapse: "collapse", marginBottom: "10px" },
4001
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4002
+ /* @__PURE__ */ jsx(
4003
+ "td",
4004
+ {
4005
+ style: {
4006
+ verticalAlign: "middle",
4007
+ paddingRight: "6px",
4008
+ width: "16px"
4009
+ },
4010
+ children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F4CD}" })
4011
+ }
4012
+ ),
4013
+ /* @__PURE__ */ jsx(
4014
+ "td",
4015
+ {
4016
+ style: {
4017
+ verticalAlign: "middle",
4018
+ fontSize: "14px",
4019
+ color: emailTokens.mutedForeground,
4020
+ lineHeight: "1"
4021
+ },
4022
+ children: location
4023
+ }
4024
+ )
4025
+ ] }) })
4026
+ }
4027
+ ),
4028
+ showSlots && slotsText && /* @__PURE__ */ jsx(
4029
+ "table",
4030
+ {
4031
+ cellPadding: 0,
4032
+ cellSpacing: 0,
4033
+ style: { borderCollapse: "collapse", marginBottom: "10px" },
4034
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4035
+ /* @__PURE__ */ jsx(
4036
+ "td",
4037
+ {
4038
+ style: {
4039
+ verticalAlign: "middle",
4040
+ paddingRight: "6px",
4041
+ width: "16px"
4042
+ },
4043
+ children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F465}" })
4044
+ }
4045
+ ),
4046
+ /* @__PURE__ */ jsx(
4047
+ "td",
4048
+ {
4049
+ style: {
4050
+ verticalAlign: "middle",
4051
+ fontSize: "14px",
4052
+ color: emailTokens.mutedForeground,
4053
+ lineHeight: "1"
4054
+ },
4055
+ children: slotsText
4056
+ }
4057
+ )
4058
+ ] }) })
4059
+ }
4060
+ ),
4061
+ showTravellersCount && /* @__PURE__ */ jsx(
4062
+ "table",
4063
+ {
4064
+ cellPadding: 0,
4065
+ cellSpacing: 0,
4066
+ style: { borderCollapse: "collapse", marginBottom: "10px" },
4067
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4068
+ /* @__PURE__ */ jsx(
4069
+ "td",
4070
+ {
4071
+ style: {
4072
+ verticalAlign: "middle",
4073
+ paddingRight: "6px",
4074
+ width: "16px"
4075
+ },
4076
+ children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F465}" })
4077
+ }
4078
+ ),
4079
+ /* @__PURE__ */ jsx(
4080
+ "td",
4081
+ {
4082
+ style: {
4083
+ verticalAlign: "middle",
4084
+ fontSize: "14px",
4085
+ color: emailTokens.mutedForeground,
4086
+ lineHeight: "1"
4087
+ },
4088
+ children: l.travellersCountLabel(travellerCount)
4089
+ }
4090
+ )
4091
+ ] }) })
4092
+ }
4093
+ ),
4094
+ destination && /* @__PURE__ */ jsx(
4095
+ "table",
4096
+ {
4097
+ cellPadding: 0,
4098
+ cellSpacing: 0,
4099
+ style: { borderCollapse: "collapse", marginBottom: "10px" },
4100
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4101
+ /* @__PURE__ */ jsx(
4102
+ "td",
4103
+ {
4104
+ style: {
4105
+ verticalAlign: "middle",
4106
+ paddingRight: "6px",
4107
+ width: "16px"
4108
+ },
4109
+ children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F9ED}" })
4110
+ }
4111
+ ),
4112
+ /* @__PURE__ */ jsx(
4113
+ "td",
4114
+ {
4115
+ style: {
4116
+ verticalAlign: "middle",
4117
+ fontSize: "14px",
4118
+ color: emailTokens.mutedForeground,
4119
+ lineHeight: "1"
4120
+ },
4121
+ children: destination
4122
+ }
4123
+ )
4124
+ ] }) })
4125
+ }
4126
+ ),
4127
+ hasTravellers && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4128
+ /* @__PURE__ */ jsx(
4129
+ "hr",
4130
+ {
4131
+ style: {
4132
+ border: "none",
4133
+ borderTop: `1px solid ${emailTokens.border}`,
4134
+ marginBottom: "10px"
4135
+ }
4136
+ }
4137
+ ),
4138
+ /* @__PURE__ */ jsx(
4139
+ "p",
4140
+ {
4141
+ style: {
4142
+ fontSize: "10px",
4143
+ fontWeight: 700,
4144
+ color: emailTokens.mutedForeground,
4145
+ textTransform: "uppercase",
4146
+ letterSpacing: "0.1em",
4147
+ margin: "0 0 8px 0"
4148
+ },
4149
+ children: l.travellersHeading
4150
+ }
4151
+ ),
4152
+ travellers.map((tr, i) => {
4153
+ var _a2;
4154
+ const isObj = typeof tr === "object";
4155
+ const fullName = isObj ? tr.fullName : tr;
4156
+ const isChild = isObj && tr.isChild === true;
4157
+ const childLabel = isObj ? (_a2 = tr.childBadgeLabel) != null ? _a2 : l.childBadge : l.childBadge;
4158
+ return /* @__PURE__ */ jsx(
4159
+ "table",
4160
+ {
4161
+ cellPadding: 0,
4162
+ cellSpacing: 0,
4163
+ style: {
4164
+ borderCollapse: "collapse",
4165
+ width: "100%",
4166
+ marginBottom: "6px"
4167
+ },
4168
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4169
+ /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle" }, children: /* @__PURE__ */ jsx(
4170
+ "span",
4171
+ {
4172
+ style: {
4173
+ fontSize: "14px",
4174
+ fontWeight: 500,
4175
+ color: emailTokens.foreground
4176
+ },
4177
+ children: fullName
4178
+ }
4179
+ ) }),
4180
+ isChild && /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", textAlign: "right" }, children: /* @__PURE__ */ jsx(
4181
+ "span",
4182
+ {
4183
+ style: {
4184
+ fontSize: "10px",
4185
+ fontWeight: 600,
4186
+ color: emailTokens.mutedForeground,
4187
+ backgroundColor: emailTokens.muted,
4188
+ borderRadius: "9999px",
4189
+ padding: "2px 8px",
4190
+ textTransform: "uppercase",
4191
+ letterSpacing: "0.05em"
4192
+ },
4193
+ children: childLabel
4194
+ }
4195
+ ) })
4196
+ ] }) })
4197
+ },
4198
+ i
4199
+ );
4200
+ })
4201
+ ] }),
4202
+ (hasDescription || hasItinerary) && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4203
+ /* @__PURE__ */ jsx(
4204
+ "hr",
4205
+ {
4206
+ style: {
4207
+ border: "none",
4208
+ borderTop: `1px solid ${emailTokens.border}`,
4209
+ marginBottom: "10px"
4210
+ }
4211
+ }
4212
+ ),
4213
+ /* @__PURE__ */ jsx(
4214
+ "p",
4215
+ {
4216
+ style: {
4217
+ fontSize: "10px",
4218
+ fontWeight: 700,
4219
+ color: emailTokens.mutedForeground,
4220
+ textTransform: "uppercase",
4221
+ letterSpacing: "0.1em",
4222
+ margin: "0 0 8px 0"
4223
+ },
4224
+ children: l.detailsHeading
4225
+ }
4226
+ ),
4227
+ hasDescription ? /* @__PURE__ */ jsx(
4228
+ "div",
4229
+ {
4230
+ style: {
4231
+ fontSize: "14px",
4232
+ color: emailTokens.bodyText,
4233
+ lineHeight: "1.4",
4234
+ margin: 0
4235
+ },
4236
+ dangerouslySetInnerHTML: { __html: description }
4237
+ }
4238
+ ) : itinerary.map((line, i) => /* @__PURE__ */ jsx(
4239
+ "p",
4240
+ {
4241
+ style: {
4242
+ fontSize: "14px",
4243
+ color: emailTokens.bodyText,
4244
+ lineHeight: "1.4",
4245
+ margin: "0 0 6px 0"
4246
+ },
4247
+ children: line
4248
+ },
4249
+ i
4250
+ ))
4251
+ ] }),
4252
+ hasIncluded && /* @__PURE__ */ jsxs("div", { style: { marginTop: "10px" }, children: [
4253
+ /* @__PURE__ */ jsx(
4254
+ "h4",
4255
+ {
4256
+ style: {
4257
+ fontSize: "14px",
4258
+ fontWeight: 700,
4259
+ color: emailTokens.foreground,
4260
+ margin: "0 0 8px 0"
4261
+ },
4262
+ children: l.includedHeading
4263
+ }
4264
+ ),
4265
+ included.map((item, i) => /* @__PURE__ */ jsx(
4266
+ "table",
4267
+ {
4268
+ cellPadding: 0,
4269
+ cellSpacing: 0,
4270
+ style: {
4271
+ borderCollapse: "collapse",
4272
+ width: "100%",
4273
+ marginBottom: "6px"
4274
+ },
4275
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4276
+ /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", paddingRight: "8px", width: "16px" }, children: /* @__PURE__ */ jsx(
4277
+ "span",
4278
+ {
4279
+ style: {
4280
+ display: "inline-block",
4281
+ fontSize: "14px",
4282
+ color: emailTokens.primary,
4283
+ lineHeight: "1.2",
4284
+ fontWeight: 700
4285
+ },
4286
+ children: "\u2713"
4287
+ }
4288
+ ) }),
4289
+ /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", fontSize: "14px", color: emailTokens.bodyText }, children: item })
4290
+ ] }) })
4291
+ },
4292
+ i
4293
+ ))
4294
+ ] }),
4295
+ hasNotIncluded && /* @__PURE__ */ jsxs("div", { style: { marginTop: "10px" }, children: [
4296
+ /* @__PURE__ */ jsx(
4297
+ "h4",
4298
+ {
4299
+ style: {
4300
+ fontSize: "14px",
4301
+ fontWeight: 700,
4302
+ color: emailTokens.foreground,
4303
+ margin: "0 0 8px 0"
4304
+ },
4305
+ children: l.notIncludedHeading
4306
+ }
4307
+ ),
4308
+ notIncluded.map((item, i) => /* @__PURE__ */ jsx(
4309
+ "table",
4310
+ {
4311
+ cellPadding: 0,
4312
+ cellSpacing: 0,
4313
+ style: {
4314
+ borderCollapse: "collapse",
4315
+ width: "100%",
4316
+ marginBottom: "6px"
4317
+ },
4318
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4319
+ /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", paddingRight: "8px", width: "16px" }, children: /* @__PURE__ */ jsx(
4320
+ "span",
4321
+ {
4322
+ style: {
4323
+ display: "inline-block",
4324
+ fontSize: "14px",
4325
+ color: emailTokens.destructive,
4326
+ lineHeight: "1.2",
4327
+ fontWeight: 700
4328
+ },
4329
+ children: "\u2717"
4330
+ }
4331
+ ) }),
4332
+ /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", fontSize: "14px", color: emailTokens.bodyText }, children: item })
4333
+ ] }) })
4334
+ },
4335
+ i
4336
+ ))
4337
+ ] }),
4338
+ hasLineItems && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4339
+ /* @__PURE__ */ jsx(
4340
+ "hr",
4341
+ {
4342
+ style: {
4343
+ border: "none",
4344
+ borderTop: `1px solid ${emailTokens.border}`,
4345
+ marginBottom: "10px"
4346
+ }
4347
+ }
4348
+ ),
4349
+ /* @__PURE__ */ jsx(
4350
+ "p",
4351
+ {
4352
+ style: {
4353
+ fontSize: "10px",
4354
+ fontWeight: 700,
4355
+ color: emailTokens.mutedForeground,
4356
+ textTransform: "uppercase",
4357
+ letterSpacing: "0.1em",
4358
+ margin: "0 0 8px 0"
4359
+ },
4360
+ children: l.pricesHeading
4361
+ }
4362
+ ),
4363
+ lineItems.map((li, j) => {
4364
+ var _a2, _b2, _c2;
4365
+ const useLabel = typeof li.label === "string" && li.label.length > 0;
4366
+ const valueText = li.subtotal;
4367
+ const rightStyle = {
4368
+ verticalAlign: "middle",
4369
+ textAlign: "right",
4370
+ fontSize: "14px",
4371
+ fontWeight: 500,
4372
+ whiteSpace: "nowrap",
4373
+ color: li.isDiscount ? emailTokens.green : emailTokens.foreground
4374
+ };
4375
+ return /* @__PURE__ */ jsx(
4376
+ "table",
4377
+ {
4378
+ cellPadding: 0,
4379
+ cellSpacing: 0,
4380
+ style: {
4381
+ borderCollapse: "collapse",
4382
+ width: "100%",
4383
+ marginBottom: "4px"
4384
+ },
4385
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4386
+ /* @__PURE__ */ jsx(
4387
+ "td",
4388
+ {
4389
+ style: {
4390
+ verticalAlign: "middle",
4391
+ fontSize: "14px",
4392
+ color: emailTokens.mutedForeground
4393
+ },
4394
+ children: useLabel ? li.label : `${(_a2 = li.unitPrice) != null ? _a2 : ""} ${l.lineItemSeparator} ${(_b2 = li.quantity) != null ? _b2 : ""} ${(_c2 = li.categoryLabel) != null ? _c2 : ""} ${l.lineItemEquals}`
4395
+ }
4396
+ ),
4397
+ /* @__PURE__ */ jsxs("td", { style: rightStyle, children: [
4398
+ li.isDiscount ? "\u2212" : "",
4399
+ valueText
4400
+ ] })
4401
+ ] }) })
4402
+ },
4403
+ j
4404
+ );
4405
+ }),
4406
+ subtotal && /* @__PURE__ */ jsx(
4407
+ "table",
4408
+ {
4409
+ cellPadding: 0,
4410
+ cellSpacing: 0,
4411
+ style: {
4412
+ borderCollapse: "collapse",
4413
+ width: "100%",
4414
+ paddingTop: "8px",
4415
+ marginTop: "4px",
4416
+ borderTop: `1px solid ${emailTokens.border}`
4417
+ },
4418
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4419
+ /* @__PURE__ */ jsx(
4420
+ "td",
4421
+ {
4422
+ style: {
4423
+ verticalAlign: "middle",
4424
+ fontSize: "14px",
4425
+ fontWeight: 700,
4426
+ color: emailTokens.foreground
4427
+ },
4428
+ children: l.subtotalLabel
4429
+ }
4430
+ ),
4431
+ /* @__PURE__ */ jsx(
4432
+ "td",
4433
+ {
4434
+ style: {
4435
+ verticalAlign: "middle",
4436
+ textAlign: "right",
4437
+ fontSize: "14px",
4438
+ fontWeight: 700,
4439
+ color: emailTokens.foreground,
4440
+ whiteSpace: "nowrap"
4441
+ },
4442
+ children: subtotal
4443
+ }
4444
+ )
4445
+ ] }) })
4446
+ }
4447
+ )
4448
+ ] })
4449
+ ] })
4450
+ ]
4451
+ }
4452
+ );
4453
+ }
4454
+ var DEFAULT_LABELS2 = {
4455
+ heading: "PAYMENT DETAILS"
4456
+ };
4457
+ function PaymentDetailsBlock({
4458
+ rows,
4459
+ footerBanner,
4460
+ labels,
4461
+ className
4462
+ }) {
4463
+ var _a;
4464
+ const l = {
4465
+ heading: (_a = labels == null ? void 0 : labels.heading) != null ? _a : DEFAULT_LABELS2.heading
4466
+ };
4467
+ const hasBanner = !!footerBanner;
4468
+ return /* @__PURE__ */ jsxs(
4469
+ "div",
4470
+ {
4471
+ style: {
4472
+ borderRadius: "12px",
4473
+ border: `1px solid ${emailTokens.border}`,
4474
+ overflow: "hidden"
4475
+ },
4476
+ className,
4477
+ children: [
4478
+ /* @__PURE__ */ jsx(
4479
+ "div",
4480
+ {
4481
+ style: {
4482
+ padding: "12px 16px",
4483
+ backgroundColor: emailTokens.muted,
4484
+ borderBottom: `1px solid ${emailTokens.border}`
4485
+ },
4486
+ children: /* @__PURE__ */ jsx(
4487
+ "p",
4488
+ {
4489
+ style: {
4490
+ fontSize: "10px",
4491
+ fontWeight: 700,
4492
+ color: emailTokens.mutedForeground,
4493
+ textTransform: "uppercase",
4494
+ letterSpacing: "0.1em",
4495
+ margin: 0
4496
+ },
4497
+ children: l.heading
4498
+ }
4499
+ )
4500
+ }
4501
+ ),
4502
+ /* @__PURE__ */ jsx("table", { style: { width: "100%", fontSize: "14px", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxs("tbody", { children: [
4503
+ rows.map((row, i) => {
4504
+ const isLast = i === rows.length - 1;
4505
+ const showBorder = !isLast;
4506
+ const valueStyle = {
4507
+ padding: "10px 16px",
4508
+ textAlign: "right",
4509
+ fontWeight: row.emphasis ? 700 : 500,
4510
+ color: row.emphasis ? emailTokens.primary : emailTokens.foreground,
4511
+ whiteSpace: "nowrap"
4512
+ };
4513
+ return /* @__PURE__ */ jsxs(
4514
+ "tr",
4515
+ {
4516
+ style: showBorder ? { borderBottom: `1px solid ${emailTokens.border}` } : {},
4517
+ children: [
4518
+ /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: row.label }),
4519
+ /* @__PURE__ */ jsx("td", { style: valueStyle, children: row.value })
4520
+ ]
4521
+ },
4522
+ i
4523
+ );
4524
+ }),
4525
+ hasBanner && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
4526
+ "td",
4527
+ {
4528
+ colSpan: 2,
4529
+ style: {
4530
+ padding: "12px 16px",
4531
+ textAlign: "center",
4532
+ fontWeight: 600,
4533
+ color: emailTokens.green,
4534
+ backgroundColor: emailTokens.greenBg
4535
+ },
4536
+ children: footerBanner.text
4537
+ }
4538
+ ) })
4539
+ ] }) })
4540
+ ]
4541
+ }
4542
+ );
4543
+ }
4544
+ var DEFAULT_LABELS3 = {
3851
4545
  ctaButton: "View booking details",
3852
4546
  logoAlt: "PlanetaEXO",
3853
4547
  greeting: (recipientName) => `Hi ${recipientName},`,
@@ -3899,7 +4593,7 @@ function BookingConfirmation({
3899
4593
  className,
3900
4594
  flow = "auto"
3901
4595
  }) {
3902
- const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS), labels);
4596
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS3), labels);
3903
4597
  const allTravellers = adventures.flatMap((a) => {
3904
4598
  var _a;
3905
4599
  return (_a = a.travellers) != null ? _a : [];
@@ -3987,115 +4681,57 @@ function BookingConfirmation({
3987
4681
  ] }),
3988
4682
  /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
3989
4683
  /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: adventures.map((adventure, adIdx) => {
3990
- var _a, _b, _c, _d, _e;
3991
- return /* @__PURE__ */ jsxs(
4684
+ var _a, _b, _c, _d;
4685
+ const locationToPass = adventure.location && !adventure.destinationName ? adventure.location : void 0;
4686
+ const destinationToPass = (_a = adventure.destinationName) != null ? _a : adventure.partner;
4687
+ const tagToPass = (_b = adventure.code) != null ? _b : adventure.reference;
4688
+ const travellersToPass = (_c = adventure.travellers) == null ? void 0 : _c.map((tr) => ({
4689
+ fullName: `${tr.firstName} ${tr.lastName}`,
4690
+ isChild: tr.isChild,
4691
+ childBadgeLabel: l.childBadge
4692
+ }));
4693
+ const lineItemsToPass = ((_d = adventure.lineItems) != null ? _d : []).map((it) => ({
4694
+ label: it.label,
4695
+ subtotal: it.price,
4696
+ isDiscount: it.isDiscount
4697
+ }));
4698
+ return /* @__PURE__ */ jsx(
3992
4699
  "div",
3993
4700
  {
3994
4701
  style: {
3995
- borderRadius: "16px",
3996
- border: `1px solid ${emailTokens.border}`,
3997
- backgroundColor: emailTokens.white,
3998
- overflow: "hidden",
3999
4702
  marginBottom: adIdx < adventures.length - 1 ? "24px" : "0"
4000
4703
  },
4001
- children: [
4002
- adventure.image && /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", backgroundColor: emailTokens.muted }, children: /* @__PURE__ */ jsx(
4003
- "img",
4004
- {
4005
- src: adventure.image,
4006
- alt: (_a = adventure.imageAlt) != null ? _a : adventure.title,
4007
- style: { width: "100%", height: "auto", display: "block" }
4704
+ children: /* @__PURE__ */ jsx(
4705
+ BookingAdventureCard,
4706
+ {
4707
+ tag: tagToPass,
4708
+ name: adventure.title,
4709
+ startDate: adventure.dateFrom,
4710
+ endDate: adventure.dateTo,
4711
+ slots: adventure.slots,
4712
+ travellers: travellersToPass,
4713
+ description: adventure.description,
4714
+ image: adventure.image,
4715
+ imageAlt: adventure.imageAlt,
4716
+ location: locationToPass,
4717
+ destination: destinationToPass,
4718
+ included: adventure.included,
4719
+ notIncluded: adventure.notIncluded,
4720
+ lineItems: lineItemsToPass,
4721
+ subtotal: adventure.subtotal,
4722
+ labels: {
4723
+ travellersHeading: l.travellersLabel,
4724
+ detailsHeading: l.itineraryLabel,
4725
+ pricesHeading: l.pricingLabel,
4726
+ subtotalLabel: l.subtotalLabel,
4727
+ includedHeading: l.includedLabel,
4728
+ notIncludedHeading: l.notIncludedLabel,
4729
+ childBadge: l.childBadge,
4730
+ adultsUnit: l.adultsUnit,
4731
+ childrenUnit: l.childrenUnit
4008
4732
  }
4009
- ) }),
4010
- /* @__PURE__ */ jsxs("div", { style: { padding: "20px" }, children: [
4011
- ((_b = adventure.code) != null ? _b : adventure.reference) && /* @__PURE__ */ jsx("div", { style: { marginBottom: "10px" }, children: /* @__PURE__ */ jsx("span", { style: {
4012
- display: "inline-block",
4013
- backgroundColor: emailTokens.primaryLight,
4014
- color: emailTokens.primary,
4015
- padding: "2px 8px",
4016
- borderRadius: "6px",
4017
- fontSize: "12px",
4018
- fontWeight: "600",
4019
- letterSpacing: "0.05em"
4020
- }, children: (_c = adventure.code) != null ? _c : adventure.reference }) }),
4021
- /* @__PURE__ */ jsx("h3", { style: { fontSize: "20px", fontWeight: "700", color: emailTokens.foreground, lineHeight: "1.3", margin: "0 0 10px 0" }, children: adventure.title }),
4022
- /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", marginBottom: "10px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4023
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", paddingRight: "6px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F4C5}" }) }),
4024
- /* @__PURE__ */ jsxs("td", { style: { verticalAlign: "middle", fontSize: "14px", color: emailTokens.mutedForeground, lineHeight: "1" }, children: [
4025
- adventure.dateFrom,
4026
- " \u2192 ",
4027
- adventure.dateTo
4028
- ] })
4029
- ] }) }) }),
4030
- adventure.location && !adventure.destinationName && /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", marginBottom: "10px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4031
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", paddingRight: "6px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F4CD}" }) }),
4032
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", fontSize: "14px", color: emailTokens.mutedForeground, lineHeight: "1" }, children: adventure.location })
4033
- ] }) }) }),
4034
- adventure.slots && /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", marginBottom: "10px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4035
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", paddingRight: "6px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F465}" }) }),
4036
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", fontSize: "14px", color: emailTokens.mutedForeground, lineHeight: "1" }, children: [
4037
- adventure.slots.adults ? `${adventure.slots.adults} ${l.adultsUnit}` : null,
4038
- adventure.slots.children ? `${adventure.slots.children} ${l.childrenUnit}` : null
4039
- ].filter(Boolean).join(" \xB7 ") })
4040
- ] }) }) }),
4041
- ((_d = adventure.destinationName) != null ? _d : adventure.partner) && /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", marginBottom: "10px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4042
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", paddingRight: "6px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F9ED}" }) }),
4043
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", fontSize: "14px", color: emailTokens.mutedForeground, lineHeight: "1" }, children: (_e = adventure.destinationName) != null ? _e : adventure.partner })
4044
- ] }) }) }),
4045
- adventure.travellers && adventure.travellers.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4046
- /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, marginBottom: "10px" } }),
4047
- /* @__PURE__ */ jsx("p", { style: { fontSize: "10px", fontWeight: "700", color: emailTokens.mutedForeground, textTransform: "uppercase", letterSpacing: "0.1em", margin: "0 0 8px 0" }, children: l.travellersLabel }),
4048
- adventure.travellers.map((traveller) => /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", marginBottom: "6px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4049
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle" }, children: /* @__PURE__ */ jsxs("span", { style: { fontSize: "14px", fontWeight: "500", color: emailTokens.foreground }, children: [
4050
- traveller.firstName,
4051
- " ",
4052
- traveller.lastName
4053
- ] }) }),
4054
- traveller.isChild && /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", textAlign: "right" }, children: /* @__PURE__ */ jsx("span", { style: { fontSize: "10px", fontWeight: "600", color: emailTokens.mutedForeground, backgroundColor: emailTokens.muted, borderRadius: "9999px", padding: "2px 8px", textTransform: "uppercase", letterSpacing: "0.05em" }, children: l.childBadge }) })
4055
- ] }) }) }, traveller.id))
4056
- ] }),
4057
- adventure.description && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4058
- /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, marginBottom: "10px" } }),
4059
- /* @__PURE__ */ jsx("p", { style: { fontSize: "10px", fontWeight: "700", color: emailTokens.mutedForeground, textTransform: "uppercase", letterSpacing: "0.1em", margin: "0 0 8px 0" }, children: l.itineraryLabel }),
4060
- /* @__PURE__ */ jsx(
4061
- "div",
4062
- {
4063
- style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.4", margin: 0 },
4064
- dangerouslySetInnerHTML: { __html: adventure.description }
4065
- }
4066
- )
4067
- ] }),
4068
- adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "10px" }, children: [
4069
- /* @__PURE__ */ jsx("h4", { style: { fontSize: "14px", fontWeight: "700", color: emailTokens.foreground, margin: "0 0 8px 0" }, children: l.includedLabel }),
4070
- adventure.included.map((item, i) => /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", marginBottom: "6px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4071
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", paddingRight: "8px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", color: emailTokens.primary, lineHeight: "1.2", fontWeight: 700 }, children: "\u2713" }) }),
4072
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", fontSize: "14px", color: emailTokens.bodyText }, children: item })
4073
- ] }) }) }, i))
4074
- ] }),
4075
- adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "10px" }, children: [
4076
- /* @__PURE__ */ jsx("h4", { style: { fontSize: "14px", fontWeight: "700", color: emailTokens.foreground, margin: "0 0 8px 0" }, children: l.notIncludedLabel }),
4077
- adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", marginBottom: "6px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4078
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", paddingRight: "8px", width: "16px" }, children: /* @__PURE__ */ jsx("span", { style: { display: "inline-block", fontSize: "14px", color: emailTokens.destructive, lineHeight: "1.2", fontWeight: 700 }, children: "\u2717" }) }),
4079
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top", fontSize: "14px", color: emailTokens.bodyText }, children: item })
4080
- ] }) }) }, i))
4081
- ] }),
4082
- adventure.lineItems && adventure.lineItems.length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginTop: "4px" }, children: [
4083
- /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, marginBottom: "10px" } }),
4084
- /* @__PURE__ */ jsx("p", { style: { fontSize: "10px", fontWeight: "700", color: emailTokens.mutedForeground, textTransform: "uppercase", letterSpacing: "0.1em", margin: "0 0 8px 0" }, children: l.pricingLabel }),
4085
- adventure.lineItems.map((item, j) => /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", marginBottom: "4px" }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4086
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", fontSize: "14px", color: emailTokens.mutedForeground }, children: item.label }),
4087
- /* @__PURE__ */ jsxs("td", { style: { verticalAlign: "middle", textAlign: "right", fontSize: "14px", fontWeight: "500", whiteSpace: "nowrap", color: item.isDiscount ? emailTokens.green : emailTokens.foreground }, children: [
4088
- item.isDiscount ? "\u2212" : "",
4089
- item.price
4090
- ] })
4091
- ] }) }) }, j)),
4092
- adventure.subtotal && /* @__PURE__ */ jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", paddingTop: "8px", marginTop: "4px", borderTop: `1px solid ${emailTokens.border}` }, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", { children: [
4093
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", fontSize: "14px", fontWeight: "700", color: emailTokens.foreground }, children: l.subtotalLabel }),
4094
- /* @__PURE__ */ jsx("td", { style: { verticalAlign: "middle", textAlign: "right", fontSize: "14px", fontWeight: "700", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: adventure.subtotal })
4095
- ] }) }) })
4096
- ] })
4097
- ] })
4098
- ]
4733
+ }
4734
+ )
4099
4735
  },
4100
4736
  adventure.id
4101
4737
  );
@@ -4120,24 +4756,32 @@ function BookingConfirmation({
4120
4756
  /* @__PURE__ */ jsx("td", { style: { padding: "16px", textAlign: "right", fontWeight: "700", color: emailTokens.primary, fontSize: "20px", whiteSpace: "nowrap" }, children: total })
4121
4757
  ] })
4122
4758
  ] }) }) }),
4123
- depositInfo && /* @__PURE__ */ jsxs("div", { style: { borderRadius: "12px", border: `1px solid ${emailTokens.border}`, marginTop: "16px", overflow: "hidden" }, children: [
4124
- /* @__PURE__ */ jsx("div", { style: { padding: "12px 16px", backgroundColor: emailTokens.muted, borderBottom: `1px solid ${emailTokens.border}` }, children: /* @__PURE__ */ jsx("p", { style: { fontSize: "10px", fontWeight: "700", color: emailTokens.mutedForeground, textTransform: "uppercase", letterSpacing: "0.1em", margin: 0 }, children: l.paymentDetailsHeading }) }),
4125
- /* @__PURE__ */ jsx("table", { style: { width: "100%", fontSize: "14px", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxs("tbody", { children: [
4126
- /* @__PURE__ */ jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
4127
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.depositLabel(depositInfo.depositPercent) }),
4128
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.depositAmount })
4129
- ] }),
4130
- /* @__PURE__ */ jsxs("tr", { style: depositInfo.isPaidInFull ? {} : { borderBottom: `1px solid ${emailTokens.border}` }, children: [
4131
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.remainingBalanceLabel }),
4132
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.remainingAmount })
4133
- ] }),
4134
- !depositInfo.isPaidInFull && /* @__PURE__ */ jsxs("tr", { children: [
4135
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.balanceDueLabel }),
4136
- /* @__PURE__ */ jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.balanceDueDate })
4137
- ] }),
4138
- depositInfo.isPaidInFull && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 2, style: { padding: "12px 16px", textAlign: "center", fontWeight: "600", color: emailTokens.green, backgroundColor: emailTokens.greenBg }, children: l.paidInFullLabel }) })
4139
- ] }) })
4140
- ] })
4759
+ depositInfo && /* @__PURE__ */ jsx("div", { style: { marginTop: "16px" }, children: /* @__PURE__ */ jsx(
4760
+ PaymentDetailsBlock,
4761
+ {
4762
+ labels: { heading: l.paymentDetailsHeading },
4763
+ rows: (() => {
4764
+ const rows = [
4765
+ {
4766
+ label: l.depositLabel(depositInfo.depositPercent),
4767
+ value: depositInfo.depositAmount
4768
+ },
4769
+ {
4770
+ label: l.remainingBalanceLabel,
4771
+ value: depositInfo.remainingAmount
4772
+ }
4773
+ ];
4774
+ if (!depositInfo.isPaidInFull) {
4775
+ rows.push({
4776
+ label: l.balanceDueLabel,
4777
+ value: depositInfo.balanceDueDate
4778
+ });
4779
+ }
4780
+ return rows;
4781
+ })(),
4782
+ footerBanner: depositInfo.isPaidInFull ? { text: l.paidInFullLabel, kind: "success" } : void 0
4783
+ }
4784
+ ) })
4141
4785
  ] }),
4142
4786
  /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
4143
4787
  /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "40px" }, children: isManualFlow ? (
@@ -4154,7 +4798,7 @@ function BookingConfirmation({
4154
4798
  }
4155
4799
  );
4156
4800
  }
4157
- var DEFAULT_LABELS2 = {
4801
+ var DEFAULT_LABELS4 = {
4158
4802
  ctaButton: "Add travellers to your booking",
4159
4803
  logoAlt: "PlanetaEXO",
4160
4804
  greeting: (recipientName) => `Hi ${recipientName},`,
@@ -4187,7 +4831,7 @@ function BookingConfirmationEmail({
4187
4831
  nextStepsImportant,
4188
4832
  directBookingLinkLabel
4189
4833
  }) {
4190
- const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS2), labels);
4834
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS4), labels);
4191
4835
  const ctaStyle = {
4192
4836
  display: "inline-block",
4193
4837
  backgroundColor: emailTokens.primary,
@@ -4274,7 +4918,7 @@ function BookingConfirmationEmail({
4274
4918
  }
4275
4919
  );
4276
4920
  }
4277
- var DEFAULT_LABELS3 = {
4921
+ var DEFAULT_LABELS5 = {
4278
4922
  logoAlt: "PlanetaEXO",
4279
4923
  greeting: (name) => `Hi ${name},`,
4280
4924
  receiptHeading: "Payment receipt",
@@ -4313,7 +4957,7 @@ function PaymentReceiptEmail({
4313
4957
  labels,
4314
4958
  className
4315
4959
  }) {
4316
- const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS3), labels);
4960
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS5), labels);
4317
4961
  const travellersLine = travellers.filter((s) => s.trim().length > 0).join(", ");
4318
4962
  const interestRow = chargedAmount && chargedAmount !== amount;
4319
4963
  const receiptRows = [
@@ -4409,8 +5053,24 @@ function PaymentReceiptEmail({
4409
5053
  }
4410
5054
  );
4411
5055
  }
4412
- var EMPTY_AGENT_FN = (_agentName) => "";
4413
- var DEFAULT_LABELS4 = {
5056
+ var INLINE_LINK_STYLE = {
5057
+ color: emailTokens.primary,
5058
+ textDecoration: "underline"
5059
+ };
5060
+ function renderWhatsappLink(contact, label) {
5061
+ if (contact.whatsappUrl) {
5062
+ return /* @__PURE__ */ jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE, children: label });
5063
+ }
5064
+ return label;
5065
+ }
5066
+ function renderEmailLink(contact, label) {
5067
+ if (contact.email) {
5068
+ return /* @__PURE__ */ jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE, children: label });
5069
+ }
5070
+ return label;
5071
+ }
5072
+ var EMPTY_CLOSING_ALTERNATIVE = (_agentName, _contact) => null;
5073
+ var DEFAULT_LABELS6 = {
4414
5074
  logoAlt: "PlanetaEXO",
4415
5075
  greeting: (name) => `Hi ${name},`,
4416
5076
  intermediateHello: "Hope you're doing well.",
@@ -4418,38 +5078,64 @@ var DEFAULT_LABELS4 = {
4418
5078
  amountAlreadyPaidLabel: "Amount already paid",
4419
5079
  remainingBalanceDueLabel: "Remaining balance due",
4420
5080
  totalBookingAmountLabel: "Total booking amount",
5081
+ paymentDetailsHeading: "PAYMENT DETAILS",
4421
5082
  ctaLabel: "Complete Payment",
4422
5083
  teamSignature: "The PlanetaEXO Team",
4423
- closingAgent: (agentName) => `If you need any assistance or would like to discuss your payment, feel free to contact your agent ${agentName} via WhatsApp or email.`,
5084
+ closingAgent: (agentName, contact) => /* @__PURE__ */ jsxs(Fragment, { children: [
5085
+ "If you need any assistance or would like to discuss your payment, feel free to contact your agent ",
5086
+ agentName,
5087
+ " via ",
5088
+ renderWhatsappLink(contact, "WhatsApp"),
5089
+ " or ",
5090
+ renderEmailLink(contact, "email"),
5091
+ "."
5092
+ ] }),
4424
5093
  closingNoAgent: "If you need any assistance or would like to discuss your payment, feel free to contact us via WhatsApp or email.",
5094
+ adventureCard: {
5095
+ travellersHeading: "TRAVELLERS",
5096
+ detailsHeading: "DETAILS",
5097
+ pricesHeading: "PRICES",
5098
+ subtotalLabel: "Subtotal",
5099
+ travellersCountLabel: (n) => `${n} traveller(s)`,
5100
+ lineItemSeparator: "\xD7",
5101
+ lineItemEquals: "="
5102
+ },
4425
5103
  variants: {
4426
5104
  dMinus1: {
4427
5105
  intro: (b, d) => `This is a friendly reminder that the remaining balance for your booking #${b} with PlanetaEXO is due tomorrow (${d}).`,
4428
5106
  secureLine: "To secure your booking, please complete the payment through your booking page using the button below:",
4429
5107
  closingThanks: "Many thanks, and we look forward to helping you experience your next adventure with us.",
4430
5108
  disregardIfPaid: "",
4431
- closingAlternative: EMPTY_AGENT_FN
5109
+ closingAlternative: EMPTY_CLOSING_ALTERNATIVE
4432
5110
  },
4433
5111
  dZero: {
4434
5112
  intro: (b, d) => `This is a friendly reminder that the remaining balance for your booking #${b} with PlanetaEXO is due today (${d}).`,
4435
5113
  secureLine: "To keep your booking confirmed, please complete the payment through your booking page using the button below:",
4436
5114
  closingThanks: "Many thanks, and we look forward to welcoming you soon.",
4437
5115
  disregardIfPaid: "",
4438
- closingAlternative: EMPTY_AGENT_FN
5116
+ closingAlternative: EMPTY_CLOSING_ALTERNATIVE
4439
5117
  },
4440
5118
  dPlus1: {
4441
5119
  intro: (b, d) => `We noticed that the remaining balance for your booking #${b} with PlanetaEXO was due yesterday (${d}) and is still pending.`,
4442
5120
  secureLine: "To avoid any impact on your booking confirmation, we kindly ask you to complete the payment as soon as possible through your booking page:",
4443
5121
  closingThanks: "Thank you, and we hope to welcome you on your upcoming adventure soon.",
4444
5122
  disregardIfPaid: "If you have already completed the payment, please disregard this message.",
4445
- closingAlternative: EMPTY_AGENT_FN
5123
+ closingAlternative: EMPTY_CLOSING_ALTERNATIVE
4446
5124
  },
4447
5125
  dPlus2: {
4448
5126
  intro: (b, d) => `This is a final reminder regarding the remaining balance for your booking #${b} with PlanetaEXO, which was due on ${d} and is still pending.`,
4449
5127
  secureLine: "To avoid any impact on your booking status or availability, we kindly ask you to complete the payment as soon as possible through your booking page:",
4450
5128
  closingThanks: "Thank you for your attention, and we hope to welcome you on this adventure soon.",
4451
5129
  disregardIfPaid: "If you have already completed the payment, please disregard this message.",
4452
- closingAlternative: (agentName) => `If you are experiencing any issues with payment or need additional time, please contact your agent ${agentName} via WhatsApp or email. We'll be happy to assist.`
5130
+ closingAlternative: (agentName, contact) => /* @__PURE__ */ jsxs(Fragment, { children: [
5131
+ "If you are experiencing any issues with payment or need additional time, please contact your agent ",
5132
+ agentName,
5133
+ " via ",
5134
+ renderWhatsappLink(contact, "WhatsApp"),
5135
+ " or ",
5136
+ renderEmailLink(contact, "email"),
5137
+ ". We'll be happy to assist."
5138
+ ] })
4453
5139
  }
4454
5140
  }
4455
5141
  };
@@ -4464,13 +5150,14 @@ function PaymentReminderEmail({
4464
5150
  totalBookingAmount,
4465
5151
  viewBookingUrl,
4466
5152
  agentName,
5153
+ agentContactLinks,
4467
5154
  logoUrl,
4468
5155
  labels,
4469
5156
  className
4470
5157
  }) {
4471
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
5158
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
4472
5159
  const lOverride = labels != null ? labels : {};
4473
- const variantDefaults = DEFAULT_LABELS4.variants[variant];
5160
+ const variantDefaults = DEFAULT_LABELS6.variants[variant];
4474
5161
  const variantOverride = (_b = (_a = lOverride.variants) == null ? void 0 : _a[variant]) != null ? _b : {};
4475
5162
  const variantLabels = {
4476
5163
  intro: (_c = variantOverride.intro) != null ? _c : variantDefaults.intro,
@@ -4480,17 +5167,19 @@ function PaymentReminderEmail({
4480
5167
  closingAlternative: (_f = variantOverride.closingAlternative) != null ? _f : variantDefaults.closingAlternative
4481
5168
  };
4482
5169
  const l = {
4483
- logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS4.logoAlt,
4484
- greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS4.greeting,
4485
- intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS4.intermediateHello,
4486
- bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS4.bookingSummaryHeader,
4487
- amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS4.amountAlreadyPaidLabel,
4488
- remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS4.remainingBalanceDueLabel,
4489
- totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS4.totalBookingAmountLabel,
4490
- ctaLabel: (_n = lOverride.ctaLabel) != null ? _n : DEFAULT_LABELS4.ctaLabel,
4491
- teamSignature: (_o = lOverride.teamSignature) != null ? _o : DEFAULT_LABELS4.teamSignature,
4492
- closingAgent: (_p = lOverride.closingAgent) != null ? _p : DEFAULT_LABELS4.closingAgent,
4493
- closingNoAgent: (_q = lOverride.closingNoAgent) != null ? _q : DEFAULT_LABELS4.closingNoAgent
5170
+ logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS6.logoAlt,
5171
+ greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS6.greeting,
5172
+ intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS6.intermediateHello,
5173
+ bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS6.bookingSummaryHeader,
5174
+ amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS6.amountAlreadyPaidLabel,
5175
+ remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS6.remainingBalanceDueLabel,
5176
+ totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS6.totalBookingAmountLabel,
5177
+ paymentDetailsHeading: (_n = lOverride.paymentDetailsHeading) != null ? _n : DEFAULT_LABELS6.paymentDetailsHeading,
5178
+ ctaLabel: (_o = lOverride.ctaLabel) != null ? _o : DEFAULT_LABELS6.ctaLabel,
5179
+ teamSignature: (_p = lOverride.teamSignature) != null ? _p : DEFAULT_LABELS6.teamSignature,
5180
+ closingAgent: (_q = lOverride.closingAgent) != null ? _q : DEFAULT_LABELS6.closingAgent,
5181
+ closingNoAgent: (_r = lOverride.closingNoAgent) != null ? _r : DEFAULT_LABELS6.closingNoAgent,
5182
+ adventureCard: __spreadValues(__spreadValues({}, DEFAULT_LABELS6.adventureCard), (_s = lOverride.adventureCard) != null ? _s : {})
4494
5183
  };
4495
5184
  const ctaStyle = {
4496
5185
  display: "inline-block",
@@ -4503,16 +5192,15 @@ function PaymentReminderEmail({
4503
5192
  textDecoration: "none",
4504
5193
  fontFamily: emailTokens.fontFamily
4505
5194
  };
4506
- const summaryRowStyle = {
4507
- margin: "0 0 8px",
4508
- fontSize: "14px",
4509
- color: emailTokens.foreground
4510
- };
4511
5195
  const agentNameTrimmed = agentName == null ? void 0 : agentName.trim();
4512
- const closingMain = agentNameTrimmed ? l.closingAgent(agentNameTrimmed) : l.closingNoAgent;
5196
+ const contact = agentContactLinks != null ? agentContactLinks : {};
5197
+ let closingMainNode;
5198
+ if (variant === "dPlus2") {
5199
+ closingMainNode = agentNameTrimmed ? variantLabels.closingAlternative(agentNameTrimmed, contact) : l.closingNoAgent;
5200
+ } else {
5201
+ closingMainNode = agentNameTrimmed ? l.closingAgent(agentNameTrimmed, contact) : l.closingNoAgent;
5202
+ }
4513
5203
  const showDisregard = typeof variantLabels.disregardIfPaid === "string" && variantLabels.disregardIfPaid.trim().length > 0;
4514
- const closingAlternativeText = agentNameTrimmed && variantLabels.closingAlternative ? variantLabels.closingAlternative(agentNameTrimmed) : "";
4515
- const showClosingAlternative = closingAlternativeText.trim().length > 0;
4516
5204
  return /* @__PURE__ */ jsxs(
4517
5205
  "div",
4518
5206
  {
@@ -4559,75 +5247,53 @@ function PaymentReminderEmail({
4559
5247
  children: l.bookingSummaryHeader
4560
5248
  }
4561
5249
  ),
4562
- adventures.map((adv, advIdx) => /* @__PURE__ */ jsxs(
4563
- "div",
4564
- {
4565
- style: {
4566
- marginBottom: "20px",
4567
- paddingBottom: "16px",
4568
- borderBottom: advIdx < adventures.length - 1 ? `1px solid ${emailTokens.border}` : "none"
4569
- },
4570
- children: [
4571
- /* @__PURE__ */ jsx(
4572
- "p",
5250
+ adventures.map((adv, advIdx) => {
5251
+ var _a2;
5252
+ return /* @__PURE__ */ jsx(
5253
+ "div",
5254
+ {
5255
+ style: {
5256
+ marginBottom: advIdx < adventures.length - 1 ? "16px" : "20px"
5257
+ },
5258
+ children: /* @__PURE__ */ jsx(
5259
+ BookingAdventureCard,
4573
5260
  {
4574
- style: {
4575
- margin: "0 0 8px",
4576
- fontSize: "15px",
4577
- fontWeight: 600,
4578
- color: emailTokens.foreground
4579
- },
4580
- children: adv.name
5261
+ tag: adv.tag,
5262
+ name: adv.name,
5263
+ startDate: (_a2 = adv.startDate) != null ? _a2 : "",
5264
+ endDate: adv.endDate,
5265
+ travellerCount: adv.travellerCount,
5266
+ travellers: adv.travellers,
5267
+ itinerary: adv.itinerary,
5268
+ lineItems: adv.lineItems.map((li) => ({
5269
+ unitPrice: li.unitPrice,
5270
+ quantity: li.quantity,
5271
+ categoryLabel: li.categoryLabel,
5272
+ subtotal: li.subtotal
5273
+ })),
5274
+ subtotal: adv.subtotal,
5275
+ labels: l.adventureCard
4581
5276
  }
4582
- ),
4583
- adv.lineItems.map((li, liIdx) => /* @__PURE__ */ jsxs("p", { style: summaryRowStyle, children: [
4584
- li.unitPrice,
4585
- " \xD7 ",
4586
- li.quantity,
4587
- " ",
4588
- li.categoryLabel,
4589
- " =",
4590
- " ",
4591
- /* @__PURE__ */ jsx("strong", { children: li.subtotal })
4592
- ] }, liIdx))
4593
- ]
4594
- },
4595
- advIdx
4596
- )),
4597
- /* @__PURE__ */ jsx(
4598
- "hr",
5277
+ )
5278
+ },
5279
+ advIdx
5280
+ );
5281
+ }),
5282
+ /* @__PURE__ */ jsx("div", { style: { marginTop: "8px", marginBottom: "24px" }, children: /* @__PURE__ */ jsx(
5283
+ PaymentDetailsBlock,
4599
5284
  {
4600
- style: {
4601
- border: "none",
4602
- borderTop: `1px solid ${emailTokens.border}`,
4603
- marginBottom: "16px"
4604
- }
5285
+ labels: { heading: l.paymentDetailsHeading },
5286
+ rows: [
5287
+ { label: l.amountAlreadyPaidLabel, value: amountAlreadyPaid },
5288
+ {
5289
+ label: l.remainingBalanceDueLabel,
5290
+ value: remainingBalanceDue,
5291
+ emphasis: true
5292
+ },
5293
+ { label: l.totalBookingAmountLabel, value: totalBookingAmount }
5294
+ ]
4605
5295
  }
4606
- ),
4607
- /* @__PURE__ */ jsxs("p", { style: summaryRowStyle, children: [
4608
- /* @__PURE__ */ jsxs("strong", { children: [
4609
- l.amountAlreadyPaidLabel,
4610
- ":"
4611
- ] }),
4612
- " ",
4613
- amountAlreadyPaid
4614
- ] }),
4615
- /* @__PURE__ */ jsxs("p", { style: summaryRowStyle, children: [
4616
- /* @__PURE__ */ jsxs("strong", { children: [
4617
- l.remainingBalanceDueLabel,
4618
- ":"
4619
- ] }),
4620
- " ",
4621
- remainingBalanceDue
4622
- ] }),
4623
- /* @__PURE__ */ jsxs("p", { style: __spreadProps(__spreadValues({}, summaryRowStyle), { marginBottom: "24px" }), children: [
4624
- /* @__PURE__ */ jsxs("strong", { children: [
4625
- l.totalBookingAmountLabel,
4626
- ":"
4627
- ] }),
4628
- " ",
4629
- totalBookingAmount
4630
- ] }),
5296
+ ) }),
4631
5297
  showDisregard && /* @__PURE__ */ jsx(
4632
5298
  "p",
4633
5299
  {
@@ -4640,8 +5306,7 @@ function PaymentReminderEmail({
4640
5306
  children: variantLabels.disregardIfPaid
4641
5307
  }
4642
5308
  ),
4643
- showClosingAlternative && /* @__PURE__ */ jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: closingAlternativeText }),
4644
- /* @__PURE__ */ jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: closingMain }),
5309
+ /* @__PURE__ */ jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: closingMainNode }),
4645
5310
  /* @__PURE__ */ jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: variantLabels.closingThanks }),
4646
5311
  /* @__PURE__ */ jsx("p", { style: { marginTop: 0, marginBottom: 0, fontSize: "14px", color: emailTokens.bodyText }, children: l.teamSignature })
4647
5312
  ]
@@ -5328,7 +5993,7 @@ function BookingForm({
5328
5993
  }
5329
5994
  );
5330
5995
  }
5331
- var DEFAULT_LABELS5 = {
5996
+ var DEFAULT_LABELS7 = {
5332
5997
  formSubtitle: "To confirm your participation, please complete this short form. It's required for all travellers and helps us coordinate logistics with our local partners and tailor the experience to you.",
5333
5998
  detailsSectionTitle: "Your details",
5334
5999
  tripInfoSectionTitle: "Trip info",
@@ -5993,7 +6658,7 @@ function RegistrationForm({
5993
6658
  }) {
5994
6659
  var _a;
5995
6660
  const L = React25.useMemo(
5996
- () => __spreadValues(__spreadValues({}, DEFAULT_LABELS5), labels != null ? labels : {}),
6661
+ () => __spreadValues(__spreadValues({}, DEFAULT_LABELS7), labels != null ? labels : {}),
5997
6662
  [labels]
5998
6663
  );
5999
6664
  const sortedFields = React25.useMemo(
@@ -10591,6 +11256,6 @@ function LeadCapturePopup({
10591
11256
  );
10592
11257
  }
10593
11258
 
10594
- export { ActivityCard, AgentContactCard, Alert, BirthDateField, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, ItineraryDay, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PaymentReceiptEmail, PaymentReminderEmail, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TransferDetailsBlock, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, TrustpilotEmbed, buttonVariants, cn, emailTokens, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, wrapEmailHtml };
11259
+ export { ActivityCard, AgentContactCard, Alert, BirthDateField, BookingAdventureCard, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, ItineraryDay, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentDetailsBlock, PaymentMethodSelector, PaymentModalShell, PaymentReceiptEmail, PaymentReminderEmail, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TransferDetailsBlock, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, TrustpilotEmbed, buttonVariants, cn, emailTokens, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, wrapEmailHtml };
10595
11260
  //# sourceMappingURL=index.js.map
10596
11261
  //# sourceMappingURL=index.js.map