@asdp/ferryui 0.1.22-dev.10665 → 0.1.22-dev.10685

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -292,6 +292,7 @@ var foundationColors = {
292
292
  "Foundation_Danger_error": "#FD3A3A"
293
293
  };
294
294
  var lightModeColors = {
295
+ "Neutral_Background_1_Hover": "#f5f5f5",
295
296
  "Neutral_Background_2_Hover": "#f0f0f0",
296
297
  "Neutral_Background_3_Pressed": "#d6d6d6",
297
298
  "Neutral_Foreground_Disabled_Rest": "#bdbdbd",
@@ -16847,10 +16848,13 @@ var CardStatusOrder = ({
16847
16848
  var DEFAULT_LABELS40 = {
16848
16849
  id: {
16849
16850
  title: "Rincian Harga",
16851
+ passengerDetailHeader: "Detail Penumpang",
16850
16852
  addonHeader: "Add On",
16853
+ departureFareHeader: "Tarif Keberangkatan",
16851
16854
  subTotalLabel: "Sub Tagihan",
16852
- totalTagihanLabel: "Total Tagihan",
16853
- ppnLabel: "PPN (Pajak Pertambahan Nilai) 11%",
16855
+ discountLabel: "Discount Reduksi",
16856
+ totalTagihanLabel: "Total Tagihan (Subtotal - Reduksi)",
16857
+ ppnLabel: "PPN 11%",
16854
16858
  ppnNote: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin",
16855
16859
  grandTotalLabel: "Total Pembayaran",
16856
16860
  currencyPrefix: "Rp.",
@@ -16859,10 +16863,13 @@ var DEFAULT_LABELS40 = {
16859
16863
  },
16860
16864
  en: {
16861
16865
  title: "Price Details",
16866
+ passengerDetailHeader: "Passenger Details",
16862
16867
  addonHeader: "Add On",
16868
+ departureFareHeader: "Departure Fare",
16863
16869
  subTotalLabel: "Sub Total",
16864
- totalTagihanLabel: "Total Bill",
16865
- ppnLabel: "VAT (Value Added Tax) 11%",
16870
+ discountLabel: "Discount Reduction",
16871
+ totalTagihanLabel: "Total Bill (Subtotal - Reduction)",
16872
+ ppnLabel: "VAT 11%",
16866
16873
  ppnNote: "*VAT 11% is charged for service fees and admin fees",
16867
16874
  grandTotalLabel: "Total Payment",
16868
16875
  currencyPrefix: "Rp.",
@@ -16883,24 +16890,26 @@ var useStyles42 = reactComponents.makeStyles({
16883
16890
  fontWeight: reactComponents.tokens.fontWeightSemibold
16884
16891
  }
16885
16892
  },
16893
+ cardScrollWrapper: {
16894
+ height: "500px",
16895
+ overflowY: "auto"
16896
+ },
16886
16897
  card: {
16887
16898
  backgroundColor: reactComponents.tokens.colorNeutralBackground1,
16888
- ...reactComponents.shorthands.border("1px", "solid", reactComponents.tokens.colorNeutralStroke2),
16889
- ...reactComponents.shorthands.padding(
16890
- reactComponents.tokens.spacingVerticalXXL,
16891
- reactComponents.tokens.spacingHorizontalXXL
16892
- ),
16893
- boxShadow: "none"
16899
+ ...reactComponents.shorthands.border("1px", "solid", reactComponents.tokens.colorNeutralStroke1),
16900
+ padding: reactComponents.tokens.spacingVerticalL,
16901
+ boxShadow: "none",
16902
+ borderRadius: reactComponents.tokens.borderRadiusXLarge
16894
16903
  },
16895
16904
  content: {
16896
16905
  display: "flex",
16897
16906
  flexDirection: "column",
16898
- gap: reactComponents.tokens.spacingVerticalL
16907
+ gap: reactComponents.tokens.spacingVerticalS
16899
16908
  },
16900
16909
  section: {
16901
16910
  display: "flex",
16902
16911
  flexDirection: "column",
16903
- gap: reactComponents.tokens.spacingVerticalS
16912
+ gap: reactComponents.tokens.spacingVerticalL
16904
16913
  },
16905
16914
  row: {
16906
16915
  display: "flex",
@@ -16965,13 +16974,13 @@ var useStyles42 = reactComponents.makeStyles({
16965
16974
  },
16966
16975
  grandTotalLabel: {
16967
16976
  color: "#D13438",
16968
- fontSize: reactComponents.tokens.fontSizeHero700,
16969
- fontWeight: reactComponents.tokens.fontWeightSemibold
16977
+ fontSize: reactComponents.tokens.fontSizeBase300,
16978
+ fontWeight: fontWeight.Medium
16970
16979
  },
16971
16980
  grandTotalValue: {
16972
16981
  color: "#D13438",
16973
- fontSize: reactComponents.tokens.fontSizeHero800,
16974
- fontWeight: reactComponents.tokens.fontWeightSemibold
16982
+ fontSize: reactComponents.tokens.fontSizeBase500,
16983
+ fontWeight: fontWeight.Medium
16975
16984
  },
16976
16985
  badge: {
16977
16986
  marginLeft: reactComponents.tokens.spacingHorizontalS,
@@ -16979,10 +16988,27 @@ var useStyles42 = reactComponents.makeStyles({
16979
16988
  color: "white"
16980
16989
  },
16981
16990
  divider: {
16982
- margin: `${reactComponents.tokens.spacingVerticalL} 0`
16991
+ // margin: `${tokens.spacingVerticalL} 0`,
16983
16992
  },
16984
16993
  closeButton: {
16985
16994
  color: reactComponents.tokens.colorNeutralForeground1
16995
+ },
16996
+ headerCard: {
16997
+ backgroundColor: lightModeColors.Neutral_Background_1_Hover,
16998
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
16999
+ gap: reactComponents.tokens.spacingVerticalMNudge,
17000
+ padding: reactComponents.tokens.spacingVerticalMNudge
17001
+ },
17002
+ badgeRoundTripLilac: {
17003
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
17004
+ border: `0px solid ${sharedColors.Shared_Lilac_Tint_40}`,
17005
+ backgroundColor: sharedColors.Shared_Lilac_Tint_60,
17006
+ color: sharedColors.Shared_Lilac_Primary
17007
+ },
17008
+ badgeRoundTripOrange: {
17009
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
17010
+ border: `0px solid ${reactComponents.tokens.colorStatusWarningForeground2}`,
17011
+ color: reactComponents.tokens.colorStatusWarningForeground2
16986
17012
  }
16987
17013
  });
16988
17014
  var ModalPriceDetail = ({
@@ -16990,15 +17016,67 @@ var ModalPriceDetail = ({
16990
17016
  labels,
16991
17017
  isOpen,
16992
17018
  onOpenChange,
17019
+ isRoundTrip = false,
17020
+ vesselType,
17021
+ vesselTypeColor,
16993
17022
  detailItems,
17023
+ departureItems = [],
16994
17024
  addonItems,
16995
17025
  subTotal,
17026
+ discountAmount = 0,
16996
17027
  taxAmount,
16997
17028
  grandTotal,
17029
+ headerInfo,
17030
+ roundTripHeaderInfo,
17031
+ roundTripDetailItems,
17032
+ roundTripDepartureItems,
17033
+ roundTripAddonItems,
17034
+ roundTripSubTotal,
17035
+ roundTripDiscountAmount,
17036
+ roundTripTaxAmount,
17037
+ roundTripGrandTotal,
16998
17038
  ...props
16999
17039
  }) => {
17000
17040
  const styles = useStyles42();
17001
17041
  const mergedLabels = { ...DEFAULT_LABELS40[language], ...labels };
17042
+ const locale = language === "id" ? "id-ID" : "en-US";
17043
+ const formatCurrency = (value) => `${mergedLabels.currencyCode} ${value.toLocaleString(locale)}`;
17044
+ const passengerItemsFromNested = detailItems.flatMap(
17045
+ (item) => item.list ?? []
17046
+ );
17047
+ const passengerItems = passengerItemsFromNested.length > 0 ? passengerItemsFromNested : detailItems;
17048
+ const finalDepartureItems = departureItems.length > 0 ? departureItems : detailItems;
17049
+ const roundTripDetailSource = roundTripDetailItems ?? detailItems;
17050
+ const roundTripPassengerItemsFromNested = roundTripDetailSource.flatMap(
17051
+ (item) => item.list ?? []
17052
+ );
17053
+ const roundTripPassengerItems = roundTripPassengerItemsFromNested.length > 0 ? roundTripPassengerItemsFromNested : roundTripDetailSource;
17054
+ const roundTripFinalDepartureItems = roundTripDepartureItems?.length ? roundTripDepartureItems : roundTripDetailSource;
17055
+ const roundTripAddonSource = roundTripAddonItems ?? addonItems;
17056
+ const totalTagihan = subTotal - discountAmount;
17057
+ const roundTripTotalTagihan = (roundTripSubTotal ?? subTotal) - (roundTripDiscountAmount ?? discountAmount);
17058
+ const modalHeaderInfo = {
17059
+ logoUrl: headerInfo?.logoUrl ?? "/assets/logo/asdp-default.svg",
17060
+ logoAlt: headerInfo?.logoAlt ?? "asdp",
17061
+ vesselName: headerInfo?.vesselName ?? "KMP PORTLINK",
17062
+ vesselType: vesselType ?? headerInfo?.vesselType ?? "Water Taxi",
17063
+ vesselTypeColor: vesselTypeColor ?? headerInfo?.vesselTypeColor ?? "#107C10",
17064
+ departureHarbor: headerInfo?.departureHarbor ?? "Merak, Banten",
17065
+ arrivalHarbor: headerInfo?.arrivalHarbor ?? "Bakauheni, Lampung",
17066
+ vehicleGroupLabel: headerInfo?.vehicleGroupLabel ?? "Golongan IV \u2022 Mobil Penumpang"
17067
+ };
17068
+ const roundTripModalHeaderInfo = {
17069
+ logoUrl: roundTripHeaderInfo?.logoUrl ?? modalHeaderInfo.logoUrl,
17070
+ logoAlt: roundTripHeaderInfo?.logoAlt ?? modalHeaderInfo.logoAlt,
17071
+ vesselName: roundTripHeaderInfo?.vesselName ?? modalHeaderInfo.vesselName,
17072
+ vesselType: roundTripHeaderInfo?.vesselType ?? modalHeaderInfo.vesselType,
17073
+ vesselTypeColor: roundTripHeaderInfo?.vesselTypeColor ?? modalHeaderInfo.vesselTypeColor,
17074
+ departureHarbor: roundTripHeaderInfo?.departureHarbor ?? modalHeaderInfo.departureHarbor,
17075
+ arrivalHarbor: roundTripHeaderInfo?.arrivalHarbor ?? modalHeaderInfo.arrivalHarbor,
17076
+ vehicleGroupLabel: roundTripHeaderInfo?.vehicleGroupLabel ?? modalHeaderInfo.vehicleGroupLabel
17077
+ };
17078
+ const roundTripTaxValue = roundTripTaxAmount ?? taxAmount;
17079
+ const roundTripGrandTotalValue = roundTripGrandTotal ?? grandTotal;
17002
17080
  return /* @__PURE__ */ jsxRuntime.jsx(
17003
17081
  reactComponents.Dialog,
17004
17082
  {
@@ -17027,111 +17105,460 @@ var ModalPriceDetail = ({
17027
17105
  ) })
17028
17106
  }
17029
17107
  ) }),
17030
- children: mergedLabels.title
17108
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { style: { fontWeight: fontWeight.Medium }, children: mergedLabels.title })
17031
17109
  }
17032
17110
  ),
17033
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.section, children: [
17034
- detailItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17035
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
17036
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
17037
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.vehicleTitle, children: item.label }),
17038
- item.badge && /* @__PURE__ */ jsxRuntime.jsx(
17039
- reactComponents.Badge,
17111
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogContent, { className: styles.content, children: [
17112
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.cardScrollWrapper, children: [
17113
+ !isRoundTrip && /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.section, children: [
17114
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.headerCard, children: [
17115
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
17116
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17117
+ "img",
17118
+ {
17119
+ src: modalHeaderInfo.logoUrl,
17120
+ width: 35,
17121
+ height: 24,
17122
+ alt: modalHeaderInfo.logoAlt
17123
+ }
17124
+ ) }),
17125
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(
17126
+ reactComponents.Subtitle2,
17127
+ {
17128
+ style: { fontWeight: fontWeight.Medium },
17129
+ children: modalHeaderInfo.vesselName
17130
+ }
17131
+ ) }),
17132
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17133
+ reactComponents.Badge,
17134
+ {
17135
+ size: "medium",
17136
+ appearance: "filled",
17137
+ iconPosition: "before",
17138
+ shape: "rounded",
17139
+ style: {
17140
+ backgroundColor: modalHeaderInfo.vesselTypeColor,
17141
+ borderRadius: reactComponents.tokens.borderRadiusXLarge
17142
+ },
17143
+ children: modalHeaderInfo.vesselType
17144
+ }
17145
+ ) })
17146
+ ] }) }),
17147
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(
17148
+ reactGridSystem.Row,
17040
17149
  {
17041
- size: "medium",
17042
- shape: "rounded",
17043
- className: styles.badge,
17044
- children: item.badge
17150
+ nogutter: true,
17151
+ align: "center",
17152
+ style: { gap: reactComponents.tokens.spacingHorizontalSNudge },
17153
+ children: [
17154
+ /* @__PURE__ */ jsxRuntime.jsx(
17155
+ reactComponents.Body1Stronger,
17156
+ {
17157
+ style: {
17158
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17159
+ },
17160
+ children: modalHeaderInfo.departureHarbor
17161
+ }
17162
+ ),
17163
+ /* @__PURE__ */ jsxRuntime.jsx(reactIcons.ArrowRightRegular, {}),
17164
+ /* @__PURE__ */ jsxRuntime.jsx(
17165
+ reactComponents.Body1Stronger,
17166
+ {
17167
+ style: {
17168
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17169
+ },
17170
+ children: modalHeaderInfo.arrivalHarbor
17171
+ }
17172
+ )
17173
+ ]
17045
17174
  }
17046
- )
17175
+ ) }),
17176
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
17177
+ reactComponents.Body1,
17178
+ {
17179
+ style: { color: reactComponents.tokens.colorNeutralStrokeAccessible },
17180
+ children: modalHeaderInfo.vehicleGroupLabel
17181
+ }
17182
+ ) })
17047
17183
  ] }),
