@ticketboothapp/booking 0.1.23 → 1.2.24

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 (158) hide show
  1. package/package.json +2 -29
  2. package/src/index.ts +0 -79
  3. package/tsconfig.json +2 -8
  4. package/src/assets/icons/minus.svg +0 -7
  5. package/src/assets/icons/partner-logos/getyourguide.svg +0 -8
  6. package/src/assets/icons/plus.svg +0 -3
  7. package/src/colours.css +0 -23
  8. package/src/components/BookingDetails.module.css +0 -1591
  9. package/src/components/BookingDetails.tsx +0 -2264
  10. package/src/components/BookingWidget.tsx +0 -302
  11. package/src/components/ManageBookingView.tsx +0 -437
  12. package/src/components/PhoneInputWithCountry.module.css +0 -131
  13. package/src/components/PhoneInputWithCountry.tsx +0 -44
  14. package/src/components/PickupLocationDialog.module.css +0 -360
  15. package/src/components/PickupLocationDialog.tsx +0 -357
  16. package/src/components/PostBookingDependentAddOnUpsell.module.css +0 -174
  17. package/src/components/PostBookingDependentAddOnUpsell.tsx +0 -407
  18. package/src/components/booking/AddOnsSection.module.css +0 -10
  19. package/src/components/booking/AddOnsSection.tsx +0 -184
  20. package/src/components/booking/AdminPaymentChoiceModal.tsx +0 -98
  21. package/src/components/booking/BookingDialog.module.css +0 -643
  22. package/src/components/booking/BookingDialog.tsx +0 -356
  23. package/src/components/booking/BookingFlow.tsx +0 -4385
  24. package/src/components/booking/BookingFlowCollage.module.css +0 -148
  25. package/src/components/booking/BookingFlowCollage.tsx +0 -184
  26. package/src/components/booking/BookingFlowPlaceholder.module.css +0 -27
  27. package/src/components/booking/BookingFlowPlaceholder.tsx +0 -25
  28. package/src/components/booking/BookingFlowPreview.tsx +0 -51
  29. package/src/components/booking/BookingProductGrid.module.css +0 -359
  30. package/src/components/booking/BookingProductGrid.tsx +0 -497
  31. package/src/components/booking/Calendar.module.css +0 -616
  32. package/src/components/booking/Calendar.tsx +0 -1123
  33. package/src/components/booking/CancellationPolicySelector.module.css +0 -124
  34. package/src/components/booking/CancellationPolicySelector.tsx +0 -142
  35. package/src/components/booking/ChangeBookingDialog.tsx +0 -562
  36. package/src/components/booking/CheckoutForm.module.css +0 -244
  37. package/src/components/booking/CheckoutForm.tsx +0 -364
  38. package/src/components/booking/CheckoutModal.tsx +0 -451
  39. package/src/components/booking/CurrencySwitcher.tsx +0 -81
  40. package/src/components/booking/DapFlowCollage.tsx +0 -88
  41. package/src/components/booking/DapTourDescription.tsx +0 -35
  42. package/src/components/booking/DependentAddOnBookingDialog.tsx +0 -1350
  43. package/src/components/booking/DependentAddOnPaymentForm.tsx +0 -124
  44. package/src/components/booking/ErrorBoundary.tsx +0 -63
  45. package/src/components/booking/InfoTooltip.tsx +0 -108
  46. package/src/components/booking/ItineraryBox.module.css +0 -258
  47. package/src/components/booking/ItineraryBox.tsx +0 -550
  48. package/src/components/booking/ItineraryBuilder.tsx +0 -82
  49. package/src/components/booking/ItineraryPlaceholder.module.css +0 -45
  50. package/src/components/booking/ItineraryPlaceholder.tsx +0 -26
  51. package/src/components/booking/MealDrinkAddOnSelector.tsx +0 -338
  52. package/src/components/booking/PickupLocationSelector.module.css +0 -124
  53. package/src/components/booking/PickupLocationSelector.tsx +0 -1566
  54. package/src/components/booking/PickupTimeSelector.module.css +0 -134
  55. package/src/components/booking/PickupTimeSelector.tsx +0 -112
  56. package/src/components/booking/PriceBreakdown.tsx +0 -154
  57. package/src/components/booking/PriceSummary.tsx +0 -234
  58. package/src/components/booking/PrivateShuttleBookingFlow.module.css +0 -357
  59. package/src/components/booking/PrivateShuttleBookingFlow.tsx +0 -2662
  60. package/src/components/booking/PromoCodeInput.module.css +0 -166
  61. package/src/components/booking/PromoCodeInput.tsx +0 -99
  62. package/src/components/booking/ReturnTimeSelector.module.css +0 -173
  63. package/src/components/booking/ReturnTimeSelector.tsx +0 -145
  64. package/src/components/booking/TermsAcceptance.tsx +0 -111
  65. package/src/components/booking/TicketSelector.module.css +0 -164
  66. package/src/components/booking/TicketSelector.tsx +0 -199
  67. package/src/components/booking/TourDescription.module.css +0 -304
  68. package/src/components/booking/TourDescription.tsx +0 -273
  69. package/src/components/booking/booking-flow-ui.ts +0 -38
  70. package/src/components/booking/booking-flow.css +0 -944
  71. package/src/components/button.css +0 -245
  72. package/src/components/button.tsx +0 -152
  73. package/src/components/colorable-svg.tsx +0 -29
  74. package/src/components/image.css +0 -29
  75. package/src/components/image.tsx +0 -113
  76. package/src/components/partner/PartnerBookingPage.module.css +0 -130
  77. package/src/components/partner/PartnerBookingPage.tsx +0 -390
  78. package/src/components/partner/PartnerBookingPageWithBrowserMetadata.tsx +0 -45
  79. package/src/components/product-tag.module.css +0 -30
  80. package/src/components/product-tag.tsx +0 -34
  81. package/src/components/product-theme-pages/image-modal.tsx +0 -248
  82. package/src/components/product-theme-pages/photo-gallery.module.css +0 -200
  83. package/src/components/terms/TermsContent.tsx +0 -178
  84. package/src/components/value-pill.module.css +0 -59
  85. package/src/components/value-pill.tsx +0 -46
  86. package/src/constants/images.ts +0 -556
  87. package/src/constants/pill-values.ts +0 -210
  88. package/src/constants/products.ts +0 -155
  89. package/src/contexts/AvailabilitiesCacheContext.tsx +0 -125
  90. package/src/contexts/BookingAppContext.tsx +0 -134
  91. package/src/contexts/CompanyContext.tsx +0 -70
  92. package/src/data/dap-descriptions/session-couples-families-friends.en.json +0 -61
  93. package/src/data/dap-descriptions/session-elopements.en.json +0 -60
  94. package/src/data/dap-descriptions/session-proposals.en.json +0 -60
  95. package/src/data/product-descriptions/afternoon-delight.en.json +0 -35
  96. package/src/data/product-descriptions/emerald-lake-escape.en.json +0 -68
  97. package/src/data/product-descriptions/lake-louise-adventure.en.json +0 -74
  98. package/src/data/product-descriptions/moraine-lake-adventure.en.json +0 -78
  99. package/src/data/product-descriptions/moraine-lake-sunrise-lake-louise-golden-hour.en.json +0 -65
  100. package/src/data/product-descriptions/moraine-lake-sunrise.en.json +0 -64
  101. package/src/data/product-descriptions/private-tour.en.json +0 -80
  102. package/src/data/product-descriptions/two-lakes-combo.en.json +0 -65
  103. package/src/data/products-config.json +0 -101
  104. package/src/hooks/useBookingSourceMetadataFromLocation.ts +0 -21
  105. package/src/hooks/useIsBookingLaunchLive.ts +0 -49
  106. package/src/lib/analytics.ts +0 -197
  107. package/src/lib/booking/booking-source.ts +0 -51
  108. package/src/lib/booking/checkout-breakdown.ts +0 -69
  109. package/src/lib/booking/correlation-id.ts +0 -46
  110. package/src/lib/booking/i18n/config.ts +0 -21
  111. package/src/lib/booking/i18n/index.tsx +0 -144
  112. package/src/lib/booking/i18n/messages/en.json +0 -236
  113. package/src/lib/booking/i18n/messages/fr.json +0 -236
  114. package/src/lib/booking/itinerary-display.ts +0 -36
  115. package/src/lib/booking/itinerary-labels.ts +0 -70
  116. package/src/lib/booking/location-calculations.ts +0 -43
  117. package/src/lib/booking/location-utils.ts +0 -165
  118. package/src/lib/booking/map-utils.ts +0 -153
  119. package/src/lib/booking/marker-icons.ts +0 -113
  120. package/src/lib/booking/normalize-booking-product-id.ts +0 -21
  121. package/src/lib/booking/pickup-location-types.ts +0 -25
  122. package/src/lib/booking/places-api.ts +0 -154
  123. package/src/lib/booking/pricing.ts +0 -466
  124. package/src/lib/booking/product-option-id.ts +0 -35
  125. package/src/lib/booking/source-metadata.ts +0 -226
  126. package/src/lib/booking/sunday-week.ts +0 -14
  127. package/src/lib/booking/theme.ts +0 -83
  128. package/src/lib/booking/trace-context.ts +0 -62
  129. package/src/lib/booking/utils.ts +0 -9
  130. package/src/lib/booking-api.ts +0 -1793
  131. package/src/lib/booking-constants.ts +0 -23
  132. package/src/lib/booking-ref.ts +0 -13
  133. package/src/lib/booking-types.ts +0 -36
  134. package/src/lib/currency.ts +0 -81
  135. package/src/lib/dap-descriptions.ts +0 -50
  136. package/src/lib/dap-itinerary-preview.ts +0 -315
  137. package/src/lib/dependent-add-on-api.ts +0 -434
  138. package/src/lib/env.ts +0 -96
  139. package/src/lib/firebase.ts +0 -20
  140. package/src/lib/job-application-api.ts +0 -83
  141. package/src/lib/manage-booking-embed-print.ts +0 -16
  142. package/src/lib/manage-booking-post-checkout.ts +0 -68
  143. package/src/lib/photo-dap-config.ts +0 -228
  144. package/src/lib/photo-packages.ts +0 -75
  145. package/src/lib/pickup/map-utils.ts +0 -56
  146. package/src/lib/pickup/marker-icons.ts +0 -19
  147. package/src/lib/product-descriptions.ts +0 -66
  148. package/src/lib/products-config.ts +0 -73
  149. package/src/providers/booking-dialog-provider.tsx +0 -282
  150. package/src/providers/dependent-add-on-dialog-provider.tsx +0 -105
  151. package/src/radius.css +0 -5
  152. package/src/spacing.css +0 -7
  153. package/src/strings/en.json +0 -1774
  154. package/src/strings/es.json +0 -1573
  155. package/src/strings/fr.json +0 -1573
  156. package/src/strings/index.js +0 -23
  157. package/src/text-style.css +0 -56
  158. package/src/utils/currency-converter.ts +0 -101
