kupos-ui-components-lib 9.0.7 → 9.0.8

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 (53) hide show
  1. package/README copy.md +223 -67
  2. package/dist/assets/images/anims/service_list/directo.json +1 -1
  3. package/dist/assets/images/anims/service_list/priority_stage.json +1 -1
  4. package/dist/components/ServiceItem/RatingHover.js +31 -31
  5. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  6. package/dist/components/ServiceItem/ServiceItemDesktop.js +124 -299
  7. package/dist/components/ServiceItem/ServiceItemMobile.js +44 -291
  8. package/dist/components/ServiceItem/mobileTypes.d.ts +3 -0
  9. package/dist/components/ServiceItem/types.d.ts +7 -0
  10. package/dist/styles.css +76 -17
  11. package/dist/ui/AmenitiesBlock.js +25 -36
  12. package/dist/ui/BottomAmenities/BottomAmenities.js +3 -2
  13. package/dist/ui/DateTimeSection/DateTimeSection.d.ts +28 -0
  14. package/dist/ui/DateTimeSection/DateTimeSection.js +58 -0
  15. package/dist/ui/DirectoBlock.d.ts +8 -0
  16. package/dist/ui/DirectoBlock.js +11 -0
  17. package/dist/ui/DurationBlock.js +2 -2
  18. package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -0
  19. package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +28 -18
  20. package/dist/ui/FlexibleBlock.js +2 -4
  21. package/dist/ui/PetBlock.js +1 -3
  22. package/dist/ui/RatingBlock.js +6 -2
  23. package/dist/ui/SeatSection/SeatSection.js +1 -1
  24. package/dist/ui/TopAmenities/PromoCountdown.d.ts +18 -0
  25. package/dist/ui/TopAmenities/PromoCountdown.js +55 -0
  26. package/dist/ui/TopAmenities/TopAmenities.d.ts +4 -1
  27. package/dist/ui/TopAmenities/TopAmenities.js +31 -4
  28. package/dist/utils/CommonService.d.ts +1 -1
  29. package/package.json +2 -1
  30. package/src/assets/images/anims/service_list/bomb.json +1 -0
  31. package/src/assets/images/anims/service_list/directo.json +1 -1
  32. package/src/assets/images/anims/service_list/priority_stage.json +1 -1
  33. package/src/components/ServiceItem/RatingHover.tsx +51 -51
  34. package/src/components/ServiceItem/ServiceItemDesktop.tsx +241 -616
  35. package/src/components/ServiceItem/ServiceItemMobile.tsx +120 -501
  36. package/src/components/ServiceItem/mobileTypes.ts +3 -0
  37. package/src/components/ServiceItem/types.ts +7 -0
  38. package/src/ui/AmenitiesBlock.tsx +34 -15
  39. package/src/ui/BottomAmenities/BottomAmenities.tsx +110 -0
  40. package/src/ui/DateTimeSection/DateTimeSection.tsx +207 -0
  41. package/src/ui/DirectoBlock.tsx +31 -0
  42. package/src/ui/DurationBlock.tsx +2 -2
  43. package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +115 -0
  44. package/src/ui/FlexibleBlock.tsx +3 -3
  45. package/src/ui/KuposButton/KuposButton.tsx +48 -0
  46. package/src/ui/PetBlock.tsx +2 -2
  47. package/src/ui/RatingBlock.tsx +16 -4
  48. package/src/ui/SeatSection/SeatSection.tsx +187 -0
  49. package/src/ui/TopAmenities/TopAmenities.tsx +116 -0
  50. package/src/ui/mobileweb/BottomAmenitiesMobile.tsx +168 -0
  51. package/src/ui/mobileweb/DateTimeSectionMobile.tsx +192 -0
  52. package/src/ui/mobileweb/SeatSectionMobile.tsx +256 -0
  53. package/src/ui/mobileweb/TopAmenitieMobile.tsx +82 -0
@@ -1,7 +1,9 @@
1
1
  import React from "react";
2
2
  import LottiePlayer from "../../assets/LottiePlayer";
3
- import DateService from "../../utils/DateService";
4
3
  import commonService from "../../utils/CommonService";