17048
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.priceValue, children: [
17049
- mergedLabels.currencyPrefix,
17050
- " ",
17051
- item.price.toLocaleString(
17052
- language === "id" ? "id-ID" : "en-US"
17053
- )
17184
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalMNudge }, children: [
17185
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17186
+ passengerItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17187
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17188
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17189
+ ] }) }, item.key))
17190
+ ] }),
17191
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
17192
+ addonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17193
+ /* @__PURE__ */ jsxRuntime.jsxs(
17194
+ reactGridSystem.Row,
17195
+ {
17196
+ nogutter: true,
17197
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17198
+ children: [
17199
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.addonHeader }) }),
17200
+ addonItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17201
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17202
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17203
+ ] }) }, item.key))
17204
+ ]
17205
+ }
17206
+ ),
17207
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
17208
+ ] }),
17209
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalMNudge }, children: [
17210
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17211
+ finalDepartureItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17212
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17213
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17214
+ ] }) }, item.key))
17215
+ ] }),
17216
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
17217
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17218
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: mergedLabels.subTotalLabel }),
17219
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: formatCurrency(subTotal) })
17220
+ ] }),
17221
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalS }, children: [
17222
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17223
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.discountLabel }),
17224
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
17225
+ "(-) ",
17226
+ formatCurrency(discountAmount)
17227
+ ] })
17228
+ ] }) }),
17229
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17230
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.totalTagihanLabel }),
17231
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(totalTagihan) })
17232
+ ] }) }),
17233
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17234
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.ppnLabel }),
17235
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(taxAmount) })
17236
+ ] }) })
17054
17237
  ] })