@@ -1,244 +0,0 @@
1
- /**
2
- * Checkout form - contact info, pickup location, terms, submit
3
- */
4
-
5
- .section {
6
- border-top: 1px solid var(--booking-stone-200, #e7e5e4);
7
- padding-top: 0.5rem;
8
- margin-top: -1rem;
9
- }
10
-
11
- .summaryWrapper {
12
- margin-bottom: 1rem;
13
- }
14
-
15
- .contactSection {
16
- margin-top: 1.5rem;
17
- display: flex;
18
- flex-direction: column;
19
- gap: 1rem;
20
- }
21
-
22
- .contactGrid {
23
- display: grid;
24
- grid-template-columns: 1fr;
25
- gap: 1rem;
26
- }
27
-
28
- @media (min-width: 640px) {
29
- .contactGrid {
30
- grid-template-columns: repeat(2, 1fr);
31
- }
32
- }
33
-
34
- .label {
35
- display: block;
36
- font-size: 0.875rem;
37
- font-weight: 500;
38
- color: var(--booking-stone-700, #44403c);
39
- margin-bottom: 0.5rem;
40
- }
41
-
42
- .required {
43
- color: #b91c1c;
44
- }
45
-
46
- .input {
47
- width: 100%;
48
- padding: 0.875rem 1.25rem;
49
- border-radius: 0.5rem;
50
- border: 1px solid var(--booking-stone-300, #d6d3d1);
51
- font-size: 1rem;
52
- color: var(--booking-stone-900, #1c1917);
53
- }
54
-
55
- .input:focus {
56
- outline: none;
57
- border-color: var(--booking-stone-500, #78716c);
58
- }
59
-
60
- .inputError {
61
- font-size: 0.75rem;
62
- color: #b91c1c;
63
- margin-top: 0.375rem;
64
- }
65
-
66
- .contactStaticValue {
67
- margin: 0;
68
- font-size: 1rem;
69
- line-height: 1.4;
70
- color: var(--booking-stone-900, #1c1917);
71
- font-weight: 500;
72
- }
73
-
74
- .pickupSection {
75
- border-top: 1px solid var(--booking-stone-200, #e7e5e4);
76
- padding-top: 1.5rem;
77
- margin-top: 1.5rem;
78
- }
79
-
80
- .pickupHeader {
81
- display: flex;
82
- align-items: center;
83
- justify-content: space-between;
84
- }
85
-
86
- .pickupLabel {
87
- display: block;
88
- font-size: 0.875rem;
89
- font-weight: 500;
90
- color: var(--booking-stone-700, #44403c);
91
- margin-bottom: 0.25rem;
92
- }
93
-
94
- .pickupName {
95
- font-size: 0.875rem;
96
- color: var(--booking-stone-900, #1c1917);
97
- }
98
-
99
- .pickupAddress {
100
- font-size: 0.75rem;
101
- color: var(--booking-stone-500, #78716c);
102
- }
103
-
104
- .pickupNotes {
105
- font-size: 0.75rem;
106
- color: #b45309;
107
- background: #fffbeb;
108
- border: 1px solid #fde68a;
109
- border-radius: 0.25rem;
110
- padding: 0.5rem;
111
- margin-top: 0.5rem;
112
- }
113
-
114
- .changeBtn {
115
- font-size: 0.875rem;
116
- color: var(--booking-emerald-600, #059669);
117
- text-decoration: underline;
118
- background: none;
119
- border: none;
120
- cursor: pointer;
121
- }
122
-
123
- .changeBtn:hover {
124
- color: var(--booking-emerald-700, #047857);
125
- }
126
-
127
- .errorBox {
128
- padding: 1rem;
129
- background: #fef2f2;
130
- border: 1px solid #fecaca;
131
- border-radius: 0.5rem;
132
- color: #b91c1c;
133
- margin-top: 1rem;
134
- }
135
-
136
- .adminSection {
137
- margin-top: 1rem;
138
- padding: 1rem;
139
- background: rgba(254, 243, 199, 0.5);
140
- border: 1px solid #fde68a;
141
- border-radius: 0.5rem;
142
- display: flex;
143
- flex-direction: column;
144
- gap: 0.75rem;
145
- }
146
-
147
- .adminTitle {
148
- font-size: 0.875rem;
149
- font-weight: 500;
150
- color: var(--booking-stone-700, #44403c);
151
- }
152
-
153
- .adminCheckbox {
154
- display: flex;
155
- align-items: flex-start;
156
- gap: 0.5rem;
157
- cursor: pointer;
158
- }
159
-
160
- .adminCheckbox input {
161
- margin-top: 0.25rem;
162
- height: 1rem;
163
- width: 1rem;
164
- border-radius: 0.25rem;
165
- border: 1px solid var(--booking-stone-300, #d6d3d1);
166
- }
167
-
168
- .adminCheckbox span {
169
- font-size: 0.875rem;
170
- color: var(--booking-stone-600, #57534e);
171
- }
172
-
173
- .termsSection {
174
- margin-top: 1rem;
175
- padding: 1rem;
176
- background: var(--booking-stone-50, #fafaf9);
177
- border-radius: 0.5rem;
178
- border: 1px solid var(--booking-stone-200, #e7e5e4);
179
- }
180
-
181
- .attributionConfirmSection {
182
- margin-top: 0.75rem;
183
- padding: 0.85rem 0.95rem;
184
- border: 1px solid #bfdbfe;
185
- background: #eff6ff;
186
- border-radius: 0.5rem;
187
- }
188
-
189
- .attributionSummaryText {
190
- margin: 0;
191
- font-size: 0.875rem;
192
- line-height: 1.4;
193
- color: #1e3a8a;
194
- }
195
-
196
- .attributionConfirmLabel {
197
- margin-top: 0.55rem;
198
- display: flex;
199
- gap: 0.5rem;
200
- align-items: flex-start;
201
- cursor: pointer;
202
- }
203
-
204
- .attributionConfirmLabel input {
205
- margin-top: 0.2rem;
206
- }
207
-
208
- .attributionConfirmLabel span {
209
- font-size: 0.8125rem;
210
- line-height: 1.35;
211
- color: #1e40af;
212
- font-weight: 500;
213
- }
214
-
215
- .submitBtnWrapper {
216
- display: flex;
217
- justify-content: center;
218
- margin-top: 1rem;
219
- }
220
-
221
- /* Higher specificity to override .booking-flow-preflight button reset */
222
- .section .submitBtn {
223
- padding: 1rem 1.5rem;
224
- min-height: 3.25rem;
225
- background: var(--booking-emerald-600, #059669);
226
- color: #fff;
227
- font-weight: 600;
228
- border-radius: 0.5rem;
229
- border: none;
230
- cursor: pointer;
231
- transition: all 0.2s;
232
- }
233
-
234
- .section .submitBtn:disabled {
235
- opacity: 0.5;
236
- cursor: not-allowed;
237
- }
238
-
239
- .secureNote {
240
- text-align: center;
241
- font-size: 0.875rem;
242
- color: var(--booking-stone-500, #78716c);
243
- margin-top: 1rem;
244
- }
@@ -1,364 +0,0 @@
1
- 'use client';
2
-
3
- import { PriceSummary, type PriceSummaryLine } from './PriceSummary';
4
- import { TermsAcceptance } from './TermsAcceptance';
5
- import { PickupLocationSelector } from './PickupLocationSelector';
6
- import type { Currency } from './CurrencySwitcher';
7
- import type { PickupLocation, Destination } from '@/lib/booking-api';
8
- import styles from './CheckoutForm.module.css';
9
- import Button, { ButtonHoverColor } from '@/components/button';
10
- import { AnimatePresence, motion } from 'framer-motion';
11
-
12
- type TranslationFn = (key: string, params?: Record<string, string>) => string;
13
-
14
- interface CheckoutFormProps {
15
- // Price summary
16
- priceSummaryLines: PriceSummaryLine[];
17
- totalPrice: number;
18
- subtotal?: number;
19
- taxAmount: number;
20
- taxRate?: number;
21
- currency: Currency;
22
- locale: string;
23
- t: TranslationFn;
24
- extraBetweenTaxAndTotal: React.ReactNode;
25
- /** Overrides PriceSummary final row label (e.g. change booking) */
26
- totalSummaryLabel?: string;
27
- // Promo (passed as extraBetweenTaxAndTotal content - we'll keep it in parent for now)
28
- // Contact info
29
- firstName: string;
30
- lastName: string;
31
- email: string;
32
- onFirstNameChange: (value: string) => void;
33
- onLastNameChange: (value: string) => void;
34
- onEmailChange: (value: string) => void;
35
- readOnlyContactFields?: boolean;
36
- // Pickup location
37
- pickupLocations?: PickupLocation[];
38
- destinations?: Destination[];
39
- pickupLocationId: string | null;
40
- pickupLocationSkipped: boolean;
41
- selectedPickupLocation: PickupLocation | null | undefined;
42
- highlightedPickupLocationIds?: string[];
43
- onLocationSelect: (locationId: string | null, customLocation?: unknown) => void;
44
- onSkip: () => void;
45
- onChangePickup: () => void;
46
- // Terms
47
- termsAccepted: boolean;
48
- onTermsChange: (checked: boolean) => void;
49
- // Admin
50
- isAdmin: boolean;
51
- skipConfirmationCommunications: boolean;
52
- disableAutoCommunications: boolean;
53
- onSkipConfirmationChange: (checked: boolean) => void;
54
- onDisableCommunicationsChange: (checked: boolean) => void;
55
- // Error & submit
56
- error: string;
57
- loading: boolean;
58
- totalQuantity: number;
59
- onCheckout: () => void;
60
- submitLabel?: string;
61
- hideSubmitButton?: boolean;
62
- /** Extra disabled state (e.g. change-booking quote still loading) without showing reservation spinner */
63
- submitDisabled?: boolean;
64
- attributionSummary?: string;
65
- attributionConfirmLabel?: string;
66
- attributionConfirmed?: boolean;
67
- onAttributionConfirmedChange?: (checked: boolean) => void;
68
- }
69
-
70
- export function CheckoutForm({
71
- priceSummaryLines,
72
- totalPrice,
73
- subtotal,
74
- taxAmount,
75
- taxRate,
76
- currency,
77
- locale,
78
- t,
79
- extraBetweenTaxAndTotal,
80
- totalSummaryLabel,
81
- firstName,
82
- lastName,
83
- email,
84
- onFirstNameChange,
85
- onLastNameChange,
86
- onEmailChange,
87
- readOnlyContactFields = false,
88
- pickupLocations,
89
- destinations = [],
90
- pickupLocationId,
91
- pickupLocationSkipped,
92
- selectedPickupLocation,
93
- highlightedPickupLocationIds,
94
- onLocationSelect,
95
- onSkip,
96
- onChangePickup,
97
- termsAccepted,
98
- onTermsChange,
99
- isAdmin,
100
- skipConfirmationCommunications,
101
- disableAutoCommunications,
102
- onSkipConfirmationChange,
103
- onDisableCommunicationsChange,
104
- error,
105
- loading,
106
- totalQuantity,
107
- onCheckout,
108
- submitLabel,
109
- hideSubmitButton = false,
110
- submitDisabled = false,
111
- attributionSummary,
112
- attributionConfirmLabel,
113
- attributionConfirmed = false,
114
- onAttributionConfirmedChange,
115
- }: CheckoutFormProps) {
116
- return (
117
- <div className={styles.section}>
118
- <div className={styles.summaryWrapper}>
119
- <PriceSummary
120
- lines={priceSummaryLines}
121
- total={totalPrice}
122
- currency={currency}
123
- locale={locale as 'en' | 'fr'}
124
- subtotal={subtotal}
125
- taxAmount={taxAmount}
126
- taxRate={taxRate}
127
- size="sm"
128
- t={t}
129
- extraBetweenTaxAndTotal={extraBetweenTaxAndTotal}
130
- totalLabel={totalSummaryLabel}
131
- />
132
- </div>
133
-
134
- {/* Contact info */}
135
- <div className={styles.contactSection}>
136
- {readOnlyContactFields ? (
137
- <>
138
- <div className={styles.contactGrid}>
139
- <div>
140
- <p className={styles.label}>
141
- {t('booking.firstName') || 'First Name'}
142
- </p>
143
- <p className={styles.contactStaticValue}>{firstName || '—'}</p>
144
- </div>
145
- <div>
146
- <p className={styles.label}>
147
- {t('booking.lastName') || 'Last Name'}
148
- </p>
149
- <p className={styles.contactStaticValue}>{lastName || '—'}</p>
150
- </div>
151
- </div>
152
- <div>
153
- <p className={styles.label}>{t('booking.emailForConfirmation')}</p>
154
- <p className={styles.contactStaticValue}>{email || '—'}</p>
155
- </div>
156
- </>
157
- ) : (
158
- <>
159
- <div className={styles.contactGrid}>
160
- <div>
161
- <label className={styles.label} htmlFor="booking-firstName">
162
- {t('booking.firstName') || 'First Name'} <span className={styles.required}>*</span>
163
- </label>
164
- <input
165
- type="text"
166
- name="firstName"
167
- id="booking-firstName"
168
- value={firstName}
169
- onChange={(e) => onFirstNameChange(e.target.value)}
170
- placeholder={t('booking.firstNamePlaceholder') || 'Jane'}
171
- autoComplete="given-name"
172
- required
173
- className={styles.input}
174
- />
175
- </div>
176
- <div>
177
- <label className={styles.label} htmlFor="booking-lastName">
178
- {t('booking.lastName') || 'Last Name'} <span className={styles.required}>*</span>
179
- </label>
180
- <input
181
- type="text"
182
- name="lastName"
183
- id="booking-lastName"
184
- value={lastName}
185
- onChange={(e) => onLastNameChange(e.target.value)}
186
- placeholder={t('booking.lastNamePlaceholder') || 'Smith'}
187
- autoComplete="family-name"
188
- required
189
- className={styles.input}
190
- />
191
- </div>
192
- </div>
193
- <div>
194
- <label className={styles.label} htmlFor="booking-email">
195
- {t('booking.emailForConfirmation')} <span className={styles.required}>*</span>
196
- </label>
197
- <input
198
- type="email"
199
- name="email"
200
- id="booking-email"
201
- value={email}
202
- onChange={(e) => onEmailChange(e.target.value)}
203
- placeholder={t('common.emailPlaceholder')}
204
- autoComplete="email"
205
- required
206
- className={styles.input}
207
- />
208
- {email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) && (
209
- <p className={styles.inputError}>{t('booking.invalidEmail') || 'Please enter a valid email address'}</p>
210
- )}
211
- </div>
212
- </>
213
- )}
214
- </div>
215
-
216
- {/* Pickup location */}
217
- {pickupLocations && pickupLocations.length > 0 && (
218
- <div id="pickup-location-section" className={styles.pickupSection}>
219
- <AnimatePresence mode="wait" initial={false}>
220
- {pickupLocationId || pickupLocationSkipped ? (
221
- <motion.div
222
- key="collapsed"
223
- initial={{ opacity: 0, y: -8 }}
224
- animate={{ opacity: 1, y: 0 }}
225
- exit={{ opacity: 0, y: -8 }}
226
- transition={{ duration: 0.4, ease: [0.25, 0.46, 0.45, 0.94] }}
227
- className={styles.pickupCollapsedWrapper}
228
- >
229
- <div className={styles.pickupHeader}>
230
- <div>
231
- <label className={styles.pickupLabel}>
232
- {t('pickup.pickupLocation')}
233
- </label>
234
- {pickupLocationSkipped ? (
235
- <p className={styles.pickupName}>
236
- {t('booking.pickupLocationUnknown')}
237
- </p>
238
- ) : (
239
- <>
240
- <p className={styles.pickupName}>
241
- {selectedPickupLocation?.name}
242
- </p>
243
- <p className={styles.pickupAddress}>
244
- {selectedPickupLocation?.address}
245
- </p>
246
- {selectedPickupLocation?.notes && (
247
- <p className={styles.pickupNotes}>
248
- {selectedPickupLocation.notes}
249
- </p>
250
- )}
251
- </>
252
- )}
253
- </div>
254
- <button
255
- onClick={onChangePickup}
256
- className={styles.changeBtn}
257
- >
258
- {t('common.change')}
259
- </button>
260
- </div>
261
- </motion.div>
262
- ) : (
263
- <motion.div
264
- key="expanded"
265
- initial={{ opacity: 0, y: -8 }}
266
- animate={{ opacity: 1, y: 0 }}
267
- exit={{ opacity: 0, y: -8 }}
268
- transition={{ duration: 0.4, ease: [0.25, 0.46, 0.45, 0.94] }}
269
- className={styles.pickupExpandedWrapper}
270
- >
271
- <PickupLocationSelector
272
- pickupLocations={pickupLocations}
273
- selectedLocationId={pickupLocationId}
274
- isSkipped={pickupLocationSkipped}
275
- destinations={destinations}
276
- highlightedPickupLocationIds={highlightedPickupLocationIds}
277
- onLocationSelect={onLocationSelect}
278
- onSkip={onSkip}
279
- />
280
- </motion.div>
281
- )}
282
- </AnimatePresence>
283
- </div>
284
- )}
285
-
286
- {/* Admin: communication options */}
287
- {isAdmin && (
288
- <div className={styles.adminSection}>
289
- <p className={styles.adminTitle}>Communications (admin)</p>
290
- <label className={styles.adminCheckbox}>
291
- <input
292
- type="checkbox"
293
- checked={skipConfirmationCommunications}
294
- onChange={(e) => onSkipConfirmationChange(e.target.checked)}
295
- />
296
- <span>Don&apos;t send confirmation email/SMS/WhatsApp for this booking (you can send manually later). Cancellation and reminder emails still send.</span>
297
- </label>
298
- <label className={styles.adminCheckbox}>
299
- <input
300
- type="checkbox"
301
- checked={disableAutoCommunications}
302
- onChange={(e) => onDisableCommunicationsChange(e.target.checked)}
303
- />
304
- <span>Disable all auto communications for this booking (no confirmation, cancellation, or reminders). Can be changed later on the booking.</span>
305
- </label>
306
- </div>
307
- )}
308
-
309
- {/* Terms & Conditions */}
310
- <div className={styles.termsSection}>
311
- <TermsAcceptance
312
- checked={termsAccepted}
313
- onChange={onTermsChange}
314
- t={t}
315
- />
316
- </div>
317
-
318
- {attributionSummary ? (
319
- <div className={styles.attributionConfirmSection}>
320
- <p className={styles.attributionSummaryText}>{attributionSummary}</p>
321
- {attributionConfirmLabel ? (
322
- <label className={styles.attributionConfirmLabel}>
323
- <input
324
- type="checkbox"
325
- checked={attributionConfirmed}
326
- onChange={(e) => onAttributionConfirmedChange?.(e.target.checked)}
327
- />
328
- <span>{attributionConfirmLabel}</span>
329
- </label>
330
- ) : null}
331
- </div>
332
- ) : null}
333
-
334
- {/* Error Message */}
335
- {error && (
336
- <div className={styles.errorBox}>
337
- {error}
338
- </div>
339
- )}
340
-
341
- {!hideSubmitButton && (
342
- <div className={styles.submitBtnWrapper}>
343
- <Button
344
- onClick={onCheckout}
345
- isLarge={true}
346
- hoverColor={ButtonHoverColor.Turquoise}
347
- disabled={
348
- loading ||
349
- submitDisabled ||
350
- !termsAccepted ||
351
- Boolean(attributionConfirmLabel && !attributionConfirmed)
352
- }
353
- className={styles.submitBtn}
354
- >
355
- {loading ? t('booking.creatingReservation') : (submitLabel || t('booking.continueToPayment'))}
356
- </Button>
357
- </div>
358
- )}
359
- <p className={styles.secureNote}>
360
- {t('booking.securePayment')}
361
- </p>
362
- </div>
363
- );
364
- }