4
+ import TopAmenitieMobile from "../../ui/mobileweb/TopAmenitieMobile";
5
+ import BottomAmenitiesMobile from "../../ui/mobileweb/BottomAmenitiesMobile";
6
+ import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
5
7
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
6
8
  const exceptions = [
7
9
  "gy",
@@ -18,6 +20,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
18
20
  var _a, _b, _c;
19
21
  const isPetSeat = (Object.keys(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) || []).length > 0;
20
22
  let isSoldOut = serviceItem.available_seats <= 0;
23
+ const showPromo = Math.random() > 0.5;
21
24
  const labelId = typeof serviceItem.boarding_stages === "string"
22
25
  ? serviceItem.boarding_stages.split("|")[0]
23
26
  : "";
@@ -35,146 +38,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
35
38
  return "";
36
39
  }
37
40
  };
38
- const seatTypes = () => {
39
- var _a, _b, _c, _d;
40
- let seatTypes = (_d = (_c = (_b = (_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.filter((item) => getFilteredSeats(item.label))) === null || _b === void 0 ? void 0 : _b.sort((a, b) => a.fare - b.fare) // Add this line to sort by fare
41
- ) === null || _c === void 0 ? void 0 : _c.slice(0, 2)) === null || _d === void 0 ? void 0 : _d.map((type, i) => {
42
- var _a;
43
- return exceptions.includes(type.label) ? null : (React.createElement("div", { className: ((_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.length) > 2
44
- ? "w-[100%] flex flex-row justify-between "
45
- : "w-[100%] flex flex-row justify-between items-center", key: i },
46
- React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] ", style: {
47
- // marginLeft: "10px",
48
- color: isSoldOut ? "#bbb" : "#464647",
49
- } }, type.label),
50
- React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] bold-text", style: { color: isSoldOut ? "#bbb" : colors.seatPriceColor } }, commonService.currency(type.fare, currencySign))));
51
- });
52
- return seatTypes;
53
- };
54
- const seatTypesWithRemoveDuplicateSeats = () => {
55
- var _a, _b;
56
- const seatMap = new Map();
57
- (_b = (_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.filter((item) => getFilteredSeats(item.label))) === null || _b === void 0 ? void 0 : _b.forEach((item) => {
58
- if (exceptions.includes(item.key))
59
- return;
60
- const existing = seatMap.get(item.label);
61
- if (!existing ||
62
- parseFloat(item.fare) < parseFloat(existing.fare)) {
63
- seatMap.set(item.label, item);
64
- }
65
- });
66
- const uniqueSeats = Array.from(seatMap.values())
67
- .sort((a, b) => a.fare - b.fare)
68
- .slice(0, 3);
69
- return uniqueSeats.map((type, i) => {
70
- var _a;
71
- return exceptions.includes(type.label) ? null : (React.createElement("div", { className: ((_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a.length) > 2
72
- ? "w-[100%] flex flex-row justify-between "
73
- : "w-[100%] flex flex-row justify-between items-center", key: i },
74
- React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] ", style: {
75
- // marginLeft: "10px",
76
- color: isSoldOut ? "#bbb" : "#464647",
77
- } }, commonService.truncateSeatLabel(type.label)),
78
- React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] bold-text", style: { color: isSoldOut ? "#bbb" : colors.seatPriceColor } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0 && !isPeru
79
- ? commonService.currency(0, currencySign)
80
- : commonService.currency(type.fare, currencySign))));
81
- });
82
- };
83
- const getFilteredSeats = (item) => {
84
- return item;
85
- };
86
- const getAmenitiesImage = (name) => {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
88
- switch (name) {
89
- case "air_condtion.png": {
90
- return (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _a === void 0 ? void 0 : _a.airConditionIcon;
91
- }
92
- case "baggage.png": {
93
- return (_b = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _b === void 0 ? void 0 : _b.baggageIcon;
94
- }
95
- case "charging_plug.png": {
96
- return (_c = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _c === void 0 ? void 0 : _c.chargingIcon;
97
- }
98
- case "coffee.png": {
99
- return (_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _d === void 0 ? void 0 : _d.coffeeIcon;
100
- }
101
- case "food_new_icon.png": {
102
- return (_e = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _e === void 0 ? void 0 : _e.foodIcon;
103
- }
104
- case "gaming.png": {
105
- return (_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _f === void 0 ? void 0 : _f.gamingIcon;
106
- }
107
- case "handicap.png": {
108
- return (_g = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _g === void 0 ? void 0 : _g.handicapIcon;
109
- }
110
- case "mobile_ticket.png": {
111
- return (_h = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _h === void 0 ? void 0 : _h.mobileTicketIcon;
112
- }
113
- case "movie.png": {
114
- return (_j = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _j === void 0 ? void 0 : _j.movieIcon;
115
- }
116
- case "restrooms.png": {
117
- return (_k = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _k === void 0 ? void 0 : _k.restroomsIcon;
118
- }
119
- case "snacks_new.png": {
120
- return (_l = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _l === void 0 ? void 0 : _l.snackIcon;
121
- }
122
- case "wifi.png": {
123
- return (_m = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _m === void 0 ? void 0 : _m.wifiIcon;
124
- }
125
- case "cortina_divisoria.png": {
126
- return (_o = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _o === void 0 ? void 0 : _o.cortinaIcon;
127
- }
128
- case "frazada.png": {
129
- return (_p = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _p === void 0 ? void 0 : _p.frazaIcon;
130
- }
131
- case "blanket.png": {
132
- return (_q = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _q === void 0 ? void 0 : _q.blankketIcon;
133
- }
134
- case "cctv.png": {
135
- return (_r = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _r === void 0 ? void 0 : _r.cctvIcon;
136
- }
137
- case "cup_holder.png": {
138
- return (_s = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _s === void 0 ? void 0 : _s.cupHolderIcon;
139
- }
140
- case "emergency_contact.png": {
141
- return (_t = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _t === void 0 ? void 0 : _t.emergencyContactIcon;
142
- }
143
- case "emergency_exit.png": {
144
- return (_u = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _u === void 0 ? void 0 : _u.emergencyExitIcon;
145
- }
146
- case "fire_extinguisher.png": {
147
- return (_v = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _v === void 0 ? void 0 : _v.fireExtinguisherIcon;
148
- }
149
- case "reading_light.png": {
150
- return (_w = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _w === void 0 ? void 0 : _w.readingLIghtIcon;
151
- }
152
- case "seat_belt.png": {
153
- return (_x = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _x === void 0 ? void 0 : _x.sercurityBeltIcon;
154
- }
155
- case "service_on_board.png": {
156
- return (_y = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _y === void 0 ? void 0 : _y.serviceOnBoardIcon;
157
- }
158
- case "personal_tv.png": {
159
- return (_z = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _z === void 0 ? void 0 : _z.personalTVIcon;
160
- }
161
- case "pet_admission.png": {
162
- return (_0 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _0 === void 0 ? void 0 : _0.petAdmissionIcon;
163
- }
164
- case "music.png": {
165
- return (_1 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _1 === void 0 ? void 0 : _1.musicIcon;
166
- }
167
- case "headset.png": {
168
- return (_2 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _2 === void 0 ? void 0 : _2.headPhoneIcon;
169
- }
170
- case "allows_cancellation.png": {
171
- return (_3 = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _3 === void 0 ? void 0 : _3.allowCancellationIcon;
172
- }
173
- default: {
174
- return "";
175
- }
176
- }
177
- };
178
41
  const amenities = () => {
179
42
  var _a;
180
43
  const raw = (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details) === null || _a === void 0 ? void 0 : _a[3];
@@ -185,7 +48,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
185
48
  : [];
186
49
  const nodes = list.slice(0, 2).map((am, i) => {
187
50
  var _a;
188
- return (React.createElement("img", { key: i, className: "amenity", height: 14, width: 14,
51
+ return (React.createElement("img", { key: i, className: "amenity", height: 12, width: 12,
189
52
  // src={getAmenitiesImage(amenitiesData?.[am]?.toLowerCase())}
190
53
  src: commonService.getAmenitiesImage((_a = amenitiesData === null || amenitiesData === void 0 ? void 0 : amenitiesData[am]) === null || _a === void 0 ? void 0 : _a.toLowerCase(), serviceItem), alt: "icon" }));
191
54
  });
@@ -205,140 +68,52 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
205
68
  if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
206
69
  isConexion = true;
207
70
  }
208
- const depTime = serviceItem.dep_time || "";
209
- // Extract hours and minutes and check for AM/PM
210
- const hasAM = depTime.includes("AM");
211
- const hasPM = depTime.includes("PM");
212
- const [timePart] = depTime.split(/AM|PM/).map((part) => part.trim());
213
- const [hour, minute] = timePart.split(":").map(Number);
214
- // Convert to 24-hour format
215
- let cleanedDepTime;
216
- if (hasAM) {
217
- cleanedDepTime =
218
- hour === 12
219
- ? `00:${minute < 10 ? "0" + minute : minute}`
220
- : `${hour < 10 ? "0" + hour : hour}:${minute < 10 ? "0" + minute : minute}`;
221
- }
222
- else if (hasPM) {
223
- cleanedDepTime =
224
- hour === 12
225
- ? `${hour}:${minute < 10 ? "0" + minute : minute}`
226
- : `${hour + 12}:${minute < 10 ? "0" + minute : minute}`;
227
- }
228
- else {
229
- cleanedDepTime = timePart;
230
- }
231
71
  return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[55px]" : "mb-[14px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
232
72
  isConexion ||
233
73
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
234
74
  showTopLabel
235
- ? "mt-[20px]"
75
+ ? "mt-[10px]"
236
76
  : "mt-[10px]"} `, style: { backgroundColor: "#fff", zIndex: 1 } },
237
- React.createElement("div", { className: "border border-[#E6E6E6] rounded-[20px]", style: { backgroundColor: "#fff", zIndex: 1 } },
238
- React.createElement("div", { className: `p-[12px] ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
239
- showTopLabel ||
240
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
241
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo)
242
- ? "mt-[10px]"
243
- : ""}` },
244
- React.createElement("div", { className: "flex justify-between mb-[8px]" },
245
- React.createElement("div", { className: "flex items-center w-[50%] justify-between" },
77
+ React.createElement(TopAmenitieMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, seatPriceColor: colors.seatPriceColor, bombAnim: serviceItem.icons.bombAnim, priorityStageAnim: serviceItem.icons.priorityStageAnim }),
78
+ React.createElement("div", { className: " rounded-[20px]", style: {
79
+ backgroundColor: "#fff",
80
+ zIndex: 1,
81
+ // borderRadius: showTopLabel ? "10px 0 10px 10px" : "10px",
82
+ borderRadius: "14px 0 14px 14px",
83
+ border: `1px solid ${colors.bottomStripColor}`,
84
+ } },
85
+ React.createElement("div", {
86
+ // className={` ${
87
+ // serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
88
+ // showTopLabel ||
89
+ // serviceItem?.is_direct_trip ||
90
+ // serviceItem?.is_transpordo
91
+ // ? "mt-[10px]"
92
+ // : ""
93
+ // }`}
94
+ style: { padding: "12px 12px 8px 12px" } },
95
+ React.createElement("div", { className: "flex justify-between items-center mb-[10px]" },
96
+ React.createElement("div", { className: "flex items-center justify-between" },
246
97
  React.createElement("div", { className: "w-[120px] overflow-y-hidden" },
247
98
  React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `w-[100px] h-auto object-contain ${isSoldOut ? "grayscale" : ""}` })),
248
- isCiva ? (React.createElement("div", { className: "black-text min-[420]:text-[12px] text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details[2])) : showRating ? (React.createElement("div", { className: "flex min-[420]:text-[13px] text-[12px] bold-text items-center" },
249
- React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
250
- React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem)))) : null),
251
- showLastSeats ? (React.createElement("div", { className: "flex justify-end -mt-[5px] -mb-[5px] items-center pt-[5px] pb-[5px] text-center " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
252
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("span", { className: "text-[12px] text-[red] mt-1 flex justify-end pt-[5px] pb-[5px] pl-[15px] pr-[15px] rounded-[8px] ", style: {
253
- backgroundColor: colors.lastSeatBg,
254
- color: colors.lastSeatText,
255
- } }, "\u00A1 \u00DAltimos Asientos!")))) : null),
256
- React.createElement("div", { className: "flex justify-between gap-[5px] w-full", onClick: onBookButtonPress },
257
- React.createElement("div", { className: "min-h-[2.5rem] flex flex-col justify-between gap-[4px] w-[50%] ", style: { justifyContent: isCiva && "center" } },
258
- React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
259
- React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
260
- React.createElement("div", null,
261
- " ",
262
- orignLabel ? (React.createElement("div", { className: "w-[60px]" }, orignLabel)) : (React.createElement("div", { className: "w-[14px] h-auto mr-[5px]" },
263
- React.createElement("img", { src: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, alt: "origin", className: `w-[14px] h-auto mr-[5px] ${isSoldOut ? "grayscale" : ""}` })))),
264
- React.createElement("div", { className: "flex items-center relative capitalize justify-between ", style: { flex: 1 } },
265
- React.createElement("span", { className: "cursor-pointer black-text" }, DateService.getServiceItemDate(serviceItem.travel_date)),
266
- React.createElement("div", { className: "absolute left-[50%]" }, "\u2022"),
267
- React.createElement("div", { className: "font-[900] relative black-text" }, isLinatal ? (React.createElement("div", null,
268
- React.createElement("span", null,
269
- " ",
270
- cleanedDepTime,
271
- " ",
272
- React.createElement("span", null, hasPM ? "PM" : hasAM ? "AM" : "")),
273
- React.createElement("span", null, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dep_time.includes("AM")) ||
274
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dep_time.includes("PM"))
275
- ? null
276
- : DateService.ampmOnly(serviceItem.dep_time)))) : (DateService.formatTime(serviceItem.dep_time)))))),
277
- isCiva ? null : (React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
278
- React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
279
- React.createElement("div", null,
280
- " ",
281
- destinationLabel ? (React.createElement("div", { className: "w-[60px]" }, destinationLabel)) : (React.createElement("div", { className: "w-[14px] h-auto mr-[5px]" },
282
- React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.destination, alt: "destination", className: `w-[14px] h-auto mr-[5px] ${isSoldOut ? "grayscale" : ""}` })))),
283
- React.createElement("div", { className: "flex items-center relative capitalize justify-between ", style: { flex: 1 } },
284
- React.createElement("span", { className: "cursor-pointer black-text" }, DateService.getServiceItemDate(serviceItem.arrival_date)),
285
- React.createElement("div", { className: "absolute left-[50%]" }, "\u2022"),
286
- React.createElement("div", { className: "font-[900] relative black-text" }, DateService.formatTime(serviceItem.arr_time))))))),
287
- React.createElement("div", { style: {
288
- width: "1px",
289
- height: "2.5rem",
290
- backgroundColor: "#ccc",
291
- margin: "auto",
292
- } }),
293
- React.createElement("div", { className: "content-center", style: {
294
- width: isPeru ? "40%" : "40%",
295
- } },
296
- React.createElement("div", { className: "flex flex-col justify-between h-[2.5rem] ", style: {
297
- gap: isSoldOut ? "0px" : "5px",
298
- justifyContent: ((_c = serviceItem.seat_types) === null || _c === void 0 ? void 0 : _c.length) > 2
299
- ? "space-between"
300
- : "center",
301
- } },
302
- removeDuplicateSeats
303
- ? seatTypesWithRemoveDuplicateSeats()
304
- : seatTypes(),
305
- isSoldOut ? (React.createElement("div", { className: "flex justify-end" },
306
- React.createElement("span", { className: "min-[420]:text-[13px] text-[12px] text-[#ccc]" }, "Agotado"))) : null))),
307
- React.createElement("div", { className: "bg-[#E6E6E6] -ml-[12px] -mr-[12px] mt-[10px] mb-[10px] h-[1px]" }),
308
- React.createElement("div", { className: `${"flex justify-between items-center items-center "}` },
309
- React.createElement("div", null,
310
- React.createElement("div", { className: "flex items-center " },
311
- React.createElement("div", { className: "flex items-center cursor-pointer ", style: { color: isSoldOut ? "#bbb" : "text-[#464647]" } },
312
- React.createElement("span", { className: "ml-[3px] min-[420]:text-[13px] text-[12px] bold-text" }, serviceItem.operator_details[2])))),
313
- React.createElement("div", { className: "flex relative ", style: { color: isSoldOut ? "#bbb" : "text-[#464647]" } },
314
- React.createElement("div", { className: `w-[12px] h-auto mr-[2px] ${isSoldOut ? "grayscale" : ""}` }, renderIcon("hours", "14px")),
315
- "\u00A0",
316
- React.createElement("div", { className: `cursor-default group min-[420]:text-[13px] text-[12px] ${isSoldOut ? "text-[#c0c0c0]" : ""}`, style: { lineHeight: "normal" } },
317
- serviceItem.duration,
318
- "hrs")),
319
- React.createElement("div", { style: { opacity: isSoldOut ? 0.5 : 1 } }, amenities()),
320
- (serviceItem.is_change_ticket || isPetSeat) && (React.createElement("div", { onClick: () => {
321
- setShowDropdown(!showDropdown);
322
- setAmenetiesAtomValue({
323
- service: serviceItem,
324
- showTopLabel: showTopLabel,
325
- });
326
- }, className: "flex items-center" },
327
- serviceItem.pet_seat_info &&
328
- Object.keys(serviceItem.pet_seat_info).length > 0 ? (React.createElement("div", { className: "flex items-center" },
329
- React.createElement("div", { className: `relative group cursor-default ` },
330
- React.createElement("div", { className: "flex items-center" },
331
- React.createElement("div", { className: `mr-[5px] ${isSoldOut ? "grayscale" : ""}` },
332
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.petFriendlyAnim, width: "20px", height: "20px" })))))) : null,
333
- serviceItem.is_change_ticket && (React.createElement("div", { className: "flex items-center" },
334
- React.createElement("div", { className: "relative group cursor-default" },
99
+ isCiva ? (React.createElement("div", { className: "black-text min-[420]:text-[12px] text-[12px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details[2])) : showRating ? (React.createElement("div", { className: "flex min-[420]:text-[13px] text-[12px] items-center" },
100
+ React.createElement("div", { className: "flex items-center" },
335
101
  React.createElement("div", { className: "flex items-center" },
336
- React.createElement("div", { className: `mr-[5px] ${isSoldOut ? "grayscale" : ""}` },
337
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.flexibleAnim, width: "20px", height: "20px" })))))),
338
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled) && (React.createElement("div", { className: "flex items-center mr-[10px]" },
339
- React.createElement("div", { className: `h-auto mr-[4px] min-[420]:text-[13px] text-[11px] text-[#464647] ${isSoldOut ? "grayscale" : ""}` },
340
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.locationAnim, width: "20px", height: "20px" })))),
341
- (serviceItem.is_change_ticket || isPetSeat) && (React.createElement("img", { src: serviceItem.icons.plus, alt: "icon", width: 11 })))))),
102
+ React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
103
+ React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
104
+ React.createElement("div", { className: "flex items-center cursor-pointer ", style: { color: isSoldOut ? "#bbb" : "text-[#464647]" } },
105
+ React.createElement("span", { className: "ml-[3px] min-[420]:text-[13px] text-[12px]" }, serviceItem.operator_details[2]))))) : null),
106
+ showLastSeats ? (React.createElement("div", { className: "flex justify-end " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
107
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[10px] text-[#464647] text-center" }, "\u00A1 \u00DAltimos Asientos!")))) : null),
108
+ React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, destinationIcon: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.destination, travelDate: serviceItem.travel_date, arrivalDate: serviceItem.arrival_date, depTime: serviceItem.dep_time, arrTime: serviceItem.arr_time, seatTypes: serviceItem.seat_types, seatPriceColor: colors.seatPriceColor, currencySign: currencySign, availableSeats: serviceItem.available_seats, removeDuplicateSeats: removeDuplicateSeats }),
109
+ React.createElement("div", { className: "bg-[#E6E6E6] mt-[10px] mb-[10px] h-[1px]" }),
110
+ React.createElement(BottomAmenitiesMobile, { isSoldOut: isSoldOut, amenitiesNodes: amenities(), hoursIcon: renderIcon("hours", "14px"), duration: (_c = serviceItem.duration) === null || _c === void 0 ? void 0 : _c.toString(), isDirectTrip: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip, directoColor: colors.directoColor, directoAnim: serviceItem.icons.directoAnim, isChangeTicket: serviceItem.is_change_ticket, isPetSeat: isPetSeat, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, flexibleAnim: serviceItem.icons.flexibleAnim, isTrackingEnabled: serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled, locationAnim: serviceItem.icons.locationAnim, downArrowIcon: serviceItem.icons.downArrow, showDropdown: showDropdown, setShowDropdown: setShowDropdown, onDropdownToggle: () => {
111
+ setShowDropdown(!showDropdown);
112
+ setAmenetiesAtomValue({
113
+ service: serviceItem,
114
+ showTopLabel: showTopLabel,
115
+ });
116
+ } })),
342
117
  (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-[35px] pt-[50px] z-10 rounded-b-[14px] min-[420]:text-[14px] text-[12px]`, style: {
343
118
  backgroundColor: isSoldOut ? "#ccc" : colors === null || colors === void 0 ? void 0 : colors.bottomStripColor,
344
119
  zIndex: -1,
@@ -348,28 +123,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
348
123
  } },
349
124
  React.createElement(LottiePlayer, { animationData: serviceItem.icons.promoAnim, width: "18px", height: "18px" }),
350
125
  React.createElement("span", { className: "ml-[10px] text-[#fff] min-[380px]:text-[11px] text-[10px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))),
351
- React.createElement("div", { className: "absolute -top-[14px] left-0 w-full flex items-center justify-end gap-[12px] pr-[20px] z-10 " },
352
- showTopLabel && (React.createElement("div", { className: `flex items-center gap-[2px] py-[5px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `, style: {
353
- backgroundColor: isSoldOut ? "#ccc" : colors.ratingBottomColor,
354
- } },
355
- React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
356
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.priorityStageAnim, width: "18px", height: "18px" })),
357
- React.createElement("div", { className: isSoldOut ? "text-[#bbb]" : `text-[${colors.topLabelColor}]` }, showTopLabel))),
358
- isConexion && (React.createElement("div", { className: `flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20 ${isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]`}`, style: {
359
- backgroundColor: !isSoldOut && colors.ratingBottomColor,
360
- } },
361
- renderIcon("airportIcon", "14px"),
362
- React.createElement("div", null, "Conexi\u00F3n"))),
363
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (React.createElement("div", { className: `flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `, style: {
364
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipBgColor,
365
- color: isSoldOut ? "#bbb" : colors.directoColor,
366
- } },
367
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.directoAnim, width: "16px", height: "16px" }),
368
- React.createElement("div", { className: "ml-[5px]" }, "Directo"))),
369
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" && (React.createElement("div", { className: `flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `, style: {
370
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
371
- } },
372
- React.createElement(LottiePlayer, { animationData: serviceItem.icons.directoAnim, width: "20px", height: "20px" }),
373
- React.createElement("div", null, "Tren Express")))))));
126
+ React.createElement("div", { className: "absolute -top-[14px] left-0 w-full flex items-center justify-end gap-[12px] pr-[20px] z-10 " }))));
374
127
  }