17055
- ] }),
17056
- item.list && item.list.map((subItem) => /* @__PURE__ */ jsxRuntime.jsxs(
17057
- "div",
17058
- {
17059
- className: styles.passengerDetail,
17060
- children: [
17061
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.label }),
17062
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { float: "right" }, children: [
17063
- mergedLabels.currencyCode,
17064
- " ",
17065
- item.price.toLocaleString(
17066
- language === "id" ? "id-ID" : "en-US"
17238
+ ] }) }),
17239
+ isRoundTrip && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17240
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.section, children: [
17241
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.headerCard, children: [
17242
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
17243
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17244
+ "img",
17245
+ {
17246
+ src: roundTripModalHeaderInfo.logoUrl,
17247
+ width: 35,
17248
+ height: 24,
17249
+ alt: roundTripModalHeaderInfo.logoAlt
17250
+ }
17251
+ ) }),
17252
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(
17253
+ reactComponents.Subtitle2,
17254
+ {
17255
+ style: { fontWeight: fontWeight.Medium },
17256
+ children: roundTripModalHeaderInfo.vesselName
17257
+ }
17258
+ ) }),
17259
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17260
+ reactComponents.Badge,
17261
+ {
17262
+ size: "medium",
17263
+ appearance: "filled",
17264
+ iconPosition: "before",
17265
+ shape: "rounded",
17266
+ style: {
17267
+ backgroundColor: roundTripModalHeaderInfo.vesselTypeColor,
17268
+ borderRadius: reactComponents.tokens.borderRadiusXLarge
17269
+ },
17270
+ children: roundTripModalHeaderInfo.vesselType
17271
+ }
17272
+ ) })
17273
+ ] }) }),
17274
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(
17275
+ reactGridSystem.Row,
17276
+ {
17277
+ nogutter: true,
17278
+ align: "center",
17279
+ style: { gap: reactComponents.tokens.spacingHorizontalSNudge },
17280
+ children: [
17281
+ /* @__PURE__ */ jsxRuntime.jsx(
17282
+ reactComponents.Body1Stronger,
17283
+ {
17284
+ style: {
17285
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17286
+ },
17287
+ children: roundTripModalHeaderInfo.departureHarbor
17288
+ }
17289
+ ),
17290
+ /* @__PURE__ */ jsxRuntime.jsx(reactIcons.ArrowRightRegular, {}),
17291
+ /* @__PURE__ */ jsxRuntime.jsx(
17292
+ reactComponents.Body1Stronger,
17293
+ {
17294
+ style: {
17295
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17296
+ },
17297
+ children: roundTripModalHeaderInfo.arrivalHarbor
17298
+ }
17299
+ )
17300
+ ]
17301
+ }
17302
+ ) }),
17303
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
17304
+ reactComponents.Body1,
17305
+ {
17306
+ style: {
17307
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17308
+ },
17309
+ children: roundTripModalHeaderInfo.vehicleGroupLabel
17310
+ }
17311
+ ) })
17312
+ ] }),
17313
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { nogutter: true, children: /* @__PURE__ */ jsxRuntime.jsx(
17314
+ reactComponents.Badge,
17315
+ {
17316
+ size: "extra-large",
17317
+ appearance: "tint",
17318
+ shape: "circular",
17319
+ className: styles.badgeRoundTripLilac,
17320
+ children: "Pulang Pergi (Keberangkatan)"
17321
+ }
17322
+ ) }),
17323
+ /* @__PURE__ */ jsxRuntime.jsxs(
17324
+ reactGridSystem.Row,
17325
+ {
17326
+ nogutter: true,
17327
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17328
+ children: [
17329
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17330
+ roundTripPassengerItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17331
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17332
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17333
+ ] }) }, item.key))
17334
+ ]
17335
+ }
17336
+ ),
17337
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
17338
+ addonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17339
+ /* @__PURE__ */ jsxRuntime.jsxs(
17340
+ reactGridSystem.Row,
17341
+ {
17342
+ nogutter: true,
17343
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17344
+ children: [
17345
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.addonHeader }) }),
17346
+ addonItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17347
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17348
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17349
+ ] }) }, item.key))
17350
+ ]
17351
+ }
17352
+ ),
17353
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
17354
+ ] }),
17355
+ /* @__PURE__ */ jsxRuntime.jsxs(
17356
+ reactGridSystem.Row,
17357
+ {
17358
+ nogutter: true,
17359
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17360
+ children: [
17361
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17362
+ finalDepartureItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17363
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17364
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17365
+ ] }) }, item.key))
17366
+ ]
17367
+ }
17368
+ )
17369
+ ] }) }),
17370
+ /* @__PURE__ */ jsxRuntime.jsx(
17371
+ reactComponents.Card,
17372
+ {
17373
+ className: styles.card,
17374
+ style: { marginTop: reactComponents.tokens.spacingVerticalL },
17375
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.section, children: [
17376
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.headerCard, children: [
17377
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
17378
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17379
+ "img",
17380
+ {
17381
+ src: roundTripModalHeaderInfo.logoUrl,
17382
+ width: 35,
17383
+ height: 24,
17384
+ alt: roundTripModalHeaderInfo.logoAlt
17385
+ }
17386
+ ) }),
17387
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(
17388
+ reactComponents.Subtitle2,
17389
+ {
17390
+ style: { fontWeight: fontWeight.Medium },
17391
+ children: roundTripModalHeaderInfo.vesselName
17392
+ }
17393
+ ) }),
17394
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
17395
+ reactComponents.Badge,
17396
+ {
17397
+ size: "medium",
17398
+ appearance: "filled",
17399
+ iconPosition: "before",
17400
+ shape: "rounded",
17401
+ style: {
17402
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
17403
+ backgroundColor: roundTripModalHeaderInfo.vesselTypeColor
17404
+ },
17405
+ children: roundTripModalHeaderInfo.vesselType
17406
+ }
17407
+ ) })
17408
+ ] }) }),
17409
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(
17410
+ reactGridSystem.Row,
17411
+ {
17412
+ nogutter: true,
17413
+ align: "center",
17414
+ style: { gap: reactComponents.tokens.spacingHorizontalSNudge },
17415
+ children: [
17416
+ /* @__PURE__ */ jsxRuntime.jsx(
17417
+ reactComponents.Body1Stronger,
17418
+ {
17419
+ style: {
17420
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17421
+ },
17422
+ children: roundTripModalHeaderInfo.departureHarbor
17423
+ }
17424
+ ),
17425
+ /* @__PURE__ */ jsxRuntime.jsx(reactIcons.ArrowRightRegular, {}),
17426
+ /* @__PURE__ */ jsxRuntime.jsx(
17427
+ reactComponents.Body1Stronger,
17428
+ {
17429
+ style: {
17430
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17431
+ },
17432
+ children: roundTripModalHeaderInfo.arrivalHarbor
17433
+ }
17434
+ )
17435
+ ]
17436
+ }
17437
+ ) }),
17438
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
17439
+ reactComponents.Body1,
17440
+ {
17441
+ style: {
17442
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
17443
+ },
17444
+ children: roundTripModalHeaderInfo.vehicleGroupLabel
17445
+ }
17446
+ ) })
17447
+ ] }),
17448
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { nogutter: true, children: /* @__PURE__ */ jsxRuntime.jsx(
17449
+ reactComponents.Badge,
17450
+ {
17451
+ size: "extra-large",
17452
+ appearance: "outline",
17453
+ shape: "circular",
17454
+ color: "warning",
17455
+ className: styles.badgeRoundTripOrange,
17456
+ children: "Pulang Pergi (Kepulangan)"
17457
+ }
17458
+ ) }),
17459
+ /* @__PURE__ */ jsxRuntime.jsxs(
17460
+ reactGridSystem.Row,
17461
+ {
17462
+ nogutter: true,
17463
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17464
+ children: [
17465
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.passengerDetailHeader }) }),
17466
+ roundTripPassengerItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17467
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17468
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17469
+ ] }) }, item.key))
17470
+ ]
17471
+ }
17472
+ ),
17473
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
17474
+ roundTripAddonSource.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17475
+ /* @__PURE__ */ jsxRuntime.jsxs(
17476
+ reactGridSystem.Row,
17477
+ {
17478
+ nogutter: true,
17479
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17480
+ children: [
17481
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.addonHeader }) }),
17482
+ roundTripAddonSource.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17483
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17484
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17485
+ ] }) }, item.key))
17486
+ ]
17487
+ }
17488
+ ),
17489
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {})
17490
+ ] }),
17491
+ /* @__PURE__ */ jsxRuntime.jsxs(
17492
+ reactGridSystem.Row,
17493
+ {
17494
+ nogutter: true,
17495
+ style: { gap: reactComponents.tokens.spacingVerticalMNudge },
17496
+ children: [
17497
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: mergedLabels.departureFareHeader }) }),
17498
+ roundTripFinalDepartureItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17499
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.label }),
17500
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(item.price) })
17501
+ ] }) }, item.key))
17502
+ ]
17503
+ }
17067
17504
  )
