@qite/tide-booking-component 1.4.85 → 1.4.86

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 (29) hide show
  1. package/build/build-cjs/index.js +566 -286
  2. package/build/build-cjs/src/qsm/components/item-picker/index.d.ts +4 -4
  3. package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +5 -5
  4. package/build/build-cjs/src/qsm/types.d.ts +4 -9
  5. package/build/build-cjs/src/search-results/components/item-picker/index.d.ts +2 -2
  6. package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +5 -0
  7. package/build/build-cjs/src/shared/types.d.ts +2 -7
  8. package/build/build-esm/index.js +566 -286
  9. package/build/build-esm/src/qsm/components/item-picker/index.d.ts +4 -4
  10. package/build/build-esm/src/qsm/store/qsm-slice.d.ts +5 -5
  11. package/build/build-esm/src/qsm/types.d.ts +4 -9
  12. package/build/build-esm/src/search-results/components/item-picker/index.d.ts +2 -2
  13. package/build/build-esm/src/search-results/store/search-results-slice.d.ts +5 -0
  14. package/build/build-esm/src/shared/types.d.ts +2 -7
  15. package/package.json +2 -2
  16. package/src/content/features/content-page/content-page-self-contained.tsx +17 -17
  17. package/src/qsm/components/item-picker/index.tsx +10 -13
  18. package/src/qsm/components/travel-class-picker/index.tsx +3 -2
  19. package/src/qsm/components/travel-nationality-picker/index.tsx +3 -2
  20. package/src/qsm/components/travel-type-picker/index.tsx +3 -2
  21. package/src/qsm/store/qsm-slice.ts +5 -5
  22. package/src/qsm/types.ts +5 -10
  23. package/src/search-results/components/item-picker/index.tsx +2 -2
  24. package/src/search-results/components/search-results-container/flight-search-results.tsx +5 -5
  25. package/src/search-results/components/search-results-container/search-results-container.tsx +96 -4
  26. package/src/search-results/store/search-results-slice.ts +6 -0
  27. package/src/shared/components/flyin/accommodation-flyin.tsx +373 -157
  28. package/src/shared/types.ts +13 -7
  29. package/styles/components/_flyin.scss +187 -158
@@ -1,12 +1,13 @@
1
- import React, { useContext, useState } from 'react';
2
- import Icon from '../icon';
3
- import { useSelector } from 'react-redux';
1
+ import React, { useContext, useMemo } from 'react';
2
+ import { useDispatch, useSelector } from 'react-redux';
4
3
  import ItemPicker from '../../../qsm/components/item-picker';
5
4
  import { SearchResultsRootState } from '../../../search-results/store/search-results-store';
6
- import Spinner from '../../../search-results/components/spinner/spinner';
7
5
  import SearchResultsConfigurationContext from '../../../search-results/search-results-configuration-context';
8
6
  import { getTranslations } from '../../utils/localization-util';
9
- import { TravelClass } from '../../../shared/types';
7
+ import { setPackagingAccoSearchDetails } from '../../../search-results/store/search-results-slice';
8
+ import { PackageMainRoom } from '@qite/tide-client';
9
+ import { PickerItem } from '../../types';
10
+ import { first } from 'lodash';
10
11
 
