kupos-ui-components-lib 10.4.65 → 10.4.66

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 (38) hide show
  1. package/dist/ServiceItemPb.d.ts +4 -0
  2. package/dist/ServiceItemPb.js +486 -0
  3. package/dist/assets/images/anims/service_list/60_percent_anim.json +1 -0
  4. package/dist/assets/images/directo-icon.png +0 -0
  5. package/dist/components/FilterSortBar/SingleFilterSheet.d.ts +15 -0
  6. package/dist/components/FilterSortBar/SingleFilterSheet.js +21 -0
  7. package/dist/components/PaymentOptions/PaymentOptionsDesktop.d.ts +4 -0
  8. package/dist/components/PaymentOptions/PaymentOptionsDesktop.js +5 -0
  9. package/dist/components/PaymentOptions/PaymentOptionsMobile.d.ts +4 -0
  10. package/dist/components/PaymentOptions/PaymentOptionsMobile.js +5 -0
  11. package/dist/components/PaymentOptions/ResponsivePaymentOptions.d.ts +3 -0
  12. package/dist/components/PaymentOptions/ResponsivePaymentOptions.js +10 -0
  13. package/dist/components/PaymentOptions/index.d.ts +5 -0
  14. package/dist/components/PaymentOptions/index.js +4 -0
  15. package/dist/components/PaymentOptions/mobileTypes.d.ts +0 -0
  16. package/dist/components/PaymentOptions/mobileTypes.js +0 -0
  17. package/dist/components/PaymentOptions/type.d.ts +4 -0
  18. package/dist/components/PaymentOptions/type.js +1 -0
  19. package/dist/components/ServiceItem/ExpandedDropdown.d.ts +19 -0
  20. package/dist/components/ServiceItem/ExpandedDropdown.js +28 -0
  21. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  22. package/dist/components/ServiceItem/ServiceItemDesktop.js +3 -3
  23. package/dist/components/ServiceItem/ServiceItemDesktopPeru.d.ts +6 -0
  24. package/dist/components/ServiceItem/ServiceItemDesktopPeru.js +612 -0
  25. package/dist/components/ServiceItem/types.d.ts +1 -0
  26. package/dist/example.d.ts +5 -0
  27. package/dist/example.js +240 -0
  28. package/dist/styles.css +3 -0
  29. package/dist/ui/SeatSection/SeatSection.d.ts +2 -1
  30. package/dist/ui/SeatSection/SeatSection.js +15 -4
  31. package/dist/ui/ServiceType.d.ts +9 -0
  32. package/dist/ui/ServiceType.js +9 -0
  33. package/dist/ui/TopAmenities/PromoCountdown.d.ts +18 -0
  34. package/dist/ui/TopAmenities/PromoCountdown.js +55 -0
  35. package/package.json +1 -1
  36. package/src/components/ServiceItem/ServiceItemDesktop.tsx +3 -0
  37. package/src/components/ServiceItem/types.ts +2 -0
  38. package/src/ui/SeatSection/SeatSection.tsx +55 -17
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ServiceItemProps } from "./types";
3
+ declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, t, }: ServiceItemProps): React.ReactElement;
4
+ export default ServiceItemPB;
@@ -0,0 +1,486 @@
1
+ import React from "react";
2
+ import LottiePlayer from "./assets/LottiePlayer";
3
+ import DateService from "./utils/DateService";
4
+ import ModalEventManager from "./utils/ModalEventManager";
5
+ import InternationalServicePopupBody from "./components/InternationalServicePopupBody";
6
+ const SEAT_EXCEPTIONS = ["Asiento mascota"];
7
+ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, t = (key) => key, }) {
8
+ var _a, _b, _c, _d, _e, _f, _g;
9
+ const SvgAmenities = ({ moreAnemities, name, color, }) => {
10
+ const amenityKey = name.toLowerCase().replace(/\s/g, "_");
11
+ const getIconPath = () => {
12
+ const amenityFileName = `${amenityKey}.png`;
13
+ const imagePath = getAmenitiesImage(amenityFileName);
14
+ if (!imagePath) {
15
+ return `/public/images/amenities/${amenityKey}.svg`;
16
+ }
17
+ return imagePath;
18
+ };
19
+ const iconPath = getIconPath();
20
+ return (React.createElement("img", { src: iconPath, alt: name, style: {
21
+ filter: color === "white" ? "brightness(0) invert(1)" : "",
22
+ }, className: `object-contain ${moreAnemities ? "w-[20px] h-[20px]" : "w-[16px] h-[16px]"}` }));
23
+ };
24
+ const getAmenitiesImage = (name) => {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
26
+ switch (name) {
27
+ case "air_condtion.png": {
28
+ return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
29
+ }
30
+ case "baggage.png": {
31
+ return (_b = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _b === void 0 ? void 0 : _b.baggageIcon;
32
+ }
33
+ case "charging_plug.png": {
34
+ return (_c = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _c === void 0 ? void 0 : _c.chargingIcon;
35
+ }
36
+ case "coffee.png": {
37
+ return (_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _d === void 0 ? void 0 : _d.coffeeIcon;
38
+ }
39
+ case "food_new_icon.png": {
40
+ return (_e = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _e === void 0 ? void 0 : _e.foodIcon;
41
+ }
42
+ case "gaming.png": {
43
+ return (_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _f === void 0 ? void 0 : _f.gamingIcon;
44
+ }
45
+ case "handicap.png": {
46
+ return (_g = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _g === void 0 ? void 0 : _g.handicapIcon;
47
+ }
48
+ case "mobile_ticket.png": {
49
+ return (_h = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _h === void 0 ? void 0 : _h.mobileTicketIcon;
50
+ }
51
+ case "movie.png": {
52
+ return (_j = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _j === void 0 ? void 0 : _j.movieIcon;
53
+ }
54
+ case "restrooms.png": {
55
+ return (_k = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _k === void 0 ? void 0 : _k.restroomsIcon;
56
+ }
57
+ case "snacks_new.png": {
58
+ return (_l = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _l === void 0 ? void 0 : _l.snackIcon;
59
+ }
60
+ case "wifi.png": {
61
+ return (_m = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _m === void 0 ? void 0 : _m.wifiIcon;
62
+ }
63
+ case "cortina_divisoria.png": {
64
+ return (_o = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _o === void 0 ? void 0 : _o.cortinaIcon;
65
+ }
66
+ case "frazada.png": {
67
+ return (_p = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _p === void 0 ? void 0 : _p.frazaIcon;
68
+ }
69
+ default: {
70
+ return "";
71
+ }
72
+ }
73
+ };
74
+ const getAmenityName = (rawAmenity) => {
75
+ switch (rawAmenity) {
76
+ case "mobile ticket":
77
+ return "Ticket móvil";
78
+ case "charging plug":
79
+ return "Cargador";
80
+ case "wifi":
81
+ return "WiFi";
82
+ case "movie":
83
+ return "Entretenimiento";
84
+ case "baggage":
85
+ return "Equipaje";
86
+ case "Restrooms":
87
+ return "Baños";
88
+ case "air condtion":
89
+ return "Aire acondicionado";
90
+ case "snacks new":
91
+ return "Snacks";
92
+ case "coffee":
93
+ return "Café";
94
+ case "cortina divisoria":
95
+ return "Cortina Divisoria";
96
+ case "frazada":
97
+ return "";
98
+ default:
99
+ return rawAmenity;
100
+ }
101
+ };
102
+ const currency = (amount) => {
103
+ const formattedAmount = amount
104
+ .toString()
105
+ .replace(/\B(?=(\d{3})+(?!\d))/g, ",");
106
+ return "$" + formattedAmount;
107
+ };
108
+ const labelId = typeof serviceItem.boarding_stages === "string"
109
+ ? serviceItem.boarding_stages.split("|")[0]
110
+ : "";
111
+ const showTopLabel = busStage &&
112
+ busStage[labelId] &&
113
+ busStage[labelId].split("|")[1] === "true" &&
114
+ busStage[labelId].split("|")[0];
115
+ const renderStages = (stageData) => {
116
+ if (typeof stageData === "string") {
117
+ return (React.createElement("div", { className: "flex flex-col space-y-1 text-justify gap-[4px]" }, stageData.split(",").map((stageInfo, index) => {
118
+ const parts = stageInfo.split("|");
119
+ const id = parts[0];
120
+ const time = parts[1];
121
+ const label = parts[3] || ""; // Skip empty part [2]
122
+ return (React.createElement("div", { key: index },
123
+ label,
124
+ " | ",
125
+ time));
126
+ })));
127
+ }
128
+ return null;
129
+ };
130
+ let isSoldOut = serviceItem.available_seats <= 0;
131
+ const renderIcon = (iconKey, size = "14px") => {
132
+ var _a;
133
+ const iconValue = (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a[iconKey];
134
+ if (iconValue) {
135
+ if (typeof iconValue === "string") {
136
+ return (React.createElement("img", { src: iconValue, alt: iconKey, className: `${`w-[${size}] h-[${size}]`} mr-[5px]` }));
137
+ }
138
+ }
139
+ return null;
140
+ };
141
+ const getSortedSeatTypes = () => {
142
+ var _a;
143
+ if (!((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.length)) {
144
+ return [{ label: "Salon cama", price: 0 }];
145
+ }
146
+ let seatTypesWithPrices = serviceItem.seat_types
147
+ .filter((item) => getFilteredSeats(item))
148
+ .map((val) => ({
149
+ label: val === null || val === void 0 ? void 0 : val.label,
150
+ price: val === null || val === void 0 ? void 0 : val.fare,
151
+ }));
152
+ seatTypesWithPrices.sort((a, b) => a.price - b.price);
153
+ const premiumIndex = seatTypesWithPrices.findIndex((item) => item.label === "Premium");
154
+ if (premiumIndex >= 3) {
155
+ seatTypesWithPrices[2] = seatTypesWithPrices[premiumIndex];
156
+ }
157
+ seatTypesWithPrices = seatTypesWithPrices.slice(0, 2);
158
+ return seatTypesWithPrices;
159
+ };
160
+ const getNumberOfSeats = () => {
161
+ return serviceItem.seat_types.filter((val) => !SEAT_EXCEPTIONS.includes(val.label)).length;
162
+ };
163
+ const getSeatNames = () => {
164
+ const sortedSeatTypes = getSortedSeatTypes();
165
+ return sortedSeatTypes.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: `flex items-center justify-between text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` }, typeof val.label === "string" || typeof val.label === "number"
166
+ ? val.label
167
+ : null)));
168
+ };
169
+ const getSeatPrice = () => {
170
+ const sortedSeatTypes = getSortedSeatTypes();
171
+ return sortedSeatTypes.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: "flex items-center justify-between text-[13.33px]" }, typeof val.price === "string"
172
+ ? currency(val.price)
173
+ : typeof val.price === "number"
174
+ ? currency(val.price)
175
+ : null)));
176
+ };
177
+ const getFilteredSeats = (item) => {
178
+ return item;
179
+ };
180
+ const checkMidnight = () => {
181
+ var _a, _b;
182
+ if ((cityOrigin === null || cityOrigin === void 0 ? void 0 : cityOrigin.label) &&
183
+ (cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.label) &&
184
+ ((cityOrigin.label.toLowerCase().includes("argentina") &&
185
+ !cityDestination.label.toLowerCase().includes("argentina")) ||
186
+ (!cityOrigin.label.toLowerCase().includes("argentina") &&
187
+ cityDestination.label.toLowerCase().includes("argentina")))) {
188
+ ModalEventManager.showPopup({
189
+ modalIcon: (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.warningIcon,
190
+ title: translation === null || translation === void 0 ? void 0 : translation.title,
191
+ showPrimaryButton: false,
192
+ primaryButtonText: translation === null || translation === void 0 ? void 0 : translation.continueButton,
193
+ onSecondaryButtonClick: () => {
194
+ onBookButtonPress && onBookButtonPress();
195
+ },
196
+ secondaryButtonText: translation === null || translation === void 0 ? void 0 : translation.okContinueButton,
197
+ primaryButtonBgColor: colors === null || colors === void 0 ? void 0 : colors.kuposButtonColor,
198
+ primaryButtonTextColor: colors === null || colors === void 0 ? void 0 : colors.primaryButtonTextColor,
199
+ secondaryButtonBgColor: colors === null || colors === void 0 ? void 0 : colors.secondaryBgColor,
200
+ secondaryButtonTextColor: colors === null || colors === void 0 ? void 0 : colors.secondaryTextColor,
201
+ children: React.createElement(InternationalServicePopupBody, null),
202
+ });
203
+ return;
204
+ }
205
+ if (serviceItem.dep_validation_text) {
206
+ ModalEventManager.showPopup({
207
+ body: serviceItem.dep_validation_text,
208
+ primaryButtonText: translation === null || translation === void 0 ? void 0 : translation.continueButton,
209
+ secondaryButtonText: translation === null || translation === void 0 ? void 0 : translation.chooseAnotherTripButton,
210
+ onPrimaryButtonClick: () => {
211
+ onBookButtonPress && onBookButtonPress();
212
+ },
213
+ primaryButtonBgColor: colors === null || colors === void 0 ? void 0 : colors.kuposButtonColor,
214
+ primaryButtonTextColor: colors === null || colors === void 0 ? void 0 : colors.primaryButtonTextColor,
215
+ secondaryButtonBgColor: colors === null || colors === void 0 ? void 0 : colors.secondaryBgColor,
216
+ secondaryButtonTextColor: colors === null || colors === void 0 ? void 0 : colors.secondaryTextColor,
217
+ });
218
+ return;
219
+ }
220
+ if (serviceItem.operator_service_name === "Classe Reale " &&
221
+ cityOrigin.label.toLowerCase() === "santiago,chile" &&
222
+ cityDestination.label.toLowerCase() === "portillo,chile") {
223
+ ModalEventManager.showPopup({
224
+ modalIcon: (_b = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _b === void 0 ? void 0 : _b.warningIcon,
225
+ title: translation === null || translation === void 0 ? void 0 : translation.title,
226
+ primaryButtonText: translation === null || translation === void 0 ? void 0 : translation.okContinueButton,
227
+ secondaryButtonText: translation === null || translation === void 0 ? void 0 : translation.chooseAnotherTripButton,
228
+ onPrimaryButtonClick: () => {
229
+ onBookButtonPress && onBookButtonPress();
230
+ },
231
+ showSecondaryButton: false,
232
+ primaryButtonBgColor: colors === null || colors === void 0 ? void 0 : colors.kuposButtonColor,
233
+ primaryButtonTextColor: colors === null || colors === void 0 ? void 0 : colors.primaryButtonTextColor,
234
+ children: (React.createElement(React.Fragment, null,
235
+ React.createElement("p", { className: "mt-[5px] text-justify" },
236
+ translation.classeNormalText,
237
+ React.createElement("span", { className: "bold-text" },
238
+ "\u00A0",
239
+ translation.classeBoldText),
240
+ translation.classeNormalText1),
241
+ React.createElement("p", { className: "mt-[10px] text-justify" },
242
+ translation.classeNormalText2,
243
+ "\u00A0",
244
+ React.createElement("span", { className: "bold-text" },
245
+ "\u00A0",
246
+ translation.classeBoldText1),
247
+ " ",
248
+ translation.classeNormalText3))),
249
+ });
250
+ return;
251
+ }
252
+ else {
253
+ onBookButtonPressHandler();
254
+ }
255
+ };
256
+ const onBookButtonPressHandler = () => {
257
+ onBookButtonPress();
258
+ };
259
+ return (React.createElement("div", { className: `relative ${serviceItem.offer_text || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip)
260
+ ? "mb-[60px]"
261
+ : "mb-[20px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
262
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
263
+ showTopLabel
264
+ ? "mt-[30px]"
265
+ : "mt-[20px]"} ` },
266
+ React.createElement("div", { className: "bg-white rounded-[20px] shadow-service mb-[10px] mx-auto relative" },
267
+ React.createElement("div", { className: "p-[15px]" },
268
+ React.createElement("div", { className: "flex justify-between items-center mb-[15px]" },
269
+ React.createElement("div", { className: "w-[120px] overflow-y-hidden" },
270
+ React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[120px] h-auto object-contain ${isSoldOut ? "grayscale" : ""}` }))),
271
+ React.createElement("div", { className: "grid text-[#464647] w-full [grid-template-columns:minmax(0,1.4fr)_minmax(0,0.2fr)_minmax(0,1fr)_auto] gap-x-[7rem] min-[640px]:gap-x-[6rem] min-[768px]:gap-x-[4rem] min-[1024px]:gap-x-[4rem] min-[1280px]:gap-x-[4rem] min-[1380px]:gap-x-[5rem]" },
272
+ React.createElement("div", { className: "min-h-[2.5rem] flex flex-col justify-between gap-[10px]" },
273
+ React.createElement("div", { className: `flex items-center text-[13.33px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
274
+ React.createElement("div", { className: "flex items-center bold-text capitalize group " },
275
+ orignLabel ? (React.createElement("div", { className: "w-[60px]" }, orignLabel)) : (React.createElement("div", { className: "w-[18px] h-auto mr-[8px]" },
276
+ React.createElement("img", { src: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, alt: "origin", className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` }))),
277
+ React.createElement("span", { className: "cursor-pointer bold-text" }, DateService.getServiceItemDate(serviceItem.travel_date)),
278
+ serviceItem.boarding_stages && (React.createElement("div", { className: "hidden group-hover:block absolute top-[29%] left-[35%] ml-2 text-white px-3 py-2 rounded-[10px] whitespace-normal z-10 shadow-service ", style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } },
279
+ React.createElement("div", { className: "tooltip-arrow absolute top-2 -left-[7px] w-0 h-0 border-t-8 border-b-8 border-r-8 border-t-transparent border-b-transparent", style: { borderRightColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } }),
280
+ React.createElement("div", { className: "text-center text-[14px]" }, renderStages(serviceItem.boarding_stages))))),
281
+ React.createElement("div", { className: "mx-[8px]" }, "\u2022"),
282
+ React.createElement("div", { className: "font-[900] relative" }, DateService.formatTime(serviceItem.dep_time))),
283
+ React.createElement("div", { className: `flex items-center text-[13.33px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
284
+ React.createElement("div", { className: "flex items-center bold-text capitalize group " },
285
+ destinationLabel ? (React.createElement("div", { className: "w-[60px]" }, destinationLabel)) : (React.createElement("div", { className: "w-[18px] h-auto mr-[8px]" },
286
+ React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.destination, className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` }))),
287
+ React.createElement("span", { className: "cursor-pointer bold-text" }, DateService.getServiceItemDate(serviceItem.arrival_date)),
288
+ serviceItem.dropoff_stages && (React.createElement("div", { className: `hidden group-hover:block absolute top-[46%] left-[35%] ml-2 text-white px-3 py-2 rounded-[10px] whitespace-normal z-10 shadow-service`, style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } },
289
+ React.createElement("div", { className: "tooltip-arrow absolute top-2 -left-[7px] w-0 h-0 border-t-8 border-b-8 border-r-8 border-t-transparent border-b-transparent", style: { borderRightColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } }),
290
+ React.createElement("div", { className: "text-center text-[14px]" }, renderStages(serviceItem.dropoff_stages))))),
291
+ React.createElement("div", { className: "mx-[8px]" }, "\u2022"),
292
+ React.createElement("div", { className: "font-[900]" }, DateService.formatTime(serviceItem.arr_time)))),
293
+ React.createElement("div", { style: {
294
+ width: "1px",
295
+ height: "2.5rem",
296
+ backgroundColor: "#ccc",
297
+ margin: "auto",
298
+ } }),
299
+ React.createElement("div", { className: "content-center" },
300
+ React.createElement("div", { className: `flex gap-[10px] text-[13.33px] justify-between min-h-[2.5rem] ${getNumberOfSeats() < 3 ? "" : ""}`, style: getNumberOfSeats() < 2 ? { alignItems: "center" } : {} },
301
+ React.createElement("div", { className: "flex flex-col justify-between" }, getSeatNames()),
302
+ React.createElement("div", { className: "flex flex-col justify-between",
303
+ // className={`flex flex-col ${
304
+ // getNumberOfSeats() < 3 ? "justify-between" : ""
305
+ // }`}
306
+ style: { color: isSoldOut ? "#c0c0c0" : colors.priceColor } }, getSeatPrice()))),
307
+ React.createElement("div", null,
308
+ React.createElement("button", { onClick: () => (!isSoldOut ? checkMidnight() : null), disabled: serviceDetailsLoading, className: `w-full ${serviceDetailsLoading || isSoldOut ? "py-[6px]" : "py-[12px]"} text-[13.33px] font-bold text-white rounded-[10px] border-none px-[20px] flex items-center justify-center`, style: {
309
+ backgroundColor: serviceDetailsLoading || isSoldOut
310
+ ? "lightgray"
311
+ : colors.kuposButtonColor,
312
+ cursor: serviceDetailsLoading || isSoldOut
313
+ ? "not-allowed"
314
+ : "pointer",
315
+ } },
316
+ React.createElement("span", { className: "min-w-[75px] flex justify-center items-center bold-text" },
317
+ isSoldOut ? renderIcon("soldOutIcon", "14px") : null,
318
+ serviceDetailsLoading ? (React.createElement("span", { className: "loader-circle" })) : !isSoldOut ? (translation === null || translation === void 0 ? void 0 : translation.buyButton) : (translation === null || translation === void 0 ? void 0 : translation.soldOutButton))))),
319
+ React.createElement("div", { className: "flex justify-end mr-[11px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
320
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] text-[red] mt-1 text-center" }, "\u00A1 \u00DAltimos Asientos!"))),
321
+ React.createElement("div", {
322
+ // className={`${
323
+ // serviceItem.is_change_ticket &&
324
+ // serviceItem.pet_seat_info &&
325
+ // serviceItem?.is_tracking_enabled &&
326
+ // Object.keys(serviceItem.pet_seat_info || {}).length > 0
327
+ // ? "grid grid-cols-[1.4fr_4.8fr] gap-[3.4rem] mt-[15px] text-[13px] items-center border-t border-[#eee] mt-[15px] pt-[12px]"
328
+ // : "grid grid-cols-[3.17fr_4.8fr] gap-[3rem] mt-[15px] text-[13px] items-center border-t border-[#eee] mt-[15px] pt-[12px]"
329
+ // }`}
330
+ className: `${"flex justify-between items-center mt-[15px] items-center border-t border-[#eee] mt-[15px] pt-[12px]"}` },
331
+ React.createElement("div", null,
332
+ React.createElement("div", { className: "flex items-center " },
333
+ React.createElement("div", { className: "flex items-center cursor-pointer ", style: { color: isSoldOut ? "#c0c0c0" : "" } },
334
+ React.createElement("div", { className: "flex items-center" },
335
+ React.createElement("div", { className: "w-[18px] h-auto mr-[4px] relative" },
336
+ React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[16px] h-[16px] mr-[4px] object-contain mb-[4px] ${isSoldOut ? "grayscale" : ""}`, onMouseEnter: (e) => {
337
+ const tooltip = e.currentTarget
338
+ .nextElementSibling;
339
+ if (tooltip)
340
+ tooltip.style.display = "block";
341
+ }, onMouseLeave: (e) => {
342
+ const tooltip = e.currentTarget
343
+ .nextElementSibling;
344
+ if (tooltip)
345
+ tooltip.style.display = "none";
346
+ } }),
347
+ React.createElement("div", { className: "hidden group-hover:block absolute left-[80px] -bottom-[160px] z-20 mt-2 w-[280px] rounded-lg shadow-service-2 bg-white overflow-hidden rounded-[14px] border-[2px]", style: {
348
+ borderColor: colors.ratingBorderColor,
349
+ color: isSoldOut ? "#c0c0c0" : "",
350
+ } },
351
+ React.createElement("div", { className: "pt-[20px] text-center" },
352
+ React.createElement("div", { className: "text-[12px] bold-text text-[#464647]" }, "PUNTUACI\u00D3N"),
353
+ React.createElement("div", { className: "text-[12px] font-light text-[#464647]" }, serviceItem.operator_service_name)),
354
+ React.createElement("div", { className: "px-3 py-2 flex flex-col gap-[10px]" }, [
355
+ { key: "1", label: "Calidad del bus" },
356
+ { key: "2", label: "Puntualidad" },
357
+ {
358
+ key: "3",
359
+ label: "Calidad del servicio",
360
+ },
361
+ {
362
+ key: "4",
363
+ label: "Recomendación del servicio",
364
+ },
365
+ ].map((rating, index, array) => {
366
+ const isLast = index === array.length - 1;
367
+ // Use operator_details[6] for rating values
368
+ const ratingData = serviceItem.operator_details[6] || {};
369
+ const value = (ratingData === null || ratingData === void 0 ? void 0 : ratingData[rating.key]) || 0;
370
+ return (React.createElement("div", { key: rating.key, className: `flex items-center ${isLast ? "mb-2" : ""}` },
371
+ React.createElement("div", { className: "relative w-[3rem] h-[3rem]" },
372
+ React.createElement("div", { className: "absolute inset-0 w-full h-full rounded-full" },
373
+ React.createElement("div", { className: "w-full h-full rounded-full border-[2px] border-[lightgray]" })),
374
+ React.createElement("div", { className: "absolute inset-0 w-full h-full" },
375
+ React.createElement("svg", { className: "w-full h-full", viewBox: "0 0 100 100" },
376
+ React.createElement("circle", { cx: "50", cy: "50", r: "48", fill: "none", strokeWidth: "4", stroke: value >= 4
377
+ ? "#00A650"
378
+ : colors.ratingBorderColor, strokeDasharray: value > 0
379
+ ? `${value * 75.4} 301.6`
380
+ : "150.8 301.6", strokeDashoffset: "75.4", transform: "rotate(-90, 50, 50)" }))),
381
+ React.createElement("div", { className: "absolute inset-0 flex items-center justify-center top-[40%] left-[36%]" },
382
+ React.createElement("span", { className: "text-[#464647] font-medium text-[12px] " }, value.toFixed(1)))),
383
+ React.createElement("span", { className: "text-[#464647] text-[13.33px] ml-[10px]" }, rating.label)));
384
+ })),
385
+ React.createElement("div", { className: "px-1 py-2 text-center text-[12px] text-[#ff8f45]", style: { backgroundColor: colors.ratingBottomColor } },
386
+ "Esta puntuaci\u00F3n se obtuvo de las opiniones de",
387
+ " ",
388
+ serviceItem.operator_details[5] || 0,
389
+ " usuarios."))),
390
+ React.createElement("span", { className: "text-[#464647] bold-text text-[13.33px]" }, typeof serviceItem.operator_details[1] === "number"
391
+ ? serviceItem.operator_details[1].toFixed(1)
392
+ : serviceItem.operator_details[1])),
393
+ React.createElement("span", { className: "ml-[10px] text-[#464647] text-[13.33px]" }, serviceItem.operator_details[2])))),
394
+ React.createElement("div", { className: "flex items-baseline relative text-[#464647]" },
395
+ React.createElement("div", { className: `w-[18px] h-auto mr-[4px] ${isSoldOut ? "grayscale" : ""}` }, renderIcon("hours", "14px")),
396
+ React.createElement("div", { className: `cursor-default group text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
397
+ serviceItem.duration,
398
+ " ",
399
+ translation.hours,
400
+ React.createElement("div", { className: " hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service", style: { backgroundColor: colors.tooltipColor } },
401
+ React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent", style: { borderBottomColor: colors.tooltipColor } }),
402
+ "Duraci\u00F3n estimada del viaje"))),
403
+ serviceItem.pet_seat_info &&
404
+ Object.keys(serviceItem.pet_seat_info).length > 0 ? (React.createElement("div", { className: "flex items-center" },
405
+ React.createElement("div", { className: `relative group cursor-default ` },
406
+ React.createElement("div", { className: "flex items-center" },
407
+ React.createElement("div", { className: `mr-[5px] ${isSoldOut ? "grayscale" : ""}` },
408
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.petFriendlyAnim, width: "20px", height: "20px" })),
409
+ React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647]" },
410
+ React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly))),
411
+ React.createElement("div", { className: " hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service", style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } },
412
+ React.createElement("div", { className: "tooltip-arrow absolute text-[13.33px] -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent", style: { borderBottomColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } }),
413
+ "Este servicio incluye asientos para mascotas.")))) : null,
414
+ serviceItem.is_change_ticket && (React.createElement("div", { className: "flex items-center" },
415
+ React.createElement("div", { className: "relative group cursor-default" },
416
+ React.createElement("div", { className: "flex items-center" },
417
+ React.createElement("div", { className: `mr-[5px] ${isSoldOut ? "grayscale" : ""}` },
418
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.flexibleAnim, width: "20px", height: "20px" })),
419
+ React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647]" },
420
+ React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.flexible))),
421
+ React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service text-[13.33px]", style: { backgroundColor: colors.tooltipColor } },
422
+ React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent ", style: { borderBottomColor: colors.tooltipColor } }),
423
+ "Esta empresa permite cambios sin costo hasta (", (_c = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.change_ticket_hours) !== null && _c !== void 0 ? _c : 6,
424
+ ") horas antes del viaje.")))),
425
+ React.createElement("div", { className: "flex items-center" },
426
+ React.createElement("div", null, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled) && (React.createElement("div", { className: "flex items-center mr-[10px]" },
427
+ React.createElement("div", { className: `h-auto mr-[4px] text-[13px] text-[#464647] ${isSoldOut ? "grayscale" : ""}` },
428
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.locationAnim, width: "20px", height: "20px" }))))),
429
+ React.createElement("div", null, metaData && serviceItem.operator_details[4] && (React.createElement("div", { className: "flex items-center gap-[6px]" },
430
+ (((_d = serviceItem.operator_details[3]) === null || _d === void 0 ? void 0 : _d.includes("18"))
431
+ ? [...serviceItem.operator_details[4], "18"]
432
+ : serviceItem.operator_details[4]).map((val, key) => {
433
+ var _a, _b, _c, _d;
434
+ return (key < 3 &&
435
+ ((_b = (_a = metaData === null || metaData === void 0 ? void 0 : metaData.amenities[val]) === null || _a === void 0 ? void 0 : _a.split(".")[0]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== "WATER") ||
436
+ val === "18" ? (React.createElement("div", { key: key, className: "relative mr-2 cursor-pointer" },
437
+ React.createElement("div", { className: "group" },
438
+ React.createElement("div", { className: `${isSoldOut ? "grayscale" : ""}` },
439
+ React.createElement(SvgAmenities, { moreAnemities: false, name: (_c = metaData.amenities[val]) === null || _c === void 0 ? void 0 : _c.split(".")[0].toLowerCase() })),
440
+ React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap z-10 mt-2.5 text-center shadow-service text-[13.33px]", style: { backgroundColor: colors.tooltipColor } },
441
+ React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent", style: {
442
+ borderBottomColor: colors.tooltipColor,
443
+ } }),
444
+ getAmenityName((_d = metaData.amenities[val]) === null || _d === void 0 ? void 0 : _d.split(".")[0].split("_").join(" ")))))) : null;
445
+ }),
446
+ ((_e = serviceItem.operator_details[4]) === null || _e === void 0 ? void 0 : _e.length) > 3 && (React.createElement("div", { className: "relative ml-1 cursor-pointer" },
447
+ React.createElement("div", { className: "w-[16px] h-[16px] bg-gray-200 rounded-full flex items-center justify-center text-sm font-bold ml-[5px] group" },
448
+ React.createElement("img", { src: ((_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.plus) ||
449
+ "/images/icons/amenities/icon_plus.svg", className: "w-[16px] h-[16px]", alt: "plus" }),
450
+ React.createElement("div", { className: "hidden group-hover:block absolute -top-[13px] left-[40px] z-20 pl-[10px]" },
451
+ React.createElement("div", { className: "flex flex-col gap-[10px] p-3 rounded-[8px] shadow-md animate-fadeIn relative", style: { backgroundColor: colors.tooltipColor } },
452
+ metaData &&
453
+ ((_g = serviceItem.operator_details[4]) === null || _g === void 0 ? void 0 : _g.map((val, key) => {
454
+ var _a, _b, _c, _d, _e, _f, _g;
455
+ const exceptions = [
456
+ 1, 2, 5, 7, 8, 9, 12, 13, 14, 15,
457
+ ];
458
+ return exceptions.includes(key) ? null : key >= 3 &&
459
+ ((_b = (_a = metaData.amenities[val]) === null || _a === void 0 ? void 0 : _a.split(".")[0]) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== "WATER" ? (React.createElement("div", { key: key, className: "flex items-center gap-[5px] whitespace-nowrap text-[13.33px]" },
460
+ React.createElement("div", { className: `${isSoldOut ? "grayscale" : ""}` },
461
+ React.createElement(SvgAmenities, { moreAnemities: true, name: (_d = (_c = metaData.amenities[val]) === null || _c === void 0 ? void 0 : _c.split(".")[0]) === null || _d === void 0 ? void 0 : _d.toUpperCase(), color: "white" })),
462
+ React.createElement("span", { className: "text-white text-xs" }, getAmenityName((_g = (_f = (_e = metaData.amenities[val]) === null || _e === void 0 ? void 0 : _e.split(".")[0]) === null || _f === void 0 ? void 0 : _f.split("_")) === null || _g === void 0 ? void 0 : _g.join(" "))))) : null;
463
+ })),
464
+ React.createElement("div", { className: "tooltip-arrow absolute -left-[6px] top-[15px] w-0 h-0 border-t-8 border-b-8 border-r-8 border-t-transparent border-b-transparent ", style: {
465
+ borderRightColor: colors.tooltipColor,
466
+ } }))))))))))))),
467
+ children,
468
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && (React.createElement("div", { className: ` text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px] -z-10 rounded-b-[14px] text-[14px]`, style: { backgroundColor: isSoldOut ? "" : colors === null || colors === void 0 ? void 0 : colors.bottomStripColor } },
469
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.promoAnim, width: "18px", height: "18px" }),
470
+ React.createElement("span", { className: "ml-[10px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))),
471
+ React.createElement("div", { className: "absolute -top-[17px] left-0 w-full flex items-center justify-end gap-[12px] pr-[20px] z-10 " },
472
+ showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[8px] px-[20px] rounded-[38px] text-[13.33px] z-20 ${isSoldOut ? "bg-[#ddd]" : ``}`, style: { backgroundColor: !isSoldOut && colors.ratingBottomColor } },
473
+ React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
474
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.priorityStageAnim, width: "20px", height: "20px" })),
475
+ React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]` }, showTopLabel))),
476
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[8px] text-white px-[20px] rounded-[38px] text-[13.33px] z-20 ${isSoldOut ? "bg-[#ddd]" : `bg-[${colors.tooltipColor}]`}` },
477
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.connectingServiceIcon, width: "20px", height: "20px" }),
478
+ React.createElement("div", null, "Conexión"))),
479
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[8px] text-white px-[20px] rounded-[38px] text-[13.33px] z-20 ${isSoldOut ? "bg-[#ddd]" : `bg-[${colors.tooltipColor}]`}` },
480
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.directoAnim, width: "20px", height: "20px" }),
481
+ React.createElement("div", null, translation === null || translation === void 0 ? void 0 : translation.directService))),
482
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" && (React.createElement("div", { className: `flex items-center gap-[10px] py-[8px] text-white px-[20px] rounded-[38px] text-[13.33px] z-20 ${isSoldOut ? "bg-[#ddd]" : `bg-[${colors.tooltipColor}]`}` },
483
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.directoAnim, width: "20px", height: "20px" }),
484
+ React.createElement("div", null, "Tren Express"))))));
485
+ }
486
+ export default ServiceItemPB;
@@ -0,0 +1 @@
1
+ {"nm":"Main Scene","h":100,"w":100,"meta":{"g":"@lottiefiles/creator@1.89.0"},"layers":[{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":150,"ip":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[37,9]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":1},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[109,109],"t":48},{"s":[100,100],"t":89}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[50,50]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","nm":"Group 1","it":[{"ty":"sh","nm":"Path 1","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0.51,0.27],[0.31,0.46],[0.14,0.56],[0,0.59],[-0.31,0.79],[-0.58,0.44],[-0.83,0],[-0.49,-0.27],[-0.26,-0.44],[-0.05,-0.49],[0,0],[0.25,0.2],[0.39,0],[0.27,-0.23],[0.15,-0.45],[0.02,-0.66],[0,-0.02],[0,-0.01],[-0.24,0.18],[-0.3,0.1],[-0.32,0],[-0.47,-0.26],[-0.28,-0.49],[0,-0.65],[0.3,-0.51],[0.52,-0.3],[0.67,0]],"o":[[-0.75,0],[-0.51,-0.28],[-0.31,-0.46],[-0.13,-0.57],[0,-1.1],[0.31,-0.8],[0.59,-0.44],[0.71,0],[0.49,0.27],[0.26,0.44],[0,0],[-0.07,-0.37],[-0.24,-0.21],[-0.37,0],[-0.27,0.22],[-0.15,0.45],[0,0.01],[0,0.02],[0.14,-0.24],[0.24,-0.18],[0.3,-0.1],[0.54,0],[0.47,0.25],[0.29,0.48],[0,0.61],[-0.29,0.5],[-0.51,0.3],[0,0]],"v":[[10.74,14.17],[8.85,13.76],[7.61,12.66],[6.94,11.13],[6.75,9.39],[7.21,6.55],[8.54,4.69],[10.67,4.03],[12.46,4.44],[13.58,5.5],[14.04,6.9],[12.08,6.9],[11.6,6.05],[10.65,5.74],[9.69,6.09],[9.06,7.1],[8.8,8.76],[8.8,8.81],[8.8,8.85],[9.38,8.22],[10.19,7.8],[11.11,7.64],[12.63,8.04],[13.75,9.14],[14.18,10.84],[13.73,12.52],[12.51,13.72],[10.74,14.17]]}}},{"ty":"sh","nm":"Path 2","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[-0.23,0.12],[-0.13,0.22],[0,0.28],[0.14,0.21],[0.24,0.12],[0.31,0],[0.23,-0.12],[0.14,-0.22],[0,-0.29],[-0.14,-0.23],[-0.23,-0.13],[-0.31,0]],"o":[[0.3,0],[0.23,-0.13],[0.14,-0.22],[0,-0.31],[-0.13,-0.22],[-0.23,-0.13],[-0.3,0],[-0.23,0.12],[-0.14,0.22],[0,0.29],[0.14,0.22],[0.24,0.12],[0,0]],"v":[[10.62,12.38],[11.42,12.19],[11.97,11.66],[12.18,10.91],[11.97,10.12],[11.41,9.6],[10.6,9.41],[9.8,9.59],[9.24,10.11],[9.03,10.88],[9.24,11.66],[9.8,12.19],[10.62,12.38]]}}},{"ty":"sh","nm":"Path 3","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0.64,0.43],[0.35,0.76],[0,1],[-0.35,0.76],[-0.64,0.43],[-0.91,0],[-0.64,-0.43],[-0.35,-0.77],[0,-1],[0.35,-0.77],[0.64,-0.43],[0.91,0]],"o":[[-0.91,0],[-0.64,-0.43],[-0.35,-0.77],[0,-1],[0.35,-0.77],[0.64,-0.43],[0.91,0],[0.64,0.43],[0.35,0.76],[0,1],[-0.35,0.76],[-0.64,0.43],[0,0]],"v":[[19.93,14.17],[17.61,13.52],[16.11,11.75],[15.59,9.1],[16.11,6.47],[17.61,4.68],[19.93,4.03],[22.25,4.68],[23.74,6.47],[24.27,9.1],[23.74,11.75],[22.25,13.52],[19.93,14.17]]}}},{"ty":"sh","nm":"Path 4","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[-0.33,0.26],[-0.18,0.47],[0,0.65],[0.19,0.47],[0.34,0.25],[0.44,0],[0.34,-0.26],[0.19,-0.48],[0,-0.65],[-0.18,-0.48],[-0.33,-0.26],[-0.44,0]],"o":[[0.44,0],[0.34,-0.26],[0.19,-0.48],[0,-0.65],[-0.18,-0.48],[-0.33,-0.26],[-0.44,0],[-0.33,0.25],[-0.18,0.47],[0,0.65],[0.19,0.47],[0.34,0.26],[0,0]],"v":[[19.93,12.28],[21.08,11.89],[21.85,10.79],[22.13,9.1],[21.85,7.42],[21.08,6.33],[19.93,5.94],[18.77,6.33],[18,7.42],[17.73,9.1],[18,10.79],[18.77,11.89],[19.93,12.28]]}}},{"ty":"sh","nm":"Path 5","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[27.69,14],[33.13,4.2],[35.18,4.2],[29.73,14],[27.69,14]]}}},{"ty":"sh","nm":"Path 6","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0.38,0.21],[0.22,0.38],[0,0.52],[-0.22,0.37],[-0.37,0.21],[-0.46,0],[-0.37,-0.21],[-0.21,-0.38],[0,-0.54],[0.22,-0.38],[0.37,-0.21],[0.47,0]],"o":[[-0.47,0],[-0.37,-0.21],[-0.22,-0.38],[0,-0.54],[0.22,-0.38],[0.38,-0.21],[0.48,0],[0.37,0.21],[0.22,0.37],[0,0.52],[-0.22,0.38],[-0.36,0.21],[0,0]],"v":[[34.94,14.17],[33.66,13.86],[32.77,12.98],[32.43,11.62],[32.77,10.25],[33.66,9.37],[34.92,9.06],[36.2,9.37],[37.08,10.25],[37.42,11.62],[37.08,12.98],[36.18,13.86],[34.94,14.17]]}}},{"ty":"sh","nm":"Path 7","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[-0.13,0.08],[-0.07,0.17],[0,0.24],[0.07,0.17],[0.13,0.08],[0.17,0],[0.13,-0.09],[0.07,-0.17],[0,-0.25],[-0.07,-0.17],[-0.13,-0.09],[-0.17,0]],"o":[[0.17,0],[0.13,-0.09],[0.07,-0.17],[0,-0.26],[-0.07,-0.17],[-0.13,-0.09],[-0.17,0],[-0.13,0.08],[-0.07,0.17],[0,0.25],[0.07,0.17],[0.13,0.08],[0,0]],"v":[[34.92,12.75],[35.37,12.63],[35.68,12.24],[35.79,11.62],[35.68,10.98],[35.37,10.6],[34.92,10.46],[34.48,10.6],[34.17,10.98],[34.06,11.61],[34.17,12.24],[34.48,12.63],[34.92,12.75]]}}},{"ty":"sh","nm":"Path 8","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0.38,0.21],[0.22,0.38],[0,0.52],[-0.22,0.37],[-0.37,0.21],[-0.47,0],[-0.37,-0.21],[-0.21,-0.38],[0,-0.54],[0.22,-0.38],[0.37,-0.21],[0.47,0]],"o":[[-0.47,0],[-0.37,-0.21],[-0.22,-0.38],[0,-0.54],[0.22,-0.38],[0.38,-0.21],[0.47,0],[0.37,0.21],[0.22,0.37],[0,0.52],[-0.21,0.38],[-0.37,0.21],[0,0]],"v":[[27.99,9.14],[26.72,8.83],[25.82,7.95],[25.49,6.59],[25.82,5.22],[26.72,4.34],[27.99,4.03],[29.25,4.34],[30.14,5.22],[30.47,6.59],[30.14,7.95],[29.25,8.83],[27.99,9.14]]}}},{"ty":"sh","nm":"Path 9","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[-0.13,0.08],[-0.07,0.17],[0,0.24],[0.07,0.17],[0.13,0.08],[0.17,0],[0.13,-0.09],[0.07,-0.17],[0,-0.26],[-0.07,-0.17],[-0.13,-0.09],[-0.17,0]],"o":[[0.17,0],[0.13,-0.09],[0.07,-0.17],[0,-0.26],[-0.07,-0.17],[-0.13,-0.09],[-0.17,0],[-0.13,0.08],[-0.07,0.17],[0,0.24],[0.07,0.17],[0.13,0.08],[0,0]],"v":[[27.98,7.73],[28.43,7.6],[28.74,7.21],[28.85,6.59],[28.74,5.95],[28.43,5.57],[27.98,5.43],[27.53,5.57],[27.22,5.95],[27.11,6.59],[27.22,7.21],[27.53,7.6],[27.98,7.73]]}}},{"ty":"sh","nm":"Path 10","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0.73,0.43],[0.42,0.76],[0,1],[-0.41,0.76],[-0.73,0.43],[-0.96,0],[-0.74,-0.43],[-0.4,-0.77],[0,-1],[0.41,-0.77],[0.74,-0.43],[0.96,0]],"o":[[-0.96,0],[-0.73,-0.43],[-0.41,-0.77],[0,-1],[0.42,-0.77],[0.73,-0.43],[0.96,0],[0.74,0.43],[0.41,0.76],[0,1],[-0.4,0.76],[-0.74,0.43],[0,0]],"v":[[46.66,14.17],[44.12,13.52],[42.4,11.75],[41.79,9.1],[42.4,6.47],[44.12,4.68],[46.66,4.03],[49.21,4.68],[50.91,6.47],[51.53,9.1],[50.91,11.75],[49.21,13.52],[46.66,14.17]]}}},{"ty":"sh","nm":"Path 11","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[-0.4,0.26],[-0.22,0.47],[0,0.65],[0.22,0.47],[0.41,0.25],[0.57,0],[0.41,-0.26],[0.22,-0.48],[0,-0.65],[-0.22,-0.48],[-0.41,-0.26],[-0.55,0]],"o":[[0.57,0],[0.41,-0.26],[0.22,-0.48],[0,-0.65],[-0.22,-0.48],[-0.4,-0.26],[-0.55,0],[-0.41,0.25],[-0.22,0.47],[0,0.65],[0.22,0.47],[0.41,0.26],[0,0]],"v":[[46.66,12.28],[48.11,11.89],[49.07,10.79],[49.4,9.1],[49.07,7.42],[48.11,6.33],[46.66,5.94],[45.22,6.33],[44.26,7.42],[43.93,9.1],[44.26,10.79],[45.22,11.89],[46.66,12.28]]}}},{"ty":"sh","nm":"Path 12","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[53.1,14],[53.1,4.2],[59.61,4.2],[59.61,5.89],[55.2,5.89],[55.2,8.27],[58.67,8.27],[58.67,9.91],[55.2,9.91],[55.2,14],[53.1,14]]}}},{"ty":"sh","nm":"Path 13","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[60.99,14],[60.99,4.2],[67.5,4.2],[67.5,5.89],[63.09,5.89],[63.09,8.27],[66.56,8.27],[66.56,9.91],[63.09,9.91],[63.09,14],[60.99,14]]}}},{"ty":"fl","nm":"Fill","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[37.094,9.075]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[37.094,9.075]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","nm":"Group 2","it":[{"ty":"sh","nm":"Path 14","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,-3.53],[0,0],[3.53,0],[0,0],[0,3.53],[0,0],[-3.53,0]],"o":[[0,0],[3.53,0],[0,0],[0,3.53],[0,0],[-3.53,0],[0,0],[0,-3.53],[0,0]],"v":[[6.4,0],[67.6,0],[74,6.4],[74,11.6],[67.6,18],[6.4,18],[0,11.6],[0,6.4],[6.4,0]]}}},{"ty":"fl","nm":"Fill","c":{"a":0,"k":[1,0.361,0.38]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[37,9]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[37,9]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1}],"v":"5.7.0","fr":30,"op":89,"ip":0,"assets":[]}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { FilterCategory, FilterSortBarColors, FilterSortBarIcons } from "./types";
3
+ interface SingleFilterSheetProps {
4
+ category: FilterCategory | null;
5
+ onClose: () => void;
6
+ onToggleOption: (optionId: string) => void;
7
+ onPriceRangeChange: (currentMin: number, currentMax: number) => void;
8
+ onClear: () => void;
9
+ onApply: () => void;
10
+ currencySign: string;
11
+ colors: Required<FilterSortBarColors>;
12
+ icons?: FilterSortBarIcons;
13
+ }
14
+ declare const SingleFilterSheet: ({ category, onClose, onToggleOption, onPriceRangeChange, onClear, onApply, currencySign, colors, icons, }: SingleFilterSheetProps) => React.JSX.Element;
15
+ export default SingleFilterSheet;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { BottomSheet } from "../../ui/BottomSheet";
3
+ import { CloseIcon } from "./icons";
4
+ import OptionCheckboxList from "./OptionCheckboxList";
5
+ import PriceRangeSlider from "./PriceRangeSlider";
6
+ import SheetFooter from "./SheetFooter";
7
+ const SingleFilterSheet = ({ category, onClose, onToggleOption, onPriceRangeChange, onClear, onApply, currencySign, colors, icons, }) => {
8
+ return (React.createElement(BottomSheet, { isOpen: !!category, onClose: onClose, showBackdrop: true, maxHeight: "75vh" }, category && (React.createElement("div", null,
9
+ React.createElement("div", { style: {
10
+ display: "flex",
11
+ alignItems: "center",
12
+ justifyContent: "space-between",
13
+ marginBottom: 16,
14
+ } },
15
+ React.createElement("span", { style: { fontSize: 16, fontWeight: 700, color: "#464647" } }, category.sheetTitle || category.sectionLabel || category.label),
16
+ React.createElement("div", { onClick: onClose, style: { cursor: "pointer", padding: 4, WebkitTapHighlightColor: "transparent" } },
17
+ React.createElement(CloseIcon, { size: 14, src: icons === null || icons === void 0 ? void 0 : icons.closeIcon }))),
18
+ React.createElement("div", { style: { maxHeight: "50vh", overflowY: "auto" } }, category.kind === "price" && category.priceRange ? (React.createElement(PriceRangeSlider, { value: category.priceRange, onChange: onPriceRangeChange, currencySign: currencySign, primaryColor: colors.primaryColor })) : (React.createElement(OptionCheckboxList, { options: category.options || [], kind: category.kind, onToggle: onToggleOption, primaryColor: colors.primaryColor, starColor: colors.buttonColor || colors.primaryColor, icons: icons }))),
19
+ React.createElement(SheetFooter, { onClear: onClear, onApply: onApply, colors: colors })))));
20
+ };
21
+ export default SingleFilterSheet;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PaymentOptionsProps } from "./type";
3
+ declare const PaymentOptionsDesktop: (props: PaymentOptionsProps) => React.JSX.Element;
4
+ export default PaymentOptionsDesktop;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ const PaymentOptionsDesktop = (props) => {
3
+ return React.createElement("div", null, "PaymentOptionsDesktop");
4
+ };
5
+ export default PaymentOptionsDesktop;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PaymentOptionsProps } from "./type";
3
+ declare const PaymentOptionsMobile: (props: PaymentOptionsProps) => React.JSX.Element;
4
+ export default PaymentOptionsMobile;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ const PaymentOptionsMobile = (props) => {
3
+ return React.createElement("div", null, "PaymentOptionsMobile");
4
+ };
5
+ export default PaymentOptionsMobile;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { PaymentOptionsProps } from "./type";
3
+ export default function ResponsivePaymentOptions(props: PaymentOptionsProps): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import PaymentOptionsDesktop from "./PaymentOptionsDesktop";
3
+ import PaymentOptionsMobile from "./PaymentOptionsMobile";
4
+ export default function ResponsivePaymentOptions(props) {
5
+ const { variant } = props;
6
+ if (variant === "mobile") {
7
+ return React.createElement(PaymentOptionsMobile, Object.assign({}, props));
8
+ }
9
+ return React.createElement(PaymentOptionsDesktop, Object.assign({}, props));
10
+ }