17068
17505
  ] })
17069
- ]
17070
- },
17071
- subItem.key
17072
- ))
17073
- ] }, item.key)),
17074
- addonItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17075
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.addonHeader, children: mergedLabels.addonHeader }),
17076
- addonItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
17077
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.itemLabel, children: item.label }),
17078
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.priceValue, children: [
17079
- mergedLabels.currencyCode,
17080
- " ",
17081
- item.price.toLocaleString(
17082
- language === "id" ? "id-ID" : "en-US"
17083
- )
17084
- ] })
17085
- ] }, item.key))
17086
- ] }),
17087
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { className: styles.divider }),
17088
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
17089
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.totalLabel, children: mergedLabels.subTotalLabel }),
17090
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.totalValue, children: [
17091
- mergedLabels.currencyCode,
17092
- subTotal.toLocaleString(
17093
- language === "id" ? "id-ID" : "en-US"
17094
- )
17095
- ] })
17096
- ] }),
17097
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
17098
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.totalTagihanLabel, children: mergedLabels.totalTagihanLabel }),
17099
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.totalTagihanValue, children: [
17100
- mergedLabels.currencyCode,
17101
- subTotal.toLocaleString(
17102
- language === "id" ? "id-ID" : "en-US"
17506
+ }
17507
+ ),
17508
+ /* @__PURE__ */ jsxRuntime.jsxs(
17509
+ reactGridSystem.Row,
17510
+ {
17511
+ nogutter: true,
17512
+ style: {
17513
+ gap: reactComponents.tokens.spacingVerticalL,
17514
+ marginTop: reactComponents.tokens.spacingVerticalL
17515
+ },
17516
+ children: [
17517
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17518
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.subTotalLabel }),
17519
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(roundTripSubTotal ?? subTotal) })
17520
+ ] }) }),
17521
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
17522
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalS }, children: [
17523
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17524
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.discountLabel }),
17525
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
17526
+ "(-)",
17527
+ " ",
17528
+ formatCurrency(
17529
+ roundTripDiscountAmount ?? discountAmount
17530
+ )
17531
+ ] })
17532
+ ] }) }),
17533
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17534
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.totalTagihanLabel }),
17535
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(roundTripTotalTagihan) })
17536
+ ] }) }),
17537
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, justify: "between", children: [
17538
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: mergedLabels.ppnLabel }),
17539
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: formatCurrency(roundTripTaxValue) })
17540
+ ] }) })
17541
+ ] }) })
17542
+ ]
17543
+ }
17103
17544
  )
