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