11
12
  type AccommodationFlyInProps = {
12
13
  isLoading: boolean;
@@ -14,22 +15,108 @@ type AccommodationFlyInProps = {
14
15
  setIsOpen: (open: boolean) => void;
15
16
  };
16
17
 
17
- const travelClasses: TravelClass[] = [
18
- { id: 1, label: 'Standard Room' },
19
- { id: 2, label: 'Deluxe Balcony Room' },
20
- { id: 3, label: 'Superior Room' },
21
- { id: 4, label: 'Family Room' },
22
- { id: 5, label: 'Suite' }
23
- ];
18
+ type PackagingAccommodationResponse = {
19
+ code: string;
20
+ name: string;
21
+ price: number;
22
+ currencyCode: string;
23
+ rooms: PackageMainRoom[];
24
+ };
25
+
26
+ type GroupedAccommodation = {
27
+ accommodationCode: string;
28
+ accommodationName: string;
29
+ regimes: PickerItem[];
30
+ };
31
+
32
+ const formatPrice = (price?: number, currencyCode = 'EUR') => {
33
+ if (typeof price !== 'number') return '';
34
+
35
+ return new Intl.NumberFormat('nl-BE', {
36
+ style: 'currency',
37
+ currency: currencyCode
38
+ }).format(price);
39
+ };
24
40
 
25
41
  const AccommodationFlyIn: React.FC<AccommodationFlyInProps> = ({ isLoading, isOpen, setIsOpen }) => {
42
+ const dispatch = useDispatch();
26
43
  const context = useContext(SearchResultsConfigurationContext);
27
44
  const language = context?.languageCode ?? 'en-GB';
28
45
  const translations = getTranslations(language);
29
46
 
30
- const { selectedSearchResultId } = useSelector((state: SearchResultsRootState) => state.searchResults);
47
+ const { packagingAccoSearchDetails, selectedPackagingAccoResultCode } = useSelector((state: SearchResultsRootState) => state.searchResults);
48
+
49
+ const selectedPackagingAccoSearchDetails = useMemo<PackagingAccommodationResponse | undefined>(() => {
50
+ return packagingAccoSearchDetails?.find((x) => x.code === selectedPackagingAccoResultCode);
51
+ }, [packagingAccoSearchDetails, selectedPackagingAccoResultCode]);
52
+
53
+ const groupedRooms = useMemo(() => {
54
+ if (!selectedPackagingAccoSearchDetails?.rooms) return [];
55
+
56
+ return selectedPackagingAccoSearchDetails.rooms.map((room) => {
57
+ const groupedMap = new Map<string, GroupedAccommodation>();
58
+
59
+ room.options.forEach((option) => {
60
+ const key = option.accommodationCode;
61
+
62
+ if (!groupedMap.has(key)) {
63
+ groupedMap.set(key, {
64
+ accommodationCode: option.accommodationCode,
65
+ accommodationName: option.accommodationName,
66
+ regimes: []
67
+ });
68
+ }
31
69
 
32
- const [selectedTravelClass, setSelectedTravelClass] = useState<string | undefined>('Standard Room');
70
+ groupedMap.get(key)?.regimes.push({
71
+ id: option.guid,
72
+ label: option.regimeName
73
+ });
74
+ });
75
+
76
+ return Array.from(groupedMap.values());
77
+ });
78
+ }, [selectedPackagingAccoSearchDetails]);
79
+
80
+ const getSelectedOptionForRoom = (roomIndex: number) => {
81
+ return selectedPackagingAccoSearchDetails?.rooms?.[roomIndex]?.options?.find((option) => option.isSelected);
82
+ };
83
+
84
+ const getSelectedOptionForAccommodation = (roomIndex: number, accommodationCode: string) => {
85
+ return selectedPackagingAccoSearchDetails?.rooms?.[roomIndex]?.options?.find(
86
+ (option) => option.accommodationCode === accommodationCode && option.isSelected
87
+ );
88
+ };
89
+
90
+ const handlePick = (roomIndex: number, selectedGuid?: string) => {
91
+ if (!packagingAccoSearchDetails || !selectedPackagingAccoSearchDetails) return;
92
+
93
+ const updatedPackagingAccoSearchDetails = packagingAccoSearchDetails.map((product) => {
94
+ if (product.code !== selectedPackagingAccoSearchDetails.code) {
95
+ return product;
96
+ }
97
+
98
+ const updatedRooms = product.rooms.map((room, currentRoomIndex) => {
99
+ if (currentRoomIndex !== roomIndex) {
100
+ return room;
101
+ }
102
+
103
+ return {
104
+ ...room,
105
+ options: room.options.map((option) => ({
106
+ ...option,
107
+ isSelected: option.guid === selectedGuid
108
+ }))
109
+ };
110
+ });
111
+
112
+ return {
113
+ ...product,
114
+ rooms: updatedRooms
115
+ };
116
+ });
117
+
118
+ dispatch(setPackagingAccoSearchDetails(updatedPackagingAccoSearchDetails));
119
+ };
33
120
 
34
121
  const handleConfirm = () => {
35
122
  if (isOpen) {
@@ -37,169 +124,298 @@ const AccommodationFlyIn: React.FC<AccommodationFlyInProps> = ({ isLoading, isOp
37
124
  }
38
125
  };
39
126
 
127
+ if (!selectedPackagingAccoSearchDetails) {
128
+ return null;
129
+ }
130
+
131
+ const calculateTotalPrice = () => {
132
+ const selectedOptions = selectedPackagingAccoSearchDetails.rooms.flatMap((room) => room.options.filter((option) => option.isSelected));
133
+ const totalPrice = selectedOptions.reduce((total, option) => total + (option.price || 0), 0);
134
+ return formatPrice(totalPrice, selectedPackagingAccoSearchDetails.currencyCode);
135
+ };
136
+
137
+ const getPriceDifference = (currentSelectedPrice: number | undefined, roomIndex: number, accommodationCode: string, regimeId?: string) => {
138
+ let targetPrice = 0;
139
+
140
+ const selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodationCode);
141
+
142
+ if (selectedOption?.price) {
143
+ targetPrice = selectedOption.price;
144
+ } else {
145
+ const firstOption = selectedPackagingAccoSearchDetails.rooms[roomIndex].options.find((option) => option.accommodationCode === accommodationCode);
146
+ targetPrice = firstOption?.price || 0;
147
+ }
148
+
149
+ if (regimeId) {
150
+ const regimeOption = selectedPackagingAccoSearchDetails.rooms[roomIndex].options.find((option) => option.guid === regimeId);
151
+ targetPrice = regimeOption?.price || 0;
152
+ }
153
+
154
+ return targetPrice - (currentSelectedPrice || 0);
155
+ };
156
+
157
+ const formatPriceDifference = (difference: number, currencyCode: string) => {
158
+ if (difference === 0) {
159
+ return null;
160
+ }
161
+
162
+ const formattedAbsoluteValue = formatPrice(Math.abs(difference), currencyCode);
163
+ return `${difference > 0 ? '+' : '-'} ${formattedAbsoluteValue}`;
164
+ };
165
+
166
+ const getPriceDifferenceClassName = (difference: number) => {
167
+ if (difference < 0) {
168
+ return 'flyin__acco__price flyin__acco__price--decrease';
169
+ }
170
+
171
+ if (difference > 0) {
172
+ return 'flyin__acco__price flyin__acco__price--increase';
173
+ }
174
+
175
+ return 'flyin__acco__price';
176
+ };
177
+
178
+ const regimeFormatter = (roomIndex: number, accommodation: GroupedAccommodation, regimeId: string, label: string) => {
179
+ const roomOption = getSelectedOptionForRoom(roomIndex);
180
+
181
+ const difference = getPriceDifference(roomOption?.price, roomIndex, accommodation.accommodationCode, regimeId);
182
+
183
+ return `${label} ${difference !== 0 ? `(${formatPriceDifference(difference, selectedPackagingAccoSearchDetails.currencyCode)})` : ''}`;
184
+ };
185
+
40
186
  return (
41
187
  <>
42
188
  <div className="flyin__content">
43
- <div className="flyin__acco">
44
- <div className="flyin__acco__cards">
45
- <div className="flyin__acco__card">
46
- <div className="flyin__acco__img__wrapper">
47
- <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
48
- <div className="flyin__acco__price__wrapper">
49
- <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
50
- <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
51
- </div>
52
- </div>
53
-
54
- <div className="flyin__acco__content">
55
- <div className="flyin__acco__header">
56
- <h4 className="flyin__acco__title">Deluxe Balcony Room</h4>
57
- <div className="flyin__acco__usps">
58
- <div className="flyin__acco__usp">
59
- <Icon name="ui-check" width={16} />
60
- <span className="flyin__acco__usp__text">Sea sight</span>
61
- </div>
62
- <div className="flyin__acco__usp">
63
- <Icon name="ui-check" width={16} />
64
- <span className="flyin__acco__usp__text">Free wifi</span>
65
- </div>
66
- <div className="flyin__acco__usp">
67
- <Icon name="ui-check" width={16} />
68
- <span className="flyin__acco__usp__text">Breakfast included</span>
69
- </div>
70
- <div className="flyin__acco__usp">
71
- <Icon name="ui-check" width={16} />
72
- <span className="flyin__acco__usp__text">Air conditioning</span>
73
- </div>
74
- <div className="flyin__acco__usp">
75
- <Icon name="ui-check" width={16} />
76
- <span className="flyin__acco__usp__text">Private bathroom</span>
77
- </div>
78
- </div>
79
- </div>
80
- </div>
189
+ {groupedRooms.map((roomAccommodations, roomIndex) => {
190
+ const selectedRoomOption = getSelectedOptionForRoom(roomIndex);
81
191
 
82
- <div className="flyin__acco__footer">
83
- <ItemPicker
84
- items={travelClasses}
85
- selection={selectedTravelClass}
86
- label=" "
87
- placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
88
- classModifier="travel-class-picker__items"
89
- onPick={setSelectedTravelClass}
90
- />
91
- <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
92
- </div>
93
- </div>
192
+ return (
193
+ <div className="flyin__acco" key={`room-${roomIndex}`}>
194
+ <h3 className="flyin__acco__room-title">Room {roomIndex + 1}</h3>
195
+ <div className="flyin__acco__cards">
196
+ {roomAccommodations.map((accommodation) => {
197
+ const selectedOption = getSelectedOptionForAccommodation(roomIndex, accommodation.accommodationCode);
94
198
 
95
- <div className="flyin__acco__card">
96
- <div className="flyin__acco__img__wrapper">
97
- <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
98
- <div className="flyin__acco__price__wrapper">
99
- <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
100
- <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
101
- </div>
102
- </div>
199
+ const priceDifference = getPriceDifference(selectedRoomOption?.price, roomIndex, accommodation.accommodationCode);
200
+ return (
201
+ <div className="flyin__acco__card" key={`${roomIndex}-${accommodation.accommodationCode}`}>
202
+ <div className="flyin__acco__content">
203
+ <h4 className="flyin__acco__title">{accommodation.accommodationName}</h4>
204
+ </div>
103
205
 
104
- <div className="flyin__acco__content">
105
- <div className="flyin__acco__header">
106
- <h4 className="flyin__acco__title">Standard Room</h4>
107
- <div className="flyin__acco__usps">
108
- <div className="flyin__acco__usp">
109
- <Icon name="ui-check" width={16} />
110
- <span className="flyin__acco__usp__text">Garden view</span>
111
- </div>
112
- <div className="flyin__acco__usp">
113
- <Icon name="ui-check" width={16} />
114
- <span className="flyin__acco__usp__text">Free wifi</span>
115
- </div>
116
- <div className="flyin__acco__usp">
117
- <Icon name="ui-check" width={16} />
118
- <span className="flyin__acco__usp__text">Double bed</span>
119
- </div>
120
- </div>
121
- </div>
122
- </div>
206
+ <div className="flyin__acco__footer">
207
+ <ItemPicker
208
+ items={accommodation.regimes}
209
+ selection={selectedOption?.regimeName}
210
+ label={''}
211
+ placeholder={'Select regime'}
212
+ classModifier=""
213
+ onPick={(selected, selectedGuid) => handlePick(roomIndex, selectedGuid)}
214
+ valueFormatter={(id, label) => regimeFormatter(roomIndex, accommodation, id, label)}
215
+ />
123
216
 
124
- <div className="flyin__acco__footer">
125
- <ItemPicker
126
- items={travelClasses}
127
- selection={selectedTravelClass}
128
- label=" "
129
- placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
130
- classModifier="travel-class-picker__items"
131
- onPick={setSelectedTravelClass}
132
- />
133
- <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
134
- </div>
135
- </div>
217
+ <div className="flyin__acco__footer__actions">
218
+ <button
219
+ className={
220
+ selectedRoomOption?.accommodationCode == accommodation.accommodationCode ? 'cta cta--select cta--selected' : 'cta cta--select'
221
+ }
222
+ onClick={() => {
223
+ handlePick(roomIndex, selectedOption ? selectedOption.guid : first(accommodation.regimes)?.id);
224
+ }}>
225
+ {selectedRoomOption?.accommodationCode == accommodation.accommodationCode
226
+ ? translations?.SHARED.SELECTED
227
+ : translations?.SHARED.SELECT}
228
+ </button>
136
229
 
137
- <div className="flyin__acco__card">
138
- <div className="flyin__acco__img__wrapper">
139
- <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
140
- <div className="flyin__acco__price__wrapper">
141
- <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
142
- <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
143
- </div>
144
- </div>
145
-
146
- <div className="flyin__acco__content">
147
- <div className="flyin__acco__header">
148
- <h4 className="flyin__acco__title">Suite</h4>
149
- <div className="flyin__acco__usps">
150
- <div className="flyin__acco__usp">
151
- <Icon name="ui-check" width={16} />
152
- <span className="flyin__acco__usp__text">Sea sight</span>
153
- </div>
154
- <div className="flyin__acco__usp">
155
- <Icon name="ui-check" width={16} />
156
- <span className="flyin__acco__usp__text">Free wifi</span>
157
- </div>
158
- <div className="flyin__acco__usp">
159
- <Icon name="ui-check" width={16} />
160
- <span className="flyin__acco__usp__text">Breakfast included</span>
161
- </div>
162
- <div className="flyin__acco__usp">
163
- <Icon name="ui-check" width={16} />
164
- <span className="flyin__acco__usp__text">Jacuzzi</span>
165
- </div>
166
- <div className="flyin__acco__usp">
167
- <Icon name="ui-check" width={16} />
168
- <span className="flyin__acco__usp__text">Private terrace</span>
230
+ <div className="flyin__acco__price__wrapper">
231
+ <span className={getPriceDifferenceClassName(priceDifference)}>
232
+ {formatPriceDifference(priceDifference, selectedPackagingAccoSearchDetails.currencyCode)}
233
+ </span>
234
+ </div>
235
+ </div>
236
+ </div>
169
237
  </div>
170
- </div>
171
- </div>
172
- </div>
173
-
174
- <div className="flyin__acco__footer">
175
- <ItemPicker
176
- items={travelClasses}
177
- selection={selectedTravelClass}
178
- label=" "
179
- placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
180
- classModifier="travel-class-picker__items"
181
- onPick={setSelectedTravelClass}
182
- />
183
- <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
238
+ );
239
+ })}
184
240
  </div>
185
241
  </div>
186
- </div>
187
- </div>
188
-
189
- {/* {isLoading && (
190
- <Spinner />
191
- )} */}
242
+ );
243
+ })}
192
244
  </div>
193
245
 
194
246
  <div className="flyin__footer">
195
- <div className="flyin__footer__price">Total price: €</div>
247
+ <div className="flyin__footer__price">Total price: {calculateTotalPrice()}</div>
248
+
196
249
  <div className="flyin__button-wrapper">
197
250
  <button className="cta cta--select" onClick={handleConfirm}>
198
- Toevoegen
251
+ {translations.PRODUCT.BOOK_NOW}
199
252
  </button>
200
253
  </div>
201
254
  </div>
202
255
  </>
256
+ // Slicing with image and usps, not available in the current API response.
257
+ // <>
258
+ // <div className="flyin__content">
259
+ // <div className="flyin__acco">
260
+ // <div className="flyin__acco__cards">
261
+ // <div className="flyin__acco__card">
262
+ // <div className="flyin__acco__img__wrapper">
263
+ // <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
264
+ // <div className="flyin__acco__price__wrapper">
265
+ // <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
266
+ // <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
267
+ // </div>
268
+ // </div>
269
+
270
+ // <div className="flyin__acco__content">
271
+ // <div className="flyin__acco__header">
272
+ // <h4 className="flyin__acco__title">Deluxe Balcony Room</h4>
273
+ // <div className="flyin__acco__usps">
274
+ // <div className="flyin__acco__usp">
275
+ // <Icon name="ui-check" width={16} />
276
+ // <span className="flyin__acco__usp__text">Sea sight</span>
277
+ // </div>
278
+ // <div className="flyin__acco__usp">
279
+ // <Icon name="ui-check" width={16} />
280
+ // <span className="flyin__acco__usp__text">Free wifi</span>
281
+ // </div>
282
+ // <div className="flyin__acco__usp">
283
+ // <Icon name="ui-check" width={16} />
284
+ // <span className="flyin__acco__usp__text">Breakfast included</span>
285
+ // </div>
286
+ // <div className="flyin__acco__usp">
287
+ // <Icon name="ui-check" width={16} />
288
+ // <span className="flyin__acco__usp__text">Air conditioning</span>
289
+ // </div>
290
+ // <div className="flyin__acco__usp">
291
+ // <Icon name="ui-check" width={16} />
292
+ // <span className="flyin__acco__usp__text">Private bathroom</span>
293
+ // </div>
294
+ // </div>
295
+ // </div>
296
+ // </div>
297
+
298
+ // <div className="flyin__acco__footer">
299
+ // <ItemPicker
300
+ // items={travelClasses}
301
+ // selection={selectedTravelClass}
302
+ // label=" "
303
+ // placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
304
+ // classModifier="travel-class-picker__items"
305
+ // onPick={(item) => setSelectedTravelClass(item)}
306
+ // />
307
+ // <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
308
+ // </div>
309
+ // </div>
310
+
311
+ // <div className="flyin__acco__card">
312
+ // <div className="flyin__acco__img__wrapper">
313
+ // <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
314
+ // <div className="flyin__acco__price__wrapper">
315
+ // <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
316
+ // <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
317
+ // </div>
318
+ // </div>
319
+
320
+ // <div className="flyin__acco__content">
321
+ // <div className="flyin__acco__header">
322
+ // <h4 className="flyin__acco__title">Standard Room</h4>
323
+ // <div className="flyin__acco__usps">
324
+ // <div className="flyin__acco__usp">
325
+ // <Icon name="ui-check" width={16} />
326
+ // <span className="flyin__acco__usp__text">Garden view</span>
327
+ // </div>
328
+ // <div className="flyin__acco__usp">
329
+ // <Icon name="ui-check" width={16} />
330
+ // <span className="flyin__acco__usp__text">Free wifi</span>
331
+ // </div>
332
+ // <div className="flyin__acco__usp">
333
+ // <Icon name="ui-check" width={16} />
334
+ // <span className="flyin__acco__usp__text">Double bed</span>
335
+ // </div>
336
+ // </div>
337
+ // </div>
338
+ // </div>
339
+
340
+ // <div className="flyin__acco__footer">
341
+ // <ItemPicker
342
+ // items={travelClasses}
343
+ // selection={selectedTravelClass}
344
+ // label=" "
345
+ // placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
346
+ // classModifier="travel-class-picker__items"
347
+ // onPick={setSelectedTravelClass}
348
+ // />
349
+ // <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
350
+ // </div>
351
+ // </div>
352
+
353
+ // <div className="flyin__acco__card">
354
+ // <div className="flyin__acco__img__wrapper">
355
+ // <img src="https://cdn.pixabay.com/photo/2024/05/15/12/31/lake-8763490_1280.jpg" alt="river" className="flyin__acco__img" />
356
+ // <div className="flyin__acco__price__wrapper">
357
+ // <span className="flyin__acco__price__label">{translations?.SHARED.TOTAL_PRICE}</span>
358
+ // <span className="flyin__acco__price flyin__acco__price--increase">+1.764,00</span>
359
+ // </div>
360
+ // </div>
361
+
362
+ // <div className="flyin__acco__content">
363
+ // <div className="flyin__acco__header">
364
+ // <h4 className="flyin__acco__title">Suite</h4>
365
+ // <div className="flyin__acco__usps">
366
+ // <div className="flyin__acco__usp">
367
+ // <Icon name="ui-check" width={16} />
368
+ // <span className="flyin__acco__usp__text">Sea sight</span>
369
+ // </div>
370
+ // <div className="flyin__acco__usp">
371
+ // <Icon name="ui-check" width={16} />
372
+ // <span className="flyin__acco__usp__text">Free wifi</span>
373
+ // </div>
374
+ // <div className="flyin__acco__usp">
375
+ // <Icon name="ui-check" width={16} />
376
+ // <span className="flyin__acco__usp__text">Breakfast included</span>
377
+ // </div>
378
+ // <div className="flyin__acco__usp">
379
+ // <Icon name="ui-check" width={16} />
380
+ // <span className="flyin__acco__usp__text">Jacuzzi</span>
381
+ // </div>
382
+ // <div className="flyin__acco__usp">
383
+ // <Icon name="ui-check" width={16} />
384
+ // <span className="flyin__acco__usp__text">Private terrace</span>
385
+ // </div>
386
+ // </div>
387
+ // </div>
388
+ // </div>
389
+
390
+ // <div className="flyin__acco__footer">
391
+ // <ItemPicker
392
+ // items={travelClasses}
393
+ // selection={selectedTravelClass}
394
+ // label=" "
395
+ // placeholder={translations.QSM.TRAVEL_CLASS_PLACEHOLDER}
396
+ // classModifier="travel-class-picker__items"
397
+ // onPick={setSelectedTravelClass}
398
+ // />
399
+ // <button className="cta cta--select">{translations?.SHARED.SELECT}</button>
400
+ // </div>
401
+ // </div>
402
+ // </div>
403
+ // </div>
404
+
405
+ // {/* {isLoading && (
406
+ // <Spinner />
407
+ // )} */}
408
+ // </div>
409
+
410
+ // <div className="flyin__footer">
411
+ // <div className="flyin__footer__price">Total price: €</div>
412
+ // <div className="flyin__button-wrapper">
413
+ // <button className="cta cta--select" onClick={handleConfirm}>
414
+ // Toevoegen
415
+ // </button>
416
+ // </div>
417
+ // </div>
418
+ // </>
203
419
  );
204
420
  };
205
421
 
@@ -12,14 +12,20 @@ export enum DepartureRange {
12
12
  Night = 3
13
13
  }
14
14
 
15
- export interface TravelType {
16
- id: number;
17
- label: string;
18
- icon?: ReactNode;
19
- }
15
+ // export interface TravelType {
16
+ // id: number;
17
+ // label: string;
18
+ // icon?: ReactNode;
19
+ // }
20
+
21
+ // export interface TravelClass {
22
+ // id: number;
23
+ // label: string;
24
+ // icon?: ReactNode;
25
+ // }
20
26
 
21
- export interface TravelClass {
22
- id: number;
27
+ export interface PickerItem {
28
+ id: string;
23
29
  label: string;
24
30
  icon?: ReactNode;
25
31
  }