375
128
  export default ServiceItemMobile;
@@ -110,6 +110,9 @@ export interface MobileServiceItemProps {
110
110
  seatFallBackIcon: string;
111
111
  headPhoneIcon?: string;
112
112
  allowCancellationIcon?: string;
113
+ bombAnim?: string;
114
+ whiteBoardingIcon?: string;
115
+ downArrow?: string;
113
116
  [key: string]: string | Record<string, string | undefined> | undefined;
114
117
  };
115
118
  useLottieFor?: string[];
@@ -115,6 +115,9 @@ export interface ServiceItemProps {
115
115
  seatFallBackIcon: string;
116
116
  headPhoneIcon?: string;
117
117
  allowCancellationIcon?: string;
118
+ whiteBoardingIcon?: string;
119
+ bombJson?: string;
120
+ downArrow?: string;
118
121
  [key: string]: string | Record<string, string | undefined> | undefined;
119
122
  };
120
123
  useLottieFor?: string[];
@@ -190,7 +193,11 @@ export interface ServiceItemProps {
190
193
  petFriendlyAnim?: string;
191
194
  priorityStageAnim?: string;
192
195
  promoAnim?: string;
196
+ bombAnimation?: string;
193
197
  isPeru?: boolean;
194
198
  siteType?: "kupos" | "pullman" | "opsites" | "linatal";
195
199
  isAllinBus?: boolean;
200
+ isExpand?: any;
201
+ setIsExpand?: (value: any) => void;
202
+ coachKey?: number;
196
203
  }