17104
17545
  ] })
17105
17546
  ] }),
17106
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: reactComponents.tokens.spacingVerticalL }, children: [
17107
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
17108
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.ppnLabel, children: mergedLabels.ppnLabel }),
17109
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.ppnValue, children: [
17110
- mergedLabels.currencyCode,
17111
- taxAmount.toLocaleString(
17112
- language === "id" ? "id-ID" : "en-US"
17113
- )
17114
- ] })
17115
- ] }),
17116
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.ppnNote, children: mergedLabels.ppnNote })
17117
- ] }),
17118
17547
  /* @__PURE__ */ jsxRuntime.jsxs(
17119
17548
  "div",
17120
17549
  {
17121
17550
  className: styles.row,
17122
17551
  style: { marginTop: reactComponents.tokens.spacingVerticalXXL },
17123
17552
  children: [
17124
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.grandTotalLabel, children: mergedLabels.grandTotalLabel }),
17125
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles.grandTotalValue, children: [
17553
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { className: styles.grandTotalLabel, children: mergedLabels.grandTotalLabel }),
17554
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle1, { className: styles.grandTotalValue, children: [
17126
17555
  mergedLabels.currencyPrefix,
17127
- grandTotal.toLocaleString(
17128
- language === "id" ? "id-ID" : "en-US"
17129
- )
17556
+ (isRoundTrip ? roundTripGrandTotalValue : grandTotal).toLocaleString(locale)
17130
17557
  ] })
17131
17558
  ]
17132
17559
  }
17133
17560
  )
17134
- ] }) }) })
17561
+ ] })
17135
17562
  ] }) })
17136
17563
  }
17137
17564
  );