@asdp/ferryui 0.1.22-dev.8463 → 0.1.22-dev.8523

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
@@ -12,6 +12,7 @@ var Select = require('react-select');
12
12
  var reactCalendarCompat = require('@fluentui/react-calendar-compat');
13
13
  var moment = require('moment');
14
14
  var reactRange = require('react-range');
15
+ var reactIcons = require('@fluentui/react-icons');
15
16
 
16
17
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
18
 
@@ -545,6 +546,7 @@ var sharedColors = {
545
546
  "Shared_Red_Primary": "#d13438",
546
547
  "Shared_Green_Primary": "#107c10"};
547
548
  var lightModeColors2 = {
549
+ "Neutral_Foreground_Disabled_Rest": "#bdbdbd",
548
550
  "Brand_Stroke_1_Rest": "#00B3BD"};
549
551
  var tokensV2_default = {
550
552
  lightModeColors: lightModeColors2};
@@ -6429,17 +6431,3331 @@ var ModalSearchTicket = ({
6429
6431
  }
6430
6432
  );
6431
6433
  };
6434
+ var useStyles18 = reactComponents.makeStyles({
6435
+ stepperWrapper: {
6436
+ position: "relative",
6437
+ width: "100%",
6438
+ maxWidth: "988px",
6439
+ margin: "0 auto",
6440
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6441
+ maxWidth: "100%"
6442
+ }
6443
+ },
6444
+ stepperContainer: {
6445
+ position: "relative",
6446
+ width: "100%",
6447
+ height: "78px",
6448
+ display: "flex",
6449
+ flexDirection: "column",
6450
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6451
+ height: "60px"
6452
+ }
6453
+ },
6454
+ stepperBackground: {
6455
+ position: "absolute",
6456
+ top: 0,
6457
+ left: 0,
6458
+ width: "100%",
6459
+ height: "100%",
6460
+ objectFit: "cover",
6461
+ zIndex: 0,
6462
+ pointerEvents: "none"
6463
+ },
6464
+ stepsRow: {
6465
+ position: "relative",
6466
+ display: "flex",
6467
+ alignItems: "center",
6468
+ justifyContent: "space-around",
6469
+ padding: "0 60px",
6470
+ height: "50%",
6471
+ zIndex: 2,
6472
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6473
+ padding: "0 30px"
6474
+ }
6475
+ },
6476
+ stepCircleWrapper: {
6477
+ display: "flex",
6478
+ flexDirection: "column",
6479
+ alignItems: "center",
6480
+ position: "relative",
6481
+ zIndex: 3
6482
+ },
6483
+ stepCircle: {
6484
+ width: "24px",
6485
+ height: "24px",
6486
+ borderRadius: "25%",
6487
+ display: "flex",
6488
+ alignItems: "center",
6489
+ justifyContent: "center",
6490
+ fontSize: "16px",
6491
+ fontWeight: "bold",
6492
+ transition: "all 0.3s ease",
6493
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6494
+ width: "16px",
6495
+ height: "16px",
6496
+ fontSize: "14px"
6497
+ }
6498
+ },
6499
+ stepCircleActive: {
6500
+ backgroundColor: "#FFFFFF",
6501
+ color: "#00AEEF",
6502
+ boxShadow: "0 2px 8px rgba(0, 174, 239, 0.3)"
6503
+ },
6504
+ stepCircleCompleted: {
6505
+ backgroundColor: "#8DC63F",
6506
+ color: "#FFFFFF",
6507
+ border: "none"
6508
+ },
6509
+ stepCircleInactive: {
6510
+ backgroundColor: "#FFFFFF",
6511
+ color: "#999999"
6512
+ },
6513
+ stepLabel: {
6514
+ position: "absolute",
6515
+ top: "50%",
6516
+ marginTop: "28px",
6517
+ left: "50%",
6518
+ transform: "translateX(-50%)",
6519
+ fontSize: "12px",
6520
+ fontWeight: "600",
6521
+ textAlign: "center",
6522
+ whiteSpace: "nowrap",
6523
+ color: "#FFFFFF",
6524
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6525
+ marginTop: "20px",
6526
+ fontSize: "9px"
6527
+ }
6528
+ },
6529
+ ferryIcon: {
6530
+ width: "40px",
6531
+ height: "40px",
6532
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6533
+ width: "30px",
6534
+ height: "30px"
6535
+ }
6536
+ },
6537
+ stepConnector: {
6538
+ flex: 1,
6539
+ height: "4px",
6540
+ backgroundColor: "#CCCCCC",
6541
+ margin: "0 8px",
6542
+ alignSelf: "center",
6543
+ [`@media (max-width: ${extendedTokens.breakpointMd})`]: {
6544
+ height: "3px",
6545
+ margin: "0 4px"
6546
+ }
6547
+ },
6548
+ stepConnectorCompleted: {
6549
+ backgroundColor: "#8DC63F"
6550
+ }
6551
+ });
6552
+ var Stepper = ({
6553
+ steps,
6554
+ currentStep,
6555
+ className
6556
+ }) => {
6557
+ const styles = useStyles18();
6558
+ const currentStepIndex = React5.useMemo(() => {
6559
+ if (typeof currentStep === "number") {
6560
+ return steps.findIndex((step) => step.number === currentStep);
6561
+ }
6562
+ return steps.findIndex((step) => step.id === currentStep);
6563
+ }, [steps, currentStep]);
6564
+ const activeStepNumber = React5.useMemo(() => {
6565
+ return currentStepIndex >= 0 ? steps[currentStepIndex].number : 1;
6566
+ }, [currentStepIndex, steps]);
6567
+ const getStepStatus = (stepNumber) => {
6568
+ if (stepNumber < activeStepNumber) return "completed";
6569
+ if (stepNumber === activeStepNumber) return "active";
6570
+ return "inactive";
6571
+ };
6572
+ const getCircleClass = (stepNumber) => {
6573
+ const status = getStepStatus(stepNumber);
6574
+ const baseClass = styles.stepCircle;
6575
+ if (status === "active") return `${baseClass} ${styles.stepCircleActive}`;
6576
+ if (status === "completed") return `${baseClass} ${styles.stepCircleCompleted}`;
6577
+ return `${baseClass} ${styles.stepCircleInactive}`;
6578
+ };
6579
+ const getConnectorClass = (currentStepNumber) => {
6580
+ if (currentStepNumber < activeStepNumber) {
6581
+ return `${styles.stepConnector} ${styles.stepConnectorCompleted}`;
6582
+ }
6583
+ return styles.stepConnector;
6584
+ };
6585
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: reactComponents.mergeClasses(styles.stepperWrapper, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.stepperContainer, children: [
6586
+ /* @__PURE__ */ jsxRuntime.jsx(
6587
+ "img",
6588
+ {
6589
+ src: "/assets/images/reservation/stepper_bg.svg",
6590
+ alt: "Stepper Background",
6591
+ className: styles.stepperBackground
6592
+ }
6593
+ ),
6594
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.stepsRow, children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs(React5.Fragment, { children: [
6595
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.stepCircleWrapper, children: [
6596
+ getStepStatus(step.number) === "active" ? /* @__PURE__ */ jsxRuntime.jsx(
6597
+ "img",
6598
+ {
6599
+ src: "/assets/images/reservation/ferry_step.svg",
6600
+ alt: "Ferry",
6601
+ className: styles.ferryIcon
6602
+ }
6603
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: getCircleClass(step.number), children: step.number }),
6604
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.stepLabel, children: step.label })
6605
+ ] }),
6606
+ index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: getConnectorClass(step.number) })
6607
+ ] }, step.id)) })
6608
+ ] }) });
6609
+ };
6610
+ var useStyles19 = reactComponents.makeStyles({
6611
+ card: {
6612
+ padding: "1.5rem",
6613
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
6614
+ boxShadow: reactComponents.tokens.shadow4,
6615
+ zIndex: 3
6616
+ },
6617
+ container: {
6618
+ display: "flex",
6619
+ justifyContent: "space-between",
6620
+ marginTop: "1rem"
6621
+ },
6622
+ fieldGroup: {
6623
+ display: "flex",
6624
+ flexDirection: "column",
6625
+ gap: "0.25rem"
6626
+ },
6627
+ label: {
6628
+ color: reactComponents.tokens.colorNeutralForeground2
6629
+ },
6630
+ value: {
6631
+ color: tokensV2_default.lightModeColors.Neutral_Foreground_Disabled_Rest
6632
+ }
6633
+ });
6634
+ var CardOrdererInfo = ({
6635
+ orderer,
6636
+ className
6637
+ }) => {
6638
+ const styles = useStyles19();
6639
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: className || styles.card, children: [
6640
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { children: "Informasi Pemesan" }),
6641
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.container, children: [
6642
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.fieldGroup, children: [
6643
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: styles.label, children: "Nama Pemesan" }),
6644
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.value, children: orderer?.name || "-" })
6645
+ ] }),
6646
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.fieldGroup, children: [
6647
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: styles.label, children: "Nomor Handphone" }),
6648
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.value, children: orderer?.phoneNumber || "-" })
6649
+ ] }),
6650
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.fieldGroup, children: [
6651
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: styles.label, children: "Email" }),
6652
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.value, children: orderer?.email || "-" })
6653
+ ] })
6654
+ ] })
6655
+ ] });
6656
+ };
6657
+ var useStyles20 = reactComponents.makeStyles({
6658
+ dialogSurface: {
6659
+ maxWidth: "600px",
6660
+ width: "100%",
6661
+ borderRadius: reactComponents.tokens.borderRadiusXLarge
6662
+ },
6663
+ content: {
6664
+ display: "flex",
6665
+ flexDirection: "column",
6666
+ gap: "1.5rem",
6667
+ padding: "1.5rem"
6668
+ },
6669
+ searchInput: {
6670
+ width: "100%"
6671
+ },
6672
+ passengerList: {
6673
+ display: "flex",
6674
+ flexDirection: "column",
6675
+ gap: "0.5rem"
6676
+ },
6677
+ passengerItem: {
6678
+ display: "flex",
6679
+ alignItems: "center",
6680
+ justifyContent: "space-between",
6681
+ padding: "1rem",
6682
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
6683
+ border: `1px solid ${reactComponents.tokens.colorNeutralStroke2}`,
6684
+ cursor: "pointer",
6685
+ transition: "all 0.2s ease",
6686
+ ":hover": {
6687
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1Hover
6688
+ }
6689
+ },
6690
+ actions: {
6691
+ display: "flex",
6692
+ gap: "1rem",
6693
+ justifyContent: "flex-end",
6694
+ marginTop: "1rem"
6695
+ }
6696
+ });
6697
+ var ModalListPassenger = ({
6698
+ open,
6699
+ onClose,
6700
+ title = "Detail Penumpang",
6701
+ passengers,
6702
+ searchQuery,
6703
+ onSearchChange,
6704
+ onSelectPassenger,
6705
+ onEditPassenger,
6706
+ onAddPassenger,
6707
+ sameAsOrderer,
6708
+ onSameAsOrdererChange
6709
+ }) => {
6710
+ const styles = useStyles20();
6711
+ const handleClose = () => {
6712
+ onClose();
6713
+ onSearchChange("");
6714
+ };
6715
+ const handleSelectPassenger = (passenger) => {
6716
+ onSelectPassenger(passenger);
6717
+ handleClose();
6718
+ };
6719
+ const filteredPassengers = passengers.filter((passenger) => {
6720
+ if (!searchQuery) return true;
6721
+ const query = searchQuery.toLowerCase();
6722
+ return passenger.name?.toLowerCase().includes(query) || passenger.category?.toLowerCase().includes(query);
6723
+ });
6724
+ return /* @__PURE__ */ jsxRuntime.jsx(
6725
+ reactComponents.Dialog,
6726
+ {
6727
+ open,
6728
+ onOpenChange: (_, data) => {
6729
+ if (!data.open) {
6730
+ handleClose();
6731
+ }
6732
+ },
6733
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogBody, { children: [
6734
+ /* @__PURE__ */ jsxRuntime.jsx(
6735
+ reactComponents.DialogTitle,
6736
+ {
6737
+ action: /* @__PURE__ */ jsxRuntime.jsx(
6738
+ reactComponents.Switch,
6739
+ {
6740
+ label: "Sama Dengan Pemesan",
6741
+ checked: sameAsOrderer,
6742
+ onChange: (_, data) => onSameAsOrdererChange(data.checked)
6743
+ }
6744
+ ),
6745
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: title })
6746
+ }
6747
+ ),
6748
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogContent, { className: styles.content, children: [
6749
+ /* @__PURE__ */ jsxRuntime.jsx(
6750
+ reactComponents.Input,
6751
+ {
6752
+ className: styles.searchInput,
6753
+ contentBefore: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:search-24-regular" }),
6754
+ placeholder: "Cari Penumpang",
6755
+ value: searchQuery,
6756
+ onChange: (_, data) => onSearchChange(data.value),
6757
+ size: "large"
6758
+ }
6759
+ ),
6760
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.passengerList, children: filteredPassengers.map((passenger, index) => /* @__PURE__ */ jsxRuntime.jsxs(
6761
+ "div",
6762
+ {
6763
+ className: styles.passengerItem,
6764
+ onClick: () => handleSelectPassenger(passenger),
6765
+ role: "button",
6766
+ tabIndex: 0,
6767
+ onKeyDown: (e) => {
6768
+ if (e.key === "Enter" || e.key === " ") {
6769
+ e.preventDefault();
6770
+ handleSelectPassenger(passenger);
6771
+ }
6772
+ },
6773
+ children: [
6774
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle2, { children: [
6775
+ passenger.name,
6776
+ " (",
6777
+ passenger.category,
6778
+ ")"
6779
+ ] }) }),
6780
+ /* @__PURE__ */ jsxRuntime.jsx(
6781
+ react.Icon,
6782
+ {
6783
+ icon: "fluent:chevron-right-24-regular",
6784
+ onClick: (e) => {
6785
+ e.preventDefault();
6786
+ e.stopPropagation();
6787
+ onEditPassenger(passenger);
6788
+ },
6789
+ width: 20,
6790
+ height: 20
6791
+ }
6792
+ )
6793
+ ]
6794
+ },
6795
+ passenger.id || `passenger-${index}`
6796
+ )) }),
6797
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.actions, children: [
6798
+ /* @__PURE__ */ jsxRuntime.jsx(
6799
+ reactComponents.Button,
6800
+ {
6801
+ appearance: "primary",
6802
+ size: "large",
6803
+ shape: "circular",
6804
+ onClick: onAddPassenger,
6805
+ children: "Tambah Penumpang"
6806
+ }
6807
+ ),
6808
+ /* @__PURE__ */ jsxRuntime.jsx(
6809
+ reactComponents.Button,
6810
+ {
6811
+ appearance: "secondary",
6812
+ size: "large",
6813
+ shape: "circular",
6814
+ onClick: handleClose,
6815
+ children: "Batal"
6816
+ }
6817
+ )
6818
+ ] })
6819
+ ] })
6820
+ ] }) })
6821
+ }
6822
+ );
6823
+ };
6824
+ var useStyles21 = reactComponents.makeStyles({
6825
+ dialogSurface: {
6826
+ maxWidth: "600px",
6827
+ width: "100%",
6828
+ borderRadius: reactComponents.tokens.borderRadiusXLarge
6829
+ },
6830
+ content: {
6831
+ display: "flex",
6832
+ flexDirection: "column",
6833
+ gap: "1.5rem"
6834
+ },
6835
+ actions: {
6836
+ display: "flex",
6837
+ gap: "1rem",
6838
+ justifyContent: "flex-end",
6839
+ marginTop: "1rem"
6840
+ }
6841
+ });
6842
+ var ModalPassengerForm = ({
6843
+ open,
6844
+ onClose,
6845
+ title = "Detail Penumpang",
6846
+ onSubmit,
6847
+ defaultValues,
6848
+ isAdultForm = true,
6849
+ titleOptions,
6850
+ idTypeOptions,
6851
+ cityOptions,
6852
+ ticketClassOptions
6853
+ }) => {
6854
+ const styles = useStyles21();
6855
+ const { control, handleSubmit, reset } = reactHookForm.useForm({
6856
+ defaultValues
6857
+ });
6858
+ React5.useEffect(() => {
6859
+ reset(defaultValues);
6860
+ }, [defaultValues, reset]);
6861
+ const handleFormSubmit = (data) => {
6862
+ onSubmit(data);
6863
+ reset();
6864
+ };
6865
+ const handleClose = () => {
6866
+ onClose();
6867
+ reset();
6868
+ };
6869
+ return /* @__PURE__ */ jsxRuntime.jsx(
6870
+ reactComponents.Dialog,
6871
+ {
6872
+ open,
6873
+ onOpenChange: (_, data) => {
6874
+ if (!data.open) {
6875
+ handleClose();
6876
+ }
6877
+ },
6878
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogBody, { children: [
6879
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogTitle, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: title }) }),
6880
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit(handleFormSubmit), children: [
6881
+ /* @__PURE__ */ jsxRuntime.jsx(
6882
+ InputDynamic_default,
6883
+ {
6884
+ name: "title",
6885
+ control,
6886
+ type: "select",
6887
+ label: "Title",
6888
+ placeholder: "Pilih",
6889
+ options: titleOptions,
6890
+ size: "large",
6891
+ required: true,
6892
+ validationRules: {
6893
+ required: "Title harus dipilih"
6894
+ }
6895
+ }
6896
+ ),
6897
+ /* @__PURE__ */ jsxRuntime.jsx(
6898
+ InputDynamic_default,
6899
+ {
6900
+ name: "name",
6901
+ control,
6902
+ type: "text",
6903
+ label: "Nama Lengkap",
6904
+ placeholder: "Masukkan Nama",
6905
+ size: "large",
6906
+ required: true,
6907
+ validationRules: {
6908
+ required: "Nama lengkap harus diisi",
6909
+ minLength: {
6910
+ value: 3,
6911
+ message: "Nama minimal 3 karakter"
6912
+ }
6913
+ }
6914
+ }
6915
+ ),
6916
+ isAdultForm ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6917
+ /* @__PURE__ */ jsxRuntime.jsx(
6918
+ InputDynamic_default,
6919
+ {
6920
+ name: "idType",
6921
+ control,
6922
+ type: "select",
6923
+ label: "Jenis ID",
6924
+ placeholder: "Pilih",
6925
+ options: idTypeOptions,
6926
+ size: "large",
6927
+ required: true,
6928
+ validationRules: {
6929
+ required: "Jenis ID harus dipilih"
6930
+ }
6931
+ }
6932
+ ),
6933
+ /* @__PURE__ */ jsxRuntime.jsx(
6934
+ InputDynamic_default,
6935
+ {
6936
+ name: "idNumber",
6937
+ control,
6938
+ type: "text",
6939
+ label: "Nomor Identitas",
6940
+ placeholder: "Masukkan Nomor Identitas",
6941
+ size: "large",
6942
+ required: true,
6943
+ validationRules: {
6944
+ required: "Nomor identitas harus diisi",
6945
+ minLength: {
6946
+ value: 6,
6947
+ message: "Nomor identitas minimal 6 karakter"
6948
+ }
6949
+ }
6950
+ }
6951
+ ),
6952
+ /* @__PURE__ */ jsxRuntime.jsx(
6953
+ InputDynamic_default,
6954
+ {
6955
+ name: "age",
6956
+ control,
6957
+ type: "number",
6958
+ label: "Usia",
6959
+ placeholder: "Masukkan Usia",
6960
+ size: "large",
6961
+ required: true,
6962
+ validationRules: {
6963
+ required: "Usia harus diisi",
6964
+ min: {
6965
+ value: 1,
6966
+ message: "Usia minimal 1 tahun"
6967
+ },
6968
+ max: {
6969
+ value: 150,
6970
+ message: "Usia maksimal 150 tahun"
6971
+ }
6972
+ }
6973
+ }
6974
+ )
6975
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
6976
+ InputDynamic_default,
6977
+ {
6978
+ name: "date",
6979
+ control,
6980
+ type: "date",
6981
+ label: "Tanggal Lahir",
6982
+ placeholder: "Masukkan Tanggal Lahir",
6983
+ size: "large",
6984
+ required: true,
6985
+ validationRules: {
6986
+ required: "Tanggal lahir harus diisi"
6987
+ }
6988
+ }
6989
+ ) }),
6990
+ /* @__PURE__ */ jsxRuntime.jsx(
6991
+ InputDynamic_default,
6992
+ {
6993
+ name: "cityId",
6994
+ control,
6995
+ type: "select",
6996
+ label: "Kota Kabupaten",
6997
+ options: cityOptions,
6998
+ placeholder: "Masukkan Nama Kota/Kabupaten",
6999
+ size: "large",
7000
+ required: true,
7001
+ validationRules: {
7002
+ required: "Kota/Kabupaten harus diisi"
7003
+ }
7004
+ }
7005
+ ),
7006
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
7007
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
7008
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
7009
+ /* @__PURE__ */ jsxRuntime.jsx(
7010
+ InputDynamic_default,
7011
+ {
7012
+ name: "ticketClass",
7013
+ control,
7014
+ type: "radiobutton",
7015
+ label: "Kelas penumpang",
7016
+ options: ticketClassOptions,
7017
+ required: true,
7018
+ disabled: true
7019
+ }
7020
+ ),
7021
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.actions, children: [
7022
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Button, { appearance: "primary", size: "large", shape: "circular", type: "submit", children: "Simpan" }),
7023
+ /* @__PURE__ */ jsxRuntime.jsx(
7024
+ reactComponents.Button,
7025
+ {
7026
+ appearance: "secondary",
7027
+ size: "large",
7028
+ shape: "circular",
7029
+ type: "button",
7030
+ onClick: handleClose,
7031
+ children: "Batal"
7032
+ }
7033
+ )
7034
+ ] })
7035
+ ] }) })
7036
+ ] }) })
7037
+ }
7038
+ );
7039
+ };
7040
+ var getBadgeConfig = (ticketClass) => {
7041
+ const normalizedClass = ticketClass?.toUpperCase();
7042
+ switch (normalizedClass) {
7043
+ case "EKONOMI":
7044
+ case "ECONOMY":
7045
+ return {
7046
+ color: "#A74109",
7047
+ icon: "/assets/images/class/shield_badge_ekonomi.svg"
7048
+ };
7049
+ case "BISNIS":
7050
+ case "BUSINESS":
7051
+ return {
7052
+ color: "#859599",
7053
+ icon: "/assets/images/class/ribbon_badge_bisnis.svg"
7054
+ };
7055
+ case "EKSEKUTIF":
7056
+ case "EXECUTIVE":
7057
+ return {
7058
+ color: "#C19C00",
7059
+ icon: "/assets/images/class/crown_badge_eksekutif.svg"
7060
+ };
7061
+ default:
7062
+ return {
7063
+ color: reactComponents.tokens.colorNeutralBackground3,
7064
+ icon: ""
7065
+ };
7066
+ }
7067
+ };
7068
+ var useStyles22 = reactComponents.makeStyles({
7069
+ card: {
7070
+ padding: "1.5rem",
7071
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
7072
+ boxShadow: reactComponents.tokens.shadow4,
7073
+ zIndex: 3
7074
+ },
7075
+ headerContainer: {
7076
+ display: "flex",
7077
+ alignItems: "center",
7078
+ marginBottom: "1rem",
7079
+ gap: "1rem"
7080
+ },
7081
+ headerTitle: {
7082
+ whiteSpace: "nowrap"
7083
+ },
7084
+ headerLine: {
7085
+ height: "1px",
7086
+ flexGrow: 1,
7087
+ backgroundColor: reactComponents.tokens.colorNeutralStroke2
7088
+ },
7089
+ passengerList: {
7090
+ display: "flex",
7091
+ flexDirection: "column"
7092
+ },
7093
+ passengerItem: {
7094
+ display: "flex",
7095
+ alignItems: "center",
7096
+ justifyContent: "space-between",
7097
+ padding: "1rem 0",
7098
+ cursor: "pointer",
7099
+ borderBottom: `1px solid ${reactComponents.tokens.colorNeutralStroke2}`,
7100
+ ":last-child": {
7101
+ borderBottom: "none"
7102
+ },
7103
+ ":hover": {
7104
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1Hover,
7105
+ paddingLeft: "0.5rem",
7106
+ paddingRight: "0.5rem",
7107
+ margin: "0 -0.5rem"
7108
+ },
7109
+ transition: "all 0.2s ease"
7110
+ },
7111
+ passengerInfo: {
7112
+ display: "flex",
7113
+ alignItems: "center",
7114
+ gap: "0.75rem"
7115
+ },
7116
+ passengerText: {
7117
+ color: "#00B8D4"
7118
+ },
7119
+ badgeContainer: {
7120
+ display: "flex",
7121
+ alignItems: "center",
7122
+ position: "relative"
7123
+ },
7124
+ badgeContent: {
7125
+ display: "flex",
7126
+ alignItems: "center",
7127
+ padding: "0.25rem 0.75rem 0.25rem 1.5rem",
7128
+ borderTopRightRadius: "9999px",
7129
+ borderBottomRightRadius: "9999px",
7130
+ color: "white",
7131
+ fontSize: reactComponents.tokens.fontSizeBase200,
7132
+ fontWeight: reactComponents.tokens.fontWeightMedium,
7133
+ marginLeft: "-14px",
7134
+ minHeight: "24px"
7135
+ },
7136
+ badgeIcon: {
7137
+ width: "28px",
7138
+ height: "32px",
7139
+ zIndex: 1,
7140
+ filter: "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"
7141
+ }
7142
+ });
7143
+ var CardPassengerList = ({
7144
+ title = "Data Penumpang",
7145
+ passengers,
7146
+ onPassengerClick,
7147
+ className
7148
+ }) => {
7149
+ const styles = useStyles22();
7150
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: className || styles.card, children: [
7151
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerContainer, children: [
7152
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { className: styles.headerTitle, children: title }),
7153
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerLine })
7154
+ ] }),
7155
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.passengerList, children: passengers.map((passenger, index) => {
7156
+ const badgeConfig = getBadgeConfig(passenger.serviceName);
7157
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7158
+ "div",
7159
+ {
7160
+ className: styles.passengerItem,
7161
+ onClick: () => onPassengerClick(passenger),
7162
+ role: "button",
7163
+ tabIndex: 0,
7164
+ onKeyDown: (e) => {
7165
+ if (e.key === "Enter" || e.key === " ") {
7166
+ e.preventDefault();
7167
+ onPassengerClick(passenger);
7168
+ }
7169
+ },
7170
+ children: [
7171
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.passengerInfo, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle2, { className: styles.passengerText, children: [
7172
+ passenger.name || `Penumpang ${index + 1}`,
7173
+ " (",
7174
+ passenger.passengerType,
7175
+ ")"
7176
+ ] }) }),
7177
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "1rem" }, children: [
7178
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.badgeContainer, children: [
7179
+ badgeConfig.icon && /* @__PURE__ */ jsxRuntime.jsx(
7180
+ "img",
7181
+ {
7182
+ src: badgeConfig.icon,
7183
+ alt: passenger.serviceName,
7184
+ className: styles.badgeIcon
7185
+ }
7186
+ ),
7187
+ /* @__PURE__ */ jsxRuntime.jsx(
7188
+ "div",
7189
+ {
7190
+ className: styles.badgeContent,
7191
+ style: { backgroundColor: badgeConfig.color },
7192
+ children: passenger.serviceName
7193
+ }
7194
+ )
7195
+ ] }),
7196
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:chevron-right-24-regular", width: 20, height: 20 })
7197
+ ] })
7198
+ ]
7199
+ },
7200
+ passenger.id || `passenger-${index}`
7201
+ );
7202
+ }) })
7203
+ ] });
7204
+ };
7205
+ var useStyles23 = reactComponents.makeStyles({
7206
+ card: {
7207
+ padding: "1.5rem",
7208
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
7209
+ boxShadow: reactComponents.tokens.shadow4,
7210
+ zIndex: 3,
7211
+ width: "100%"
7212
+ },
7213
+ vehicleType: {
7214
+ display: "flex",
7215
+ alignItems: "center",
7216
+ gap: "0.75rem",
7217
+ marginTop: "1rem",
7218
+ marginBottom: "1.5rem"
7219
+ },
7220
+ radioGroup: {
7221
+ marginTop: "1rem"
7222
+ },
7223
+ question: {
7224
+ color: reactComponents.tokens.colorNeutralForeground1,
7225
+ marginBottom: "0.5rem"
7226
+ },
7227
+ headerTitle: {
7228
+ color: reactComponents.tokens.colorNeutralForeground3,
7229
+ fontWeight: "500",
7230
+ width: "250px"
7231
+ }
7232
+ });
7233
+ var CardVehicleDetail = ({
7234
+ serviceTitle,
7235
+ serviceImage,
7236
+ control,
7237
+ vehicleNumberName = "vehicleNumber",
7238
+ showLoadOption = false,
7239
+ hasLoad,
7240
+ onHasLoadChange
7241
+ }) => {
7242
+ const styles = useStyles23();
7243
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.card, children: [
7244
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7245
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.headerTitle, children: "Detail Kendaraan" }),
7246
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, marginLeft: "1rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) })
7247
+ ] }),
7248
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.vehicleType, children: [
7249
+ /* @__PURE__ */ jsxRuntime.jsx(
7250
+ "img",
7251
+ {
7252
+ alt: serviceTitle,
7253
+ src: serviceImage,
7254
+ height: 75,
7255
+ width: 75,
7256
+ style: { objectFit: "contain" }
7257
+ }
7258
+ ),
7259
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: serviceTitle })
7260
+ ] }),
7261
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.25rem" }, children: [
7262
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { style: { color: reactComponents.tokens.colorNeutralForeground1 }, children: "Nomor Kendaraan" }),
7263
+ /* @__PURE__ */ jsxRuntime.jsx(
7264
+ InputDynamic_default,
7265
+ {
7266
+ control,
7267
+ name: vehicleNumberName,
7268
+ placeholder: "Contoh: B1234CD",
7269
+ type: "text"
7270
+ }
7271
+ )
7272
+ ] }),
7273
+ showLoadOption && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.radioGroup, children: [
7274
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.question, children: "Apakah kendaraan membawa muatan?" }),
7275
+ /* @__PURE__ */ jsxRuntime.jsxs(
7276
+ reactComponents.RadioGroup,
7277
+ {
7278
+ value: hasLoad,
7279
+ onChange: (_, data) => onHasLoadChange?.(data.value),
7280
+ layout: "horizontal",
7281
+ children: [
7282
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "true", label: "Ya" }),
7283
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "false", label: "Tidak" })
7284
+ ]
7285
+ }
7286
+ )
7287
+ ] })
7288
+ ] });
7289
+ };
7290
+ var useStyles24 = reactComponents.makeStyles({
7291
+ card: {
7292
+ padding: "1.5rem",
7293
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
7294
+ boxShadow: reactComponents.tokens.shadow4,
7295
+ zIndex: 3,
7296
+ marginTop: "1.5rem"
7297
+ },
7298
+ header: {
7299
+ display: "flex",
7300
+ justifyContent: "space-between",
7301
+ alignItems: "center",
7302
+ marginBottom: "1rem"
7303
+ },
7304
+ accordion: {
7305
+ ...reactComponents.shorthands.border("1px", "solid", reactComponents.tokens.colorNeutralStroke1),
7306
+ borderRadius: reactComponents.tokens.borderRadiusLarge,
7307
+ marginTop: "1rem"
7308
+ },
7309
+ accordionHeader: {
7310
+ backgroundColor: reactComponents.tokens.colorNeutralBackground2
7311
+ },
7312
+ form: {
7313
+ display: "flex",
7314
+ flexDirection: "column",
7315
+ gap: "1rem",
7316
+ padding: "1rem"
7317
+ },
7318
+ label: {
7319
+ color: reactComponents.tokens.colorNeutralForeground2,
7320
+ marginBottom: "0.25rem",
7321
+ display: "block"
7322
+ },
7323
+ link: {
7324
+ color: reactComponents.tokens.colorBrandForeground1,
7325
+ textDecorationLine: "none",
7326
+ ":hover": {
7327
+ textDecorationLine: "underline"
7328
+ }
7329
+ }
7330
+ });
7331
+ var CardVehicleOwnerForm = ({
7332
+ owners,
7333
+ hasLoad,
7334
+ control,
7335
+ watch,
7336
+ setValue,
7337
+ getValues,
7338
+ onAddOwner,
7339
+ onDeleteOwner,
7340
+ onUpdateOwner,
7341
+ onAddCargo,
7342
+ onDeleteCargo,
7343
+ onUpdateCargoQuantity,
7344
+ companyOptions = [],
7345
+ cityOptions = []
7346
+ }) => {
7347
+ const styles = useStyles24();
7348
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.card, children: [
7349
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.header, children: [
7350
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
7351
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { style: { marginRight: "1rem" }, children: "Informasi Pemilik & Muatan" }),
7352
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { style: { flex: 1 } })
7353
+ ] }),
7354
+ /* @__PURE__ */ jsxRuntime.jsx(
7355
+ reactComponents.Button,
7356
+ {
7357
+ appearance: "transparent",
7358
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:add-24-regular" }),
7359
+ style: { color: reactComponents.tokens.colorNeutralForeground2 },
7360
+ onClick: onAddOwner,
7361
+ children: "Tambah Pemilik"
7362
+ }
7363
+ )
7364
+ ] }),
7365
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Accordion, { collapsible: true, defaultOpenItems: owners.map((o) => String(o.id)), multiple: true, children: owners.map((owner, index) => /* @__PURE__ */ jsxRuntime.jsxs(
7366
+ reactComponents.AccordionItem,
7367
+ {
7368
+ value: String(owner.id),
7369
+ className: styles.accordion,
7370
+ children: [
7371
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionHeader, { className: styles.accordionHeader, expandIconPosition: "end", children: /* @__PURE__ */ jsxRuntime.jsxs(
7372
+ "div",
7373
+ {
7374
+ style: {
7375
+ display: "flex",
7376
+ justifyContent: "space-between",
7377
+ alignItems: "center",
7378
+ width: "100%"
7379
+ },
7380
+ children: [
7381
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Strong, { children: [
7382
+ "Informasi Pemilik ",
7383
+ index + 1
7384
+ ] }),
7385
+ owners.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
7386
+ reactComponents.Button,
7387
+ {
7388
+ appearance: "transparent",
7389
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:delete-24-regular" }),
7390
+ onClick: (e) => {
7391
+ e.stopPropagation();
7392
+ onDeleteOwner(owner.id);
7393
+ },
7394
+ style: { color: reactComponents.tokens.colorPaletteRedForeground1 }
7395
+ }
7396
+ )
7397
+ ]
7398
+ }
7399
+ ) }),
7400
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.form, children: [
7401
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7402
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { lg: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Nama Pengirim" }) }),
7403
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { lg: 6, children: [
7404
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
7405
+ reactComponents.RadioGroup,
7406
+ {
7407
+ layout: "horizontal",
7408
+ value: owner.senderType,
7409
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7410
+ senderType: data.value
7411
+ }),
7412
+ children: [
7413
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perusahaan", label: "Perusahaan" }),
7414
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perseorangan", label: "Perseorangan" })
7415
+ ]
7416
+ }
7417
+ ) }),
7418
+ /* @__PURE__ */ jsxRuntime.jsx(
7419
+ InputDynamic_default,
7420
+ {
7421
+ control,
7422
+ name: `owners.${index}.senderName`,
7423
+ placeholder: owner.senderType === "Perusahaan" ? "Pilih Nama Perusahaan" : "Masukkan Nama Pengirim",
7424
+ size: "large",
7425
+ type: owner.senderType === "Perusahaan" ? "select" : "text",
7426
+ options: owner.senderType === "Perusahaan" ? companyOptions : []
7427
+ }
7428
+ )
7429
+ ] }),
7430
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { lg: 6, children: [
7431
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "1rem" } }),
7432
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7433
+ "Data Estimasi Berat Muatan dan Kendaraan (Ton)",
7434
+ " ",
7435
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7436
+ ] }),
7437
+ /* @__PURE__ */ jsxRuntime.jsx(
7438
+ InputDynamic_default,
7439
+ {
7440
+ control,
7441
+ name: `owners.${index}.estimatedWeight`,
7442
+ placeholder: "Masukkan Angka",
7443
+ size: "large",
7444
+ type: "number"
7445
+ }
7446
+ )
7447
+ ] })
7448
+ ] }),
7449
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7450
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7451
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Kota Asal" }),
7452
+ /* @__PURE__ */ jsxRuntime.jsx(
7453
+ InputDynamic_default,
7454
+ {
7455
+ control,
7456
+ name: `looseCargoOwners.${index}.originCity`,
7457
+ placeholder: "Pilih",
7458
+ type: "select",
7459
+ options: cityOptions
7460
+ }
7461
+ )
7462
+ ] }),
7463
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7464
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Kota Tujuan" }),
7465
+ /* @__PURE__ */ jsxRuntime.jsx(
7466
+ InputDynamic_default,
7467
+ {
7468
+ control,
7469
+ name: `looseCargoOwners.${index}.destinationCity`,
7470
+ placeholder: "Pilih",
7471
+ type: "select",
7472
+ options: cityOptions
7473
+ }
7474
+ )
7475
+ ] })
7476
+ ] }),
7477
+ hasLoad && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7478
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7479
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7480
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7481
+ "Nama Perusahaan Pemilik Barang ",
7482
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7483
+ ] }),
7484
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
7485
+ reactComponents.RadioGroup,
7486
+ {
7487
+ layout: "horizontal",
7488
+ value: owner.cargoOwnerType || "Perusahaan",
7489
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7490
+ cargoOwnerType: data.value
7491
+ }),
7492
+ children: [
7493
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perusahaan", label: "Perusahaan" }),
7494
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perseorangan", label: "Perseorangan" })
7495
+ ]
7496
+ }
7497
+ ) }),
7498
+ /* @__PURE__ */ jsxRuntime.jsx(
7499
+ InputDynamic_default,
7500
+ {
7501
+ control,
7502
+ name: `looseCargoOwners.${index}.cargoOwnerName`,
7503
+ placeholder: owner.cargoOwnerType === "Perusahaan" ? "Pilih Nama Perusahaan Pemilik Barang" : "Masukkan Nama Pemilik Barang",
7504
+ size: "large",
7505
+ type: owner.cargoOwnerType === "Perusahaan" ? "select" : "text",
7506
+ options: owner.cargoOwnerType === "Perusahaan" ? companyOptions : []
7507
+ }
7508
+ ),
7509
+ /* @__PURE__ */ jsxRuntime.jsx(
7510
+ reactComponents.Caption1,
7511
+ {
7512
+ style: {
7513
+ color: reactComponents.tokens.colorNeutralForeground3,
7514
+ marginTop: "0.25rem"
7515
+ },
7516
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7517
+ }
7518
+ )
7519
+ ] }),
7520
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7521
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7522
+ "Nama Perusahaan Logistik ",
7523
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7524
+ ] }),
7525
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
7526
+ reactComponents.RadioGroup,
7527
+ {
7528
+ layout: "horizontal",
7529
+ value: owner.logisticsCompanyType || "Perseorangan",
7530
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7531
+ logisticsCompanyType: data.value
7532
+ }),
7533
+ children: [
7534
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perusahaan", label: "Perusahaan" }),
7535
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perseorangan", label: "Perseorangan" })
7536
+ ]
7537
+ }
7538
+ ) }),
7539
+ /* @__PURE__ */ jsxRuntime.jsx(
7540
+ InputDynamic_default,
7541
+ {
7542
+ control,
7543
+ name: `looseCargoOwners.${index}.logisticsCompanyName`,
7544
+ placeholder: owner.logisticsCompanyType === "Perusahaan" ? "Pilih Nama Perusahaan Logistik" : "Masukkan Nama Logistik",
7545
+ size: "large",
7546
+ type: owner.logisticsCompanyType === "Perusahaan" ? "select" : "text",
7547
+ options: owner.logisticsCompanyType === "Perusahaan" ? companyOptions : []
7548
+ }
7549
+ ),
7550
+ /* @__PURE__ */ jsxRuntime.jsx(
7551
+ reactComponents.Caption1,
7552
+ {
7553
+ style: {
7554
+ color: reactComponents.tokens.colorNeutralForeground3,
7555
+ marginTop: "0.25rem"
7556
+ },
7557
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7558
+ }
7559
+ )
7560
+ ] })
7561
+ ] }),
7562
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7563
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, md: 12, lg: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Nama Perusahaan Penerima Barang" }) }),
7564
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7565
+ /* @__PURE__ */ jsxRuntime.jsxs(
7566
+ reactComponents.RadioGroup,
7567
+ {
7568
+ layout: "horizontal",
7569
+ value: owner.cargoReceiverType || "Perusahaan",
7570
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7571
+ cargoReceiverType: data.value
7572
+ }),
7573
+ children: [
7574
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perusahaan", label: "Perusahaan" }),
7575
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Radio, { value: "Perseorangan", label: "Perseorangan" })
7576
+ ]
7577
+ }
7578
+ ),
7579
+ /* @__PURE__ */ jsxRuntime.jsx(
7580
+ InputDynamic_default,
7581
+ {
7582
+ control,
7583
+ name: `looseCargoOwners.${index}.cargoReceiverName`,
7584
+ placeholder: owner.cargoReceiverType === "Perusahaan" ? "Pilih Nama Perusahaan Penerima Barang" : "Masukkan Nama Penerima Barang",
7585
+ size: "large",
7586
+ type: owner.cargoReceiverType === "Perusahaan" ? "select" : "text",
7587
+ options: owner.cargoReceiverType === "Perusahaan" ? companyOptions : []
7588
+ }
7589
+ ),
7590
+ /* @__PURE__ */ jsxRuntime.jsx(
7591
+ reactComponents.Caption1,
7592
+ {
7593
+ style: {
7594
+ color: reactComponents.tokens.colorNeutralForeground3,
7595
+ marginTop: "0.25rem"
7596
+ },
7597
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7598
+ }
7599
+ )
7600
+ ] }),
7601
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
7602
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: ".5rem" } }),
7603
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7604
+ "Berat Muatan dan Kendaraan (Ton)",
7605
+ " ",
7606
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7607
+ ] }),
7608
+ /* @__PURE__ */ jsxRuntime.jsx(
7609
+ InputDynamic_default,
7610
+ {
7611
+ control,
7612
+ name: `looseCargoOwners.${index}.cargoWeight`,
7613
+ placeholder: "Masukkan Angka",
7614
+ type: "number",
7615
+ size: "large"
7616
+ }
7617
+ )
7618
+ ] })
7619
+ ] }),
7620
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Daftar Muatan" }) }) }),
7621
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { xs: 12, children: [
7622
+ /* @__PURE__ */ jsxRuntime.jsx(
7623
+ reactComponents.Accordion,
7624
+ {
7625
+ collapsible: true,
7626
+ defaultOpenItems: owner.cargoItems?.map((cargo) => `cargo-${cargo.id}`) || [],
7627
+ multiple: true,
7628
+ children: owner.cargoItems?.map((cargo, cargoIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
7629
+ reactComponents.AccordionItem,
7630
+ {
7631
+ value: `cargo-${cargo.id}`,
7632
+ className: styles.accordion,
7633
+ children: [
7634
+ /* @__PURE__ */ jsxRuntime.jsx(
7635
+ reactComponents.AccordionHeader,
7636
+ {
7637
+ className: styles.accordionHeader,
7638
+ expandIconPosition: "end",
7639
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7640
+ "div",
7641
+ {
7642
+ style: {
7643
+ display: "flex",
7644
+ justifyContent: "space-between",
7645
+ alignItems: "center",
7646
+ width: "100%"
7647
+ },
7648
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Strong, { children: [
7649
+ "Muatan ",
7650
+ cargoIndex + 1
7651
+ ] })
7652
+ }
7653
+ )
7654
+ }
7655
+ ),
7656
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.form, children: [
7657
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7658
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
7659
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7660
+ "Data Komoditas ",
7661
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7662
+ ] }),
7663
+ /* @__PURE__ */ jsxRuntime.jsx(
7664
+ InputDynamic_default,
7665
+ {
7666
+ control,
7667
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.commodity`,
7668
+ placeholder: "Pilih",
7669
+ type: "select",
7670
+ options: []
7671
+ }
7672
+ ),
7673
+ /* @__PURE__ */ jsxRuntime.jsxs(
7674
+ reactComponents.Caption1,
7675
+ {
7676
+ style: {
7677
+ color: reactComponents.tokens.colorNeutralForeground3,
7678
+ marginTop: "0.25rem"
7679
+ },
7680
+ children: [
7681
+ "Pahami definisi, jenis dan contoh komoditas",
7682
+ " ",
7683
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: styles.link, children: "disini" })
7684
+ ]
7685
+ }
7686
+ )
7687
+ ] }),
7688
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
7689
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7690
+ "Data Jenis Muatan",
7691
+ " ",
7692
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7693
+ ] }),
7694
+ /* @__PURE__ */ jsxRuntime.jsx(
7695
+ InputDynamic_default,
7696
+ {
7697
+ control,
7698
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`,
7699
+ placeholder: "Pilih",
7700
+ type: "select",
7701
+ options: [
7702
+ { value: "karung", label: "Karung" },
7703
+ { value: "kg", label: "Kg" },
7704
+ { value: "ton", label: "Ton" },
7705
+ { value: "unit", label: "Unit" }
7706
+ ]
7707
+ }
7708
+ ),
7709
+ /* @__PURE__ */ jsxRuntime.jsx(
7710
+ reactComponents.Caption1,
7711
+ {
7712
+ style: {
7713
+ color: reactComponents.tokens.colorNeutralForeground3,
7714
+ marginTop: "0.25rem"
7715
+ },
7716
+ children: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.'
7717
+ }
7718
+ )
7719
+ ] }),
7720
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
7721
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Jumlah Muatan" }),
7722
+ /* @__PURE__ */ jsxRuntime.jsxs(
7723
+ "div",
7724
+ {
7725
+ style: {
7726
+ display: "flex",
7727
+ alignItems: "center",
7728
+ border: `1px solid ${reactComponents.tokens.colorNeutralStroke1}`,
7729
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
7730
+ height: "40px",
7731
+ padding: "0 12px",
7732
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1
7733
+ },
7734
+ children: [
7735
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
7736
+ /* @__PURE__ */ jsxRuntime.jsxs(
7737
+ "div",
7738
+ {
7739
+ style: {
7740
+ display: "flex",
7741
+ alignItems: "center",
7742
+ gap: "12px"
7743
+ },
7744
+ children: [
7745
+ /* @__PURE__ */ jsxRuntime.jsx(
7746
+ reactComponents.Button,
7747
+ {
7748
+ appearance: "transparent",
7749
+ icon: /* @__PURE__ */ jsxRuntime.jsx(
7750
+ react.Icon,
7751
+ {
7752
+ icon: "fluent:subtract-circle-24-regular",
7753
+ style: {
7754
+ fontSize: "24px",
7755
+ color: reactComponents.tokens.colorNeutralForeground4
7756
+ }
7757
+ }
7758
+ ),
7759
+ size: "small",
7760
+ onClick: () => {
7761
+ const currentVal = getValues(
7762
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
7763
+ ) || 0;
7764
+ const currentQty = Number(currentVal);
7765
+ if (currentQty > 0) {
7766
+ const newVal = currentQty - 1;
7767
+ setValue(
7768
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7769
+ newVal
7770
+ );
7771
+ onUpdateCargoQuantity(owner.id, cargo.id, newVal);
7772
+ }
7773
+ },
7774
+ style: { minWidth: "32px", padding: "0" }
7775
+ }
7776
+ ),
7777
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
7778
+ reactHookForm.Controller,
7779
+ {
7780
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7781
+ control,
7782
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
7783
+ "input",
7784
+ {
7785
+ ...field,
7786
+ type: "number",
7787
+ style: {
7788
+ border: "none",
7789
+ width: "100%",
7790
+ textAlign: "center",
7791
+ outline: "none",
7792
+ backgroundColor: "transparent",
7793
+ color: reactComponents.tokens.colorNeutralForeground1,
7794
+ fontSize: reactComponents.tokens.fontSizeBase400,
7795
+ fontFamily: reactComponents.tokens.fontFamilyBase
7796
+ },
7797
+ onWheel: (e) => e.target.blur()
7798
+ }
7799
+ )
7800
+ }
7801
+ ) }),
7802
+ /* @__PURE__ */ jsxRuntime.jsx(
7803
+ reactComponents.Button,
7804
+ {
7805
+ appearance: "transparent",
7806
+ icon: /* @__PURE__ */ jsxRuntime.jsx(
7807
+ react.Icon,
7808
+ {
7809
+ icon: "fluent:add-circle-24-regular",
7810
+ style: {
7811
+ fontSize: "24px",
7812
+ color: reactComponents.tokens.colorBrandStroke1
7813
+ }
7814
+ }
7815
+ ),
7816
+ size: "small",
7817
+ onClick: () => {
7818
+ const currentVal = getValues(
7819
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
7820
+ ) || 0;
7821
+ const currentQty = Number(currentVal);
7822
+ const newVal = currentQty + 1;
7823
+ setValue(
7824
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7825
+ newVal
7826
+ );
7827
+ onUpdateCargoQuantity(owner.id, cargo.id, newVal);
7828
+ },
7829
+ style: { minWidth: "32px", padding: "0" }
7830
+ }
7831
+ )
7832
+ ]
7833
+ }
7834
+ ),
7835
+ /* @__PURE__ */ jsxRuntime.jsx(
7836
+ "div",
7837
+ {
7838
+ style: {
7839
+ flex: 1,
7840
+ textAlign: "left",
7841
+ color: reactComponents.tokens.colorNeutralForeground1,
7842
+ fontSize: reactComponents.tokens.fontSizeBase300,
7843
+ paddingRight: "8px"
7844
+ },
7845
+ children: (() => {
7846
+ const type = watch(
7847
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`
7848
+ );
7849
+ if (type === "karung") return "Karung";
7850
+ if (type === "kg") return "Kg";
7851
+ if (type === "ton") return "Ton";
7852
+ if (type === "unit") return "Unit";
7853
+ return "";
7854
+ })()
7855
+ }
7856
+ )
7857
+ ]
7858
+ }
7859
+ )
7860
+ ] }),
7861
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 3, children: [
7862
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: "Harga" }),
7863
+ /* @__PURE__ */ jsxRuntime.jsx(
7864
+ InputDynamic_default,
7865
+ {
7866
+ control,
7867
+ name: `owners.${index}.price`,
7868
+ placeholder: "Rp. 0",
7869
+ disabled: true,
7870
+ size: "large",
7871
+ type: "text"
7872
+ }
7873
+ )
7874
+ ] })
7875
+ ] }),
7876
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
7877
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
7878
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7879
+ "Data Jenis Industri",
7880
+ " ",
7881
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7882
+ ] }),
7883
+ /* @__PURE__ */ jsxRuntime.jsx(
7884
+ InputDynamic_default,
7885
+ {
7886
+ control,
7887
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.industryType`,
7888
+ placeholder: "Pilih",
7889
+ type: "select",
7890
+ options: []
7891
+ }
7892
+ ),
7893
+ /* @__PURE__ */ jsxRuntime.jsx(
7894
+ reactComponents.Caption1,
7895
+ {
7896
+ style: {
7897
+ color: reactComponents.tokens.colorNeutralForeground3,
7898
+ marginTop: "0.25rem"
7899
+ },
7900
+ children: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.'
7901
+ }
7902
+ )
7903
+ ] }),
7904
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
7905
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
7906
+ "Kategori Muatan ",
7907
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
7908
+ ] }),
7909
+ /* @__PURE__ */ jsxRuntime.jsx(
7910
+ InputDynamic_default,
7911
+ {
7912
+ control,
7913
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoCategory`,
7914
+ placeholder: "Pilih",
7915
+ type: "select",
7916
+ options: []
7917
+ }
7918
+ ),
7919
+ /* @__PURE__ */ jsxRuntime.jsxs(
7920
+ reactComponents.Caption1,
7921
+ {
7922
+ style: {
7923
+ color: reactComponents.tokens.colorNeutralForeground3,
7924
+ marginTop: "0.25rem"
7925
+ },
7926
+ children: [
7927
+ "Pahami definisi, jenis dan contoh kategori muatan",
7928
+ " ",
7929
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: styles.link, children: "disini" })
7930
+ ]
7931
+ }
7932
+ )
7933
+ ] })
7934
+ ] }),
7935
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsxRuntime.jsx(
7936
+ reactComponents.Button,
7937
+ {
7938
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:delete-24-regular" }),
7939
+ onClick: (e) => {
7940
+ e.stopPropagation();
7941
+ onDeleteCargo(owner.id, cargo.id);
7942
+ },
7943
+ onKeyDown: (e) => {
7944
+ if (e.key === "Enter" || e.key === " ") {
7945
+ e.stopPropagation();
7946
+ onDeleteCargo(owner.id, cargo.id);
7947
+ }
7948
+ },
7949
+ size: "medium",
7950
+ shape: "circular",
7951
+ style: {
7952
+ border: `1px solid ${reactComponents.tokens.colorPaletteRedForeground1}`,
7953
+ color: reactComponents.tokens.colorPaletteRedForeground1,
7954
+ width: "100%"
7955
+ },
7956
+ children: "Hapus Muatan"
7957
+ }
7958
+ ) }) })
7959
+ ] }) })
7960
+ ]
7961
+ },
7962
+ cargo.id
7963
+ ))
7964
+ }
7965
+ ),
7966
+ /* @__PURE__ */ jsxRuntime.jsx(
7967
+ reactComponents.Button,
7968
+ {
7969
+ appearance: "secondary",
7970
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:add-24-regular" }),
7971
+ shape: "circular",
7972
+ style: {
7973
+ borderColor: reactComponents.tokens.colorBrandStroke1,
7974
+ color: reactComponents.tokens.colorBrandBackground,
7975
+ marginTop: "1rem",
7976
+ width: "100%"
7977
+ },
7978
+ onClick: () => onAddCargo(owner.id),
7979
+ children: "Tambah Muatan"
7980
+ }
7981
+ )
7982
+ ] }) })
7983
+ ] })
7984
+ ] }) })
7985
+ ]
7986
+ },
7987
+ owner.id
7988
+ )) })
7989
+ ] });
7990
+ };
7991
+ var useStyles25 = reactComponents.makeStyles({
7992
+ container: {
7993
+ display: "flex",
7994
+ flexDirection: "column",
7995
+ gap: "2rem"
7996
+ },
7997
+ bookingDetail: {
7998
+ overflow: "visible",
7999
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8000
+ boxShadow: reactComponents.tokens.shadow4
8001
+ },
8002
+ bookingDetailTop: {
8003
+ padding: "2rem",
8004
+ borderBottomLeftRadius: 0,
8005
+ borderBottomRightRadius: 0,
8006
+ boxShadow: "none",
8007
+ borderTopLeftRadius: reactComponents.tokens.borderRadiusXLarge,
8008
+ borderTopRightRadius: reactComponents.tokens.borderRadiusXLarge,
8009
+ borderBottom: "0.7em dashed " + reactComponents.tokens.colorNeutralBackground1Hover,
8010
+ overflow: "visible",
8011
+ paddingBottom: "4rem",
8012
+ position: "relative"
8013
+ },
8014
+ bookingDetailBottom: {
8015
+ padding: "2rem",
8016
+ paddingTop: "4rem",
8017
+ borderTopLeftRadius: 0,
8018
+ borderTopRightRadius: 0,
8019
+ boxShadow: "none",
8020
+ borderBottomLeftRadius: reactComponents.tokens.borderRadiusXLarge,
8021
+ borderBottomRightRadius: reactComponents.tokens.borderRadiusXLarge,
8022
+ overflow: "visible",
8023
+ display: "flex",
8024
+ flexDirection: "column",
8025
+ alignItems: "center",
8026
+ justifyContent: "center",
8027
+ gap: "1.5rem"
8028
+ },
8029
+ circularLeft: {
8030
+ position: "absolute",
8031
+ width: "100px",
8032
+ height: "50px",
8033
+ borderRadius: "50%",
8034
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1Hover,
8035
+ left: "-50px",
8036
+ bottom: "-30px",
8037
+ zIndex: 2,
8038
+ boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
8039
+ },
8040
+ circularRight: {
8041
+ position: "absolute",
8042
+ width: "100px",
8043
+ height: "50px",
8044
+ borderRadius: "50%",
8045
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1Hover,
8046
+ right: "-50px",
8047
+ bottom: "-30px",
8048
+ zIndex: 2,
8049
+ boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
8050
+ },
8051
+ headerBookingDetail: {
8052
+ display: "flex",
8053
+ justifyContent: "space-between",
8054
+ alignItems: "center"
8055
+ },
8056
+ shipInfo: {
8057
+ display: "flex",
8058
+ flexDirection: "column",
8059
+ alignItems: "center",
8060
+ gap: "1rem"
8061
+ },
8062
+ ticketInfo: {
8063
+ display: "flex",
8064
+ justifyContent: "space-between",
8065
+ alignItems: "center",
8066
+ gap: "0.5em"
8067
+ },
8068
+ ticketTime: {
8069
+ display: "flex",
8070
+ flexDirection: "column",
8071
+ alignItems: "start",
8072
+ gap: "0.5em"
8073
+ },
8074
+ ticketDuration: {
8075
+ display: "flex",
8076
+ alignItems: "center",
8077
+ justifyContent: "center",
8078
+ gap: "0.5rem"
8079
+ },
8080
+ totalPrice: {
8081
+ display: "flex",
8082
+ alignItems: "center",
8083
+ justifyContent: "space-between",
8084
+ gap: "1rem",
8085
+ width: "100%"
8086
+ },
8087
+ gapButton: {
8088
+ width: "100%",
8089
+ display: "flex",
8090
+ flexDirection: "column",
8091
+ gap: reactComponents.tokens.spacingHorizontalM
8092
+ },
8093
+ priceText: {
8094
+ color: reactComponents.tokens.colorPaletteRedForeground1
8095
+ },
8096
+ secondaryButton: {
8097
+ border: "1px solid " + reactComponents.tokens.colorBrandStroke1,
8098
+ color: reactComponents.tokens.colorBrandBackground,
8099
+ width: "100%"
8100
+ }
8101
+ });
8102
+ var CardBookingTicket = ({
8103
+ shipName = "KMP PORTLINK",
8104
+ shipType = "Water Taxi",
8105
+ shipTypeColor = "success",
8106
+ departureDay = "Kamis, 25 Sep",
8107
+ departureTime = "18:15",
8108
+ departureLocation = "Merak, Banten",
8109
+ arrivalDay = "Jumat, 26 Sep",
8110
+ arrivalTime = "19:25",
8111
+ arrivalLocation = "Bakauheni, Lampung",
8112
+ duration = "1 jam 10 menit",
8113
+ totalPrice,
8114
+ reservationStep,
8115
+ paymentStep,
8116
+ onPriceDetailClick,
8117
+ onNext,
8118
+ onPrevious,
8119
+ className
8120
+ }) => {
8121
+ const styles = useStyles25();
8122
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.bookingDetail, children: [
8123
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.bookingDetailTop, children: [
8124
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: "Booking Details" }),
8125
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerBookingDetail, children: [
8126
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.shipInfo, children: [
8127
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/assets/logo/asdp-default.svg", width: 81, height: 54, alt: "asdp" }),
8128
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: shipName })
8129
+ ] }),
8130
+ /* @__PURE__ */ jsxRuntime.jsx(
8131
+ reactComponents.Badge,
8132
+ {
8133
+ size: "extra-large",
8134
+ appearance: "filled",
8135
+ color: shipTypeColor,
8136
+ iconPosition: "before",
8137
+ shape: "rounded",
8138
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:info-24-regular" }),
8139
+ children: shipType
8140
+ }
8141
+ )
8142
+ ] }),
8143
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: "Rute Perjalanan" }),
8144
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketInfo, children: [
8145
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketTime, children: [
8146
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: departureDay }),
8147
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Stronger, { children: [
8148
+ departureTime,
8149
+ " WIB"
8150
+ ] }),
8151
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: departureLocation })
8152
+ ] }),
8153
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketDuration, children: [
8154
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:vehicle-ship-24-regular" }),
8155
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption2, { children: [
8156
+ "Estimasi ",
8157
+ duration
8158
+ ] })
8159
+ ] }),
8160
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketTime, children: [
8161
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: arrivalDay }),
8162
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Stronger, { children: [
8163
+ arrivalTime,
8164
+ " WIB"
8165
+ ] }),
8166
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: arrivalLocation })
8167
+ ] })
8168
+ ] }) }),
8169
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.circularLeft }),
8170
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.circularRight })
8171
+ ] }),
8172
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.bookingDetailBottom, children: [
8173
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.totalPrice, children: [
8174
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: "Total Harga" }),
8175
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Title3, { className: styles.priceText, children: [
8176
+ "IDR ",
8177
+ totalPrice
8178
+ ] }),
8179
+ /* @__PURE__ */ jsxRuntime.jsx(
8180
+ react.Icon,
8181
+ {
8182
+ icon: "fluent:chevron-down-24-filled",
8183
+ onClick: onPriceDetailClick,
8184
+ style: { cursor: "pointer" }
8185
+ }
8186
+ )
8187
+ ] }),
8188
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.gapButton, children: [
8189
+ !(paymentStep === "pay") && /* @__PURE__ */ jsxRuntime.jsx(
8190
+ reactComponents.Button,
8191
+ {
8192
+ appearance: "primary",
8193
+ onClick: onNext,
8194
+ shape: "circular",
8195
+ size: "large",
8196
+ style: { width: "100%" },
8197
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:chevron-right-20-regular" }),
8198
+ iconPosition: "after",
8199
+ children: "Lanjutkan"
8200
+ }
8201
+ ),
8202
+ ["addon", "meals", "review", "payment", "eticket"].includes(reservationStep) && !["pay"].includes(paymentStep) && /* @__PURE__ */ jsxRuntime.jsx(
8203
+ reactComponents.Button,
8204
+ {
8205
+ appearance: "secondary",
8206
+ onClick: onPrevious,
8207
+ shape: "circular",
8208
+ size: "large",
8209
+ className: styles.secondaryButton,
8210
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:chevron-left-20-regular" }),
8211
+ iconPosition: "before",
8212
+ children: "Sebelumnya"
8213
+ }
8214
+ )
8215
+ ] }),
8216
+ paymentStep === "pay" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.gapButton, children: [
8217
+ /* @__PURE__ */ jsxRuntime.jsx(
8218
+ reactComponents.Button,
8219
+ {
8220
+ appearance: "primary",
8221
+ shape: "circular",
8222
+ size: "large",
8223
+ style: { width: "100%" },
8224
+ onClick: onNext,
8225
+ children: "Lihat Pemesanan"
8226
+ }
8227
+ ),
8228
+ /* @__PURE__ */ jsxRuntime.jsx(
8229
+ reactComponents.Button,
8230
+ {
8231
+ appearance: "secondary",
8232
+ shape: "circular",
8233
+ size: "large",
8234
+ className: styles.secondaryButton,
8235
+ onClick: onPrevious,
8236
+ children: "Ubah Metode Pembayaran"
8237
+ }
8238
+ )
8239
+ ] })
8240
+ ] })
8241
+ ] }) });
8242
+ };
8243
+ var useStyles26 = reactComponents.makeStyles({
8244
+ faqSection: {
8245
+ // marginTop: '2rem', // Let parent control spacing if needed, or keep consistent
8246
+ },
8247
+ faqCard: {
8248
+ padding: "2rem",
8249
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8250
+ boxShadow: reactComponents.tokens.shadow4
8251
+ },
8252
+ accordionItem: {
8253
+ borderBottom: `1px solid ${reactComponents.tokens.colorNeutralStroke2}`,
8254
+ padding: reactComponents.tokens.spacingVerticalS
8255
+ },
8256
+ accordionHeader: {
8257
+ fontSize: reactComponents.tokens.fontSizeBase300,
8258
+ fontWeight: reactComponents.tokens.fontWeightBold
8259
+ }
8260
+ });
8261
+ var FAQ_ITEMS = [
8262
+ {
8263
+ value: "1",
8264
+ question: "FAQ 1",
8265
+ answer: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Minus saepe repudiandae dolore pariatur veniam! Aliquam nesciunt saepe, optio inventore fuga quam dignissimos possimus, dolorem alias, blanditiis veniam voluptatibus eaque ex?"
8266
+ },
8267
+ {
8268
+ value: "2",
8269
+ question: "FAQ 2",
8270
+ answer: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae dolor consequatur, sit facere ex, ullam quos natus sapiente nihil cum libero velit, labore necessitatibus rem? Tenetur omnis tempora alias totam."
8271
+ },
8272
+ {
8273
+ value: "3",
8274
+ question: "FAQ 3",
8275
+ answer: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae officiis modi quaerat eum illo, consectetur aperiam atque? Corrupti cupiditate sequi iusto reiciendis dignissimos, eius, nihil temporibus eaque delectus, saepe ullam!"
8276
+ },
8277
+ {
8278
+ value: "4",
8279
+ question: "FAQ 4",
8280
+ answer: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint maiores debitis, earum animi dolorum unde asperiores accusantium nemo consectetur nulla reiciendis eveniet pariatur autem rerum adipisci sequi officia vero ipsam!"
8281
+ }
8282
+ ];
8283
+ var CardFAQ = ({ className }) => {
8284
+ const styles = useStyles26();
8285
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.faqCard, children: [
8286
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: "FAQ" }),
8287
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Accordion, { collapsible: true, children: FAQ_ITEMS.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionItem, { value: item.value, className: styles.accordionItem, children: [
8288
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionHeader, { className: styles.accordionHeader, expandIconPosition: "end", children: [
8289
+ /* @__PURE__ */ jsxRuntime.jsx(
8290
+ react.Icon,
8291
+ {
8292
+ icon: "fluent:question-circle-28-regular",
8293
+ style: { marginRight: "5px" }
8294
+ }
8295
+ ),
8296
+ " ",
8297
+ item.question
8298
+ ] }),
8299
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: item.answer })
8300
+ ] }, item.value)) })
8301
+ ] });
8302
+ };
8303
+ var useStyles27 = reactComponents.makeStyles({
8304
+ card: {
8305
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1,
8306
+ boxShadow: reactComponents.tokens.shadow4,
8307
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalL, reactComponents.tokens.spacingHorizontalXXL),
8308
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8309
+ zIndex: 3
8310
+ },
8311
+ gapRow: {
8312
+ display: "flex",
8313
+ flexDirection: "column",
8314
+ rowGap: reactComponents.tokens.spacingVerticalXXL
8315
+ },
8316
+ titleDivider: {
8317
+ display: "flex",
8318
+ alignItems: "center",
8319
+ width: "100%"
8320
+ },
8321
+ textTitle: {
8322
+ fontWeight: reactComponents.tokens.fontWeightRegular,
8323
+ whiteSpace: "nowrap",
8324
+ marginRight: reactComponents.tokens.spacingHorizontalM
8325
+ },
8326
+ sizeDivider: {
8327
+ flexGrow: 1
8328
+ },
8329
+ card1: {
8330
+ display: "flex",
8331
+ flexDirection: "column",
8332
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingHorizontalL, reactComponents.tokens.spacingVerticalL),
8333
+ rowGap: reactComponents.tokens.spacingHorizontalM
8334
+ },
8335
+ horizontalContainer: {
8336
+ display: "flex",
8337
+ justifyContent: "space-between",
8338
+ alignItems: "center"
8339
+ },
8340
+ itemFlexCard1: {
8341
+ display: "flex",
8342
+ columnGap: reactComponents.tokens.spacingHorizontalM,
8343
+ alignItems: "center"
8344
+ },
8345
+ textContainerCard1: {
8346
+ display: "flex",
8347
+ flexDirection: "column"
8348
+ },
8349
+ img: {
8350
+ objectFit: "contain"
8351
+ },
8352
+ // Footer
8353
+ footerContainer: {
8354
+ display: "flex",
8355
+ justifyContent: "space-between",
8356
+ alignItems: "center",
8357
+ width: "100%"
8358
+ },
8359
+ footerColRight: {
8360
+ display: "flex",
8361
+ alignItems: "center"
8362
+ },
8363
+ detailToogle: {
8364
+ color: reactComponents.tokens.colorBrandForeground1
8365
+ },
8366
+ // Assurance Styles
8367
+ badge: {
8368
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalNone, reactComponents.tokens.spacingHorizontalL),
8369
+ backgroundColor: reactComponents.tokens.colorPaletteBlueBackground2,
8370
+ // Approximate for Shared_Dark_blue_Primary if not avail
8371
+ color: reactComponents.tokens.colorNeutralForegroundOnBrand,
8372
+ width: "fit-content"
8373
+ },
8374
+ breakdownContainer: {
8375
+ display: "flex",
8376
+ flexDirection: "column",
8377
+ gap: reactComponents.tokens.spacingVerticalM
8378
+ },
8379
+ breakdownRow: {
8380
+ display: "flex",
8381
+ justifyContent: "space-between",
8382
+ width: "100%"
8383
+ },
8384
+ // Meal Styles
8385
+ mealListContainer: {
8386
+ display: "flex",
8387
+ flexDirection: "column",
8388
+ rowGap: reactComponents.tokens.spacingVerticalXL,
8389
+ marginTop: reactComponents.tokens.spacingVerticalM
8390
+ },
8391
+ mealItem: {
8392
+ display: "flex",
8393
+ alignItems: "flex-start",
8394
+ columnGap: reactComponents.tokens.spacingHorizontalL,
8395
+ gap: "12px",
8396
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalS, 0)
8397
+ },
8398
+ mealImage: {
8399
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
8400
+ objectFit: "cover",
8401
+ flexShrink: 0
8402
+ },
8403
+ mealContent: {
8404
+ display: "flex",
8405
+ flexDirection: "column",
8406
+ flexGrow: 1,
8407
+ rowGap: reactComponents.tokens.spacingVerticalXS
8408
+ },
8409
+ mealDescription: {
8410
+ color: reactComponents.tokens.colorNeutralForeground3,
8411
+ display: "-webkit-box",
8412
+ WebkitLineClamp: "2",
8413
+ WebkitBoxOrient: "vertical",
8414
+ overflow: "hidden"
8415
+ },
8416
+ mealPriceInfo: {
8417
+ color: reactComponents.tokens.colorBrandBackground
8418
+ },
8419
+ mealActions: {
8420
+ display: "flex",
8421
+ flexDirection: "column",
8422
+ alignItems: "flex-end",
8423
+ rowGap: reactComponents.tokens.spacingVerticalM,
8424
+ flexShrink: 0
8425
+ },
8426
+ qtySelector: {
8427
+ display: "flex",
8428
+ alignItems: "center",
8429
+ columnGap: reactComponents.tokens.spacingHorizontalM
8430
+ },
8431
+ qtyButton: {
8432
+ minWidth: "32px",
8433
+ height: "32px",
8434
+ ...reactComponents.shorthands.padding(0)
8435
+ },
8436
+ deleteMealButton: {
8437
+ display: "flex",
8438
+ alignItems: "center",
8439
+ columnGap: reactComponents.tokens.spacingHorizontalS,
8440
+ color: reactComponents.tokens.colorPaletteRedForeground1,
8441
+ ...reactComponents.shorthands.border("1px", "solid", reactComponents.tokens.colorPaletteRedForeground1),
8442
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalXS, reactComponents.tokens.spacingHorizontalS),
8443
+ backgroundColor: "transparent",
8444
+ cursor: "pointer",
8445
+ fontSize: reactComponents.tokens.fontSizeBase300,
8446
+ ":hover": {
8447
+ backgroundColor: reactComponents.tokens.colorPaletteRedBackground1
8448
+ }
8449
+ },
8450
+ totalContainer: {
8451
+ display: "flex",
8452
+ justifyContent: "space-between",
8453
+ alignItems: "center",
8454
+ marginTop: reactComponents.tokens.spacingVerticalL,
8455
+ paddingTop: reactComponents.tokens.spacingVerticalM
8456
+ }
8457
+ });
8458
+ var CardAddon = ({
8459
+ title,
8460
+ itemTitle,
8461
+ itemSubtitle,
8462
+ iconUrl,
8463
+ description,
8464
+ rightAction,
8465
+ footerData,
8466
+ assuranceData,
8467
+ mealData,
8468
+ children,
8469
+ className
8470
+ }) => {
8471
+ const styles = useStyles27();
8472
+ return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.gapRow, children: [
8473
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.titleDivider, children: [
8474
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { className: styles.textTitle, children: title }),
8475
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { className: styles.sizeDivider })
8476
+ ] }),
8477
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.card1, children: [
8478
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.horizontalContainer, children: [
8479
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemFlexCard1, children: [
8480
+ iconUrl && /* @__PURE__ */ jsxRuntime.jsx(
8481
+ "img",
8482
+ {
8483
+ src: iconUrl,
8484
+ alt: "icon",
8485
+ width: 81,
8486
+ height: 56,
8487
+ className: styles.img
8488
+ }
8489
+ ),
8490
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.textContainerCard1, children: [
8491
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: itemTitle }),
8492
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: itemSubtitle })
8493
+ ] })
8494
+ ] }),
8495
+ rightAction
8496
+ ] }),
8497
+ description && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { paddingRight: "20%" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: description }) }),
8498
+ footerData && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: footerData.actionType === "detail-link" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.footerContainer, children: [
8499
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption1, { children: [
8500
+ footerData.priceLabel,
8501
+ " ",
8502
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption1Stronger, { children: [
8503
+ "Rp",
8504
+ footerData.price.toLocaleString("id-ID"),
8505
+ footerData.priceUnit
8506
+ ] })
8507
+ ] }) }),
8508
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.footerColRight, children: /* @__PURE__ */ jsxRuntime.jsx(
8509
+ reactComponents.Button,
8510
+ {
8511
+ appearance: "transparent",
8512
+ size: "small",
8513
+ style: {
8514
+ color: reactComponents.tokens.colorBrandForeground1
8515
+ },
8516
+ onClick: footerData.onActionClick,
8517
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:chevron-down-12-regular" }),
8518
+ iconPosition: "after",
8519
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: styles.detailToogle, children: footerData.actionLabel || "Lihat detail" })
8520
+ }
8521
+ ) })
8522
+ ] }) }),
8523
+ assuranceData && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
8525
+ reactComponents.Badge,
8526
+ {
8527
+ size: "large",
8528
+ appearance: "filled",
8529
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-16-regular" }),
8530
+ iconPosition: "after",
8531
+ className: styles.badge,
8532
+ style: { backgroundColor: "rgb(30, 57, 141)" },
8533
+ children: [
8534
+ assuranceData.totalPassenger,
8535
+ " Asuransi Penumpang"
8536
+ ]
8537
+ }
8538
+ ) }),
8539
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.breakdownContainer, children: [
8540
+ assuranceData.items.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.breakdownRow, children: [
8541
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
8542
+ item.label,
8543
+ " (",
8544
+ item.priceDetails,
8545
+ ")"
8546
+ ] }),
8547
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
8548
+ "Rp",
8549
+ item.totalPrice.toLocaleString("id-ID")
8550
+ ] })
8551
+ ] }, idx)),
8552
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.breakdownRow, children: [
8553
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: "Total Harga" }),
8554
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle2, { children: [
8555
+ "Rp",
8556
+ assuranceData.totalPrice.toLocaleString("id-ID")
8557
+ ] })
8558
+ ] })
8559
+ ] })
8560
+ ] }),
8561
+ mealData && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.mealListContainer, children: mealData.items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.mealItem, children: [
8562
+ /* @__PURE__ */ jsxRuntime.jsx(
8563
+ "img",
8564
+ {
8565
+ src: item.image,
8566
+ alt: item.name,
8567
+ width: 119,
8568
+ height: 119,
8569
+ className: styles.mealImage
8570
+ }
8571
+ ),
8572
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.mealContent, children: [
8573
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: item.name }),
8574
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: styles.mealDescription, children: item.description }),
8575
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Strong, { className: styles.mealPriceInfo, children: [
8576
+ "Rp",
8577
+ item.price.toLocaleString("id-ID"),
8578
+ " x ",
8579
+ item.quantity,
8580
+ " = Rp",
8581
+ (item.price * item.quantity).toLocaleString("id-ID")
8582
+ ] })
8583
+ ] }),
8584
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.mealActions, children: [
8585
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.qtySelector, children: [
8586
+ /* @__PURE__ */ jsxRuntime.jsx(
8587
+ reactComponents.Button,
8588
+ {
8589
+ appearance: "subtle",
8590
+ shape: "circular",
8591
+ className: styles.qtyButton,
8592
+ disabled: item.quantity <= 1,
8593
+ icon: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.SubtractRegular, {}),
8594
+ onClick: () => mealData.onUpdateQuantity(item.id, -1),
8595
+ style: {
8596
+ border: `1px solid ${item.quantity <= 1 ? reactComponents.tokens.colorNeutralForegroundDisabled : reactComponents.tokens.colorBrandBackground}`,
8597
+ color: item.quantity <= 1 ? reactComponents.tokens.colorNeutralForegroundDisabled : reactComponents.tokens.colorBrandBackground
8598
+ }
8599
+ }
8600
+ ),
8601
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.quantity }),
8602
+ /* @__PURE__ */ jsxRuntime.jsx(
8603
+ reactComponents.Button,
8604
+ {
8605
+ appearance: "subtle",
8606
+ className: styles.qtyButton,
8607
+ shape: "circular",
8608
+ icon: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.AddRegular, {}),
8609
+ onClick: () => mealData.onUpdateQuantity(item.id, 1),
8610
+ style: {
8611
+ border: `1px solid ${reactComponents.tokens.colorBrandBackground}`,
8612
+ color: reactComponents.tokens.colorBrandBackground
8613
+ }
8614
+ }
8615
+ )
8616
+ ] }),
8617
+ /* @__PURE__ */ jsxRuntime.jsxs(
8618
+ reactComponents.Button,
8619
+ {
8620
+ appearance: "subtle",
8621
+ className: styles.deleteMealButton,
8622
+ shape: "rounded",
8623
+ onClick: () => mealData.onDelete(item.id),
8624
+ children: [
8625
+ /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DeleteRegular, { fontSize: 18 }),
8626
+ "Hapus Pesanan"
8627
+ ]
8628
+ }
8629
+ )
8630
+ ] })
8631
+ ] }, item.id)) }) }),
8632
+ footerData && footerData.actionType === "primary-button" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8633
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.totalContainer, children: [
8634
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: footerData.priceLabel }),
8635
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle1, { style: { fontSize: reactComponents.tokens.fontSizeBase600 }, children: [
8636
+ "Rp. ",
8637
+ footerData.price.toLocaleString("id-ID")
8638
+ ] })
8639
+ ] }),
8640
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
8641
+ reactComponents.Button,
8642
+ {
8643
+ appearance: "secondary",
8644
+ shape: "circular",
8645
+ onClick: footerData.onActionClick,
8646
+ style: {
8647
+ width: "100%",
8648
+ borderColor: reactComponents.tokens.colorBrandStroke1,
8649
+ color: reactComponents.tokens.colorBrandBackground
8650
+ },
8651
+ children: footerData.actionLabel
8652
+ }
8653
+ ) })
8654
+ ] }),
8655
+ children
8656
+ ] })
8657
+ ] }) });
8658
+ };
8659
+ var useStyles28 = reactComponents.makeStyles({
8660
+ container: {
8661
+ display: "flex",
8662
+ flexDirection: "column",
8663
+ gap: reactComponents.tokens.spacingVerticalXXL
8664
+ },
8665
+ banner: {
8666
+ position: "relative",
8667
+ height: "240px",
8668
+ width: "100%",
8669
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8670
+ overflow: "hidden",
8671
+ display: "flex",
8672
+ flexDirection: "column",
8673
+ justifyContent: "center",
8674
+ alignItems: "center",
8675
+ color: "white",
8676
+ textAlign: "center",
8677
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalXXL)
8678
+ },
8679
+ bannerOverlay: {
8680
+ position: "absolute",
8681
+ top: 0,
8682
+ left: 0,
8683
+ right: 0,
8684
+ bottom: 0,
8685
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
8686
+ zIndex: 1
8687
+ },
8688
+ bannerBg: {
8689
+ position: "absolute",
8690
+ top: 0,
8691
+ left: 0,
8692
+ right: 0,
8693
+ bottom: 0,
8694
+ objectFit: "cover",
8695
+ zIndex: 0,
8696
+ width: "100%",
8697
+ height: "100%"
8698
+ },
8699
+ bannerContent: {
8700
+ position: "relative",
8701
+ zIndex: 2
8702
+ },
8703
+ bannerTitle: {
8704
+ fontSize: "48px",
8705
+ fontWeight: reactComponents.tokens.fontWeightBold,
8706
+ marginBottom: reactComponents.tokens.spacingVerticalS,
8707
+ color: "white"
8708
+ // Ensure text is white on banner
8709
+ },
8710
+ bannerSubtitle: {
8711
+ color: "white"
8712
+ },
8713
+ disclaimer: {
8714
+ display: "flex",
8715
+ alignItems: "center",
8716
+ gap: reactComponents.tokens.spacingHorizontalS,
8717
+ backgroundColor: reactComponents.tokens.colorNeutralBackground2,
8718
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalS, reactComponents.tokens.spacingHorizontalM),
8719
+ ...reactComponents.shorthands.border("1px", "solid", reactComponents.tokens.colorNeutralStroke2),
8720
+ borderRadius: reactComponents.tokens.borderRadiusMedium
8721
+ },
8722
+ sectionTitle: {
8723
+ marginBottom: reactComponents.tokens.spacingVerticalL
8724
+ },
8725
+ grid: {
8726
+ display: "grid",
8727
+ gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
8728
+ columnGap: reactComponents.tokens.spacingHorizontalL,
8729
+ rowGap: reactComponents.tokens.spacingVerticalL
8730
+ },
8731
+ productCard: {
8732
+ display: "flex",
8733
+ flexDirection: "row",
8734
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingVerticalM),
8735
+ gap: reactComponents.tokens.spacingHorizontalM,
8736
+ height: "100%"
8737
+ },
8738
+ productImage: {
8739
+ width: "100px",
8740
+ height: "100px",
8741
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
8742
+ objectFit: "cover",
8743
+ flexShrink: 0
8744
+ },
8745
+ productInfo: {
8746
+ display: "flex",
8747
+ flexDirection: "column",
8748
+ justifyContent: "space-between",
8749
+ flexGrow: 1
8750
+ },
8751
+ productDescription: {
8752
+ color: reactComponents.tokens.colorNeutralForeground3,
8753
+ display: "-webkit-box",
8754
+ WebkitLineClamp: "2",
8755
+ WebkitBoxOrient: "vertical",
8756
+ overflow: "hidden",
8757
+ marginBottom: reactComponents.tokens.spacingVerticalS
8758
+ },
8759
+ productFooter: {
8760
+ display: "flex",
8761
+ justifyContent: "space-between",
8762
+ alignItems: "center",
8763
+ marginTop: "auto"
8764
+ },
8765
+ price: {
8766
+ color: "#D13438",
8767
+ // Or use a token if available/consistent
8768
+ fontWeight: reactComponents.tokens.fontWeightSemibold
8769
+ },
8770
+ quantitySelector: {
8771
+ display: "flex",
8772
+ alignItems: "center",
8773
+ gap: reactComponents.tokens.spacingHorizontalS
8774
+ },
8775
+ addButton: {
8776
+ // We'll use color="brand" or similar from Fluent v9 if possible, or fallback to custom styles
8777
+ // ...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),
8778
+ // color: tokens.colorBrandForeground1,
8779
+ },
8780
+ // Replicating the custom add button style from original
8781
+ customAddButton: {
8782
+ border: "1px solid rgb(30, 57, 141)",
8783
+ // tokensV2.lightModeColors.Brand_Stroke_1_Rest
8784
+ color: "rgb(30, 57, 141)"
8785
+ // tokensV2.lightModeColors.Brand_Foreground_1_Rest
8786
+ }
8787
+ });
8788
+ var CardMealCatalog = ({
8789
+ banner,
8790
+ disclaimerText,
8791
+ categories,
8792
+ onAdd,
8793
+ onUpdateQuantity,
8794
+ className
8795
+ }) => {
8796
+ const styles = useStyles28();
8797
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
8798
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.banner, children: [
8799
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.bannerOverlay }),
8800
+ /* @__PURE__ */ jsxRuntime.jsx(
8801
+ "img",
8802
+ {
8803
+ src: banner.imageUrl,
8804
+ alt: banner.title,
8805
+ className: styles.bannerBg
8806
+ }
8807
+ ),
8808
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.bannerContent, children: [
8809
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Display, { className: styles.bannerTitle, children: banner.title }),
8810
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
8811
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title2, { className: styles.bannerSubtitle, children: banner.subtitle })
8812
+ ] })
8813
+ ] }),
8814
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.disclaimer, children: [
8815
+ /* @__PURE__ */ jsxRuntime.jsx(reactIcons.InfoRegular, {}),
8816
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: disclaimerText })
8817
+ ] }),
8818
+ categories.map((cat, index) => /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
8819
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { className: styles.sectionTitle, style: { textTransform: "capitalize" }, children: cat.category }),
8820
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
8821
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
8822
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.grid, children: cat.list.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.productCard, children: [
8823
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Image, { src: item.image, alt: item.name, className: styles.productImage }),
8824
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.productInfo, children: [
8825
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
8826
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: item.name }),
8827
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: styles.productDescription, children: item.description })
8828
+ ] }),
8829
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.productFooter, children: [
8830
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.price, children: [
8831
+ "Rp",
8832
+ item.price.toLocaleString("id-ID")
8833
+ ] }),
8834
+ item.quantity > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.quantitySelector, children: [
8835
+ /* @__PURE__ */ jsxRuntime.jsx(
8836
+ reactComponents.Button,
8837
+ {
8838
+ size: "small",
8839
+ shape: "circular",
8840
+ icon: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.SubtractRegular, {}),
8841
+ onClick: () => onUpdateQuantity(item.id, -1)
8842
+ }
8843
+ ),
8844
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: item.quantity }),
8845
+ /* @__PURE__ */ jsxRuntime.jsx(
8846
+ reactComponents.Button,
8847
+ {
8848
+ size: "small",
8849
+ shape: "circular",
8850
+ icon: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.AddRegular, {}),
8851
+ onClick: () => onUpdateQuantity(item.id, 1)
8852
+ }
8853
+ )
8854
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
8855
+ reactComponents.Button,
8856
+ {
8857
+ size: "small",
8858
+ shape: "rounded",
8859
+ className: styles.customAddButton,
8860
+ onClick: () => onAdd(item),
8861
+ children: "Tambah"
8862
+ }
8863
+ )
8864
+ ] })
8865
+ ] })
8866
+ ] }, item.id)) })
8867
+ ] }, index))
8868
+ ] });
8869
+ };
8870
+ var useStyles29 = reactComponents.makeStyles({
8871
+ card: {
8872
+ padding: "1.5rem",
8873
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8874
+ boxShadow: reactComponents.tokens.shadow4,
8875
+ zIndex: 3
8876
+ },
8877
+ headerContainer: {
8878
+ display: "flex",
8879
+ alignItems: "center",
8880
+ marginBottom: "1rem",
8881
+ gap: "1rem"
8882
+ },
8883
+ headerTitle: {
8884
+ whiteSpace: "nowrap",
8885
+ fontWeight: reactComponents.tokens.fontWeightSemibold
8886
+ },
8887
+ headerLine: {
8888
+ height: "1px",
8889
+ flexGrow: 1,
8890
+ backgroundColor: reactComponents.tokens.colorNeutralStroke2
8891
+ },
8892
+ contentContainer: {
8893
+ display: "flex",
8894
+ flexDirection: "column",
8895
+ gap: reactComponents.tokens.spacingVerticalM
8896
+ },
8897
+ row: {
8898
+ display: "flex",
8899
+ justifyContent: "space-between",
8900
+ alignItems: "center"
8901
+ },
8902
+ defaultLabel: {
8903
+ color: reactComponents.tokens.colorNeutralForeground2
8904
+ },
8905
+ defaultValue: {
8906
+ // color: tokens.colorNeutralForegroundDisabled, // In ferizy: tokensV2.lightModeColors.Neutral_Foreground_Disabled_Rest
8907
+ color: "#bdbdbd",
8908
+ // Approximate fallback or use token if available in ferryui context
8909
+ textAlign: "right"
8910
+ }
8911
+ });
8912
+ var CardReview = ({
8913
+ title,
8914
+ items,
8915
+ children,
8916
+ className,
8917
+ headerAction
8918
+ }) => {
8919
+ const styles = useStyles29();
8920
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: `${styles.card} ${className || ""}`, children: [
8921
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerContainer, children: [
8922
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.headerTitle, children: title }),
8923
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerLine }),
8924
+ headerAction && /* @__PURE__ */ jsxRuntime.jsx("div", { children: headerAction })
8925
+ ] }),
8926
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.contentContainer, children: [
8927
+ items?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.row} ${item.className || ""}`, children: [
8928
+ typeof item.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: `${styles.defaultLabel} ${item.labelClassName || ""}`, children: item.label }) : (
8929
+ // Clone element to append className if it's a valid React element
8930
+ React5__default.default.isValidElement(item.label) ? React5__default.default.cloneElement(item.label, {
8931
+ className: `${styles.defaultLabel} ${item.labelClassName || ""}${item.label.props.className ? " " + item.label.props.className : ""}`
8932
+ }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.defaultLabel} ${item.labelClassName || ""}`, children: item.label })
8933
+ ),
8934
+ typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: `${styles.defaultValue} ${item.valueClassName || ""}`, children: item.value }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.defaultValue} ${item.valueClassName || ""}`, children: item.value })
8935
+ ] }, index)),
8936
+ children
8937
+ ] })
8938
+ ] });
8939
+ };
8940
+ var getBadgeConfig2 = (ticketClass) => {
8941
+ const normalizedClass = ticketClass?.toUpperCase();
8942
+ switch (normalizedClass) {
8943
+ case "EKONOMI":
8944
+ case "ECONOMY":
8945
+ return {
8946
+ color: "#A74109",
8947
+ icon: "/assets/images/class/shield_badge_ekonomi.svg"
8948
+ };
8949
+ case "BISNIS":
8950
+ case "BUSINESS":
8951
+ return {
8952
+ color: "#859599",
8953
+ icon: "/assets/images/class/ribbon_badge_bisnis.svg"
8954
+ };
8955
+ case "EKSEKUTIF":
8956
+ case "EXECUTIVE":
8957
+ return {
8958
+ color: "#C19C00",
8959
+ icon: "/assets/images/class/crown_badge_eksekutif.svg"
8960
+ };
8961
+ default:
8962
+ return {
8963
+ color: reactComponents.tokens.colorNeutralBackground3,
8964
+ icon: ""
8965
+ };
8966
+ }
8967
+ };
8968
+ var useStyles30 = reactComponents.makeStyles({
8969
+ card: {
8970
+ padding: "1.5rem",
8971
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
8972
+ boxShadow: reactComponents.tokens.shadow4,
8973
+ zIndex: 3
8974
+ },
8975
+ headerContainer: {
8976
+ display: "flex",
8977
+ alignItems: "center",
8978
+ marginBottom: "1rem",
8979
+ gap: "1rem"
8980
+ },
8981
+ headerTitle: {
8982
+ whiteSpace: "nowrap",
8983
+ fontWeight: reactComponents.tokens.fontWeightSemibold
8984
+ },
8985
+ headerLine: {
8986
+ height: "1px",
8987
+ flexGrow: 1,
8988
+ backgroundColor: reactComponents.tokens.colorNeutralStroke2
8989
+ },
8990
+ contentContainer: {
8991
+ display: "flex",
8992
+ flexDirection: "column"
8993
+ },
8994
+ passengerItem: {
8995
+ display: "flex",
8996
+ flexDirection: "column",
8997
+ gap: reactComponents.tokens.spacingVerticalS,
8998
+ paddingBottom: reactComponents.tokens.spacingVerticalL,
8999
+ paddingTop: reactComponents.tokens.spacingVerticalM,
9000
+ borderBottom: `1px solid ${reactComponents.tokens.colorNeutralStroke2}`,
9001
+ ":last-child": {
9002
+ borderBottom: "none",
9003
+ paddingBottom: 0
9004
+ }
9005
+ // Matches styles.passengerItem in Review.tsx
9006
+ },
9007
+ itemHeader: {
9008
+ display: "flex",
9009
+ justifyContent: "space-between",
9010
+ alignItems: "center",
9011
+ marginBottom: reactComponents.tokens.spacingVerticalS
9012
+ },
9013
+ name: {
9014
+ color: "#00B8D4",
9015
+ // Cyan color from design
9016
+ fontSize: reactComponents.tokens.fontSizeBase400
9017
+ },
9018
+ // Badge Styles
9019
+ badgeContainer: {
9020
+ display: "flex",
9021
+ alignItems: "center",
9022
+ position: "relative"
9023
+ },
9024
+ badgeContent: {
9025
+ display: "flex",
9026
+ alignItems: "center",
9027
+ padding: "0.25rem 0.75rem 0.25rem 1.5rem",
9028
+ // Extra left padding for the icon overlap
9029
+ borderRadius: "0 4px 4px 0",
9030
+ borderTopRightRadius: "9999px",
9031
+ borderBottomRightRadius: "9999px",
9032
+ color: "white",
9033
+ fontSize: reactComponents.tokens.fontSizeBase200,
9034
+ fontWeight: reactComponents.tokens.fontWeightMedium,
9035
+ marginLeft: "-14px",
9036
+ // Pull the text container under the icon
9037
+ minHeight: "24px"
9038
+ },
9039
+ badgeIcon: {
9040
+ width: "28px",
9041
+ height: "32px",
9042
+ zIndex: 1,
9043
+ filter: "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"
9044
+ },
9045
+ fields: {
9046
+ display: "grid",
9047
+ gridTemplateColumns: "1fr 1fr",
9048
+ gap: reactComponents.tokens.spacingHorizontalL
9049
+ },
9050
+ inputBox: {
9051
+ border: `1px solid ${reactComponents.tokens.colorNeutralStroke1}`,
9052
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
9053
+ padding: `${reactComponents.tokens.spacingVerticalS} ${reactComponents.tokens.spacingHorizontalM}`,
9054
+ display: "flex",
9055
+ alignItems: "center",
9056
+ height: "32px"
9057
+ }
9058
+ });
9059
+ var CardReviewPassenger = ({
9060
+ title = "Penumpang",
9061
+ passengers,
9062
+ className
9063
+ }) => {
9064
+ const styles = useStyles30();
9065
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: `${styles.card} ${className || ""}`, children: [
9066
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerContainer, children: [
9067
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.headerTitle, children: title }),
9068
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerLine })
9069
+ ] }),
9070
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.contentContainer, children: passengers.map((passenger, index) => {
9071
+ const badgeConfig = getBadgeConfig2(passenger.serviceClass);
9072
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.passengerItem, children: [
9073
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemHeader, children: [
9074
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: styles.name, children: passenger.name }),
9075
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.badgeContainer, children: [
9076
+ badgeConfig.icon && /* @__PURE__ */ jsxRuntime.jsx(
9077
+ reactComponents.Image,
9078
+ {
9079
+ src: badgeConfig.icon,
9080
+ alt: passenger.ticketClass,
9081
+ className: styles.badgeIcon,
9082
+ height: 28,
9083
+ width: 24
9084
+ }
9085
+ ),
9086
+ /* @__PURE__ */ jsxRuntime.jsx(
9087
+ "div",
9088
+ {
9089
+ className: styles.badgeContent,
9090
+ style: { backgroundColor: badgeConfig.color },
9091
+ children: passenger.ticketClass
9092
+ }
9093
+ )
9094
+ ] })
9095
+ ] }),
9096
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.fields, children: [
9097
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Field, { label: "Nomor ID", size: "small", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.inputBox, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: passenger.identityNumber }) }) }),
9098
+ /* @__PURE__ */ jsxRuntime.jsx(
9099
+ reactComponents.Field,
9100
+ {
9101
+ label: passenger.ageLabel,
9102
+ size: "small",
9103
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.inputBox, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: passenger.ageValue }) })
9104
+ }
9105
+ )
9106
+ ] })
9107
+ ] }, passenger.id || index);
9108
+ }) })
9109
+ ] });
9110
+ };
9111
+ var useStyles31 = reactComponents.makeStyles({
9112
+ list: {
9113
+ margin: 0,
9114
+ padding: 0,
9115
+ listStyle: "none",
9116
+ counterReset: "list-counter"
9117
+ },
9118
+ listItem: {
9119
+ counterIncrement: "list-counter",
9120
+ display: "flex",
9121
+ marginBottom: reactComponents.tokens.spacingVerticalS,
9122
+ "&::before": {
9123
+ content: 'counter(list-counter) "."',
9124
+ marginRight: reactComponents.tokens.spacingHorizontalS,
9125
+ fontWeight: reactComponents.tokens.fontWeightRegular
9126
+ }
9127
+ }
9128
+ });
9129
+ var PriceDetailsTerms = () => {
9130
+ const styles = useStyles31();
9131
+ const linkColor = reactComponents.tokens.colorBrandBackground;
9132
+ const bookingTerms = [
9133
+ "Transaksi booking akan dibatalkan secara otomatis apabila Anda tidak menyelesaikan pembayaran pada periode waktu yang telah ditentukan.",
9134
+ "Setelah pembyaran berhasil, dikumen E-Tiket dapat di unduh melailui E-Mail atau menu \u201CPesanan Saya\u201D di Web Reservation atau Mobile Application Ferizy.",
9135
+ "Dokumen E-Tiket wajib ditunjukan saat melakukan proses Masuk Pelabuhan (Check-In)",
9136
+ "Anda sudah dapat Masuk Pelabuhan (Check-In) mulai dari 2 (dua) jam sebelum jadwal masukpelabuhan yang Anda pilih.",
9137
+ "Tiket akan hangus (expired) apabila Anda belum Masuk Pelabuhan (Check-In) hingga melewati batas waktu jadwal Masuk Pelabuhan yang Anda pilih."
9138
+ ];
9139
+ const agreementTerms = [
9140
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9141
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Link, { href: "/terms-and-conditions", style: { color: linkColor }, children: "Syarat & Ketentuan" }),
9142
+ "\xA0Ferizy."
9143
+ ] }),
9144
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9145
+ "Ketentuan persyaratan menyeberang sesuai dengan\xA0",
9146
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Link, { href: "/surat-edaran-satgas-covid-19", style: { color: linkColor }, children: "Surat Edaran Satgas Covid-19 Nomor 23 Tahun 2002." })
9147
+ ] }),
9148
+ "Bahwa apabila saya didapati tidak memenuhi ketentuan persyaratan menyeberang pada butir 2 (dua) diatas yang mengakibatkan saya terlambat atau tidaj dapat melakukan Check-In di pelabuhan tepat waktu, maka saya menerima dan menyetujui untuk diproses sesuai dengan Syarat & Ketentuan Ferizy sebagaimana tersebut pada butir 1 (satu) di atas."
9149
+ ];
9150
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9151
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: styles.list, children: bookingTerms.map((term, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles.listItem, children: term }, index)) }) }),
9152
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
9153
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
9154
+ "Dengan menekan tombol \u201CLanjutkan Pembayaran\u201D, maka saya telah membaca dan menyetujuii :",
9155
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: styles.list, children: agreementTerms.map((term, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles.listItem, children: term }, index)) })
9156
+ ] })
9157
+ ] });
9158
+ };
9159
+ var useStyles32 = reactComponents.makeStyles({
9160
+ card: {
9161
+ padding: "1.5rem",
9162
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
9163
+ boxShadow: reactComponents.tokens.shadow4,
9164
+ zIndex: 3
9165
+ },
9166
+ headerContainer: {
9167
+ display: "flex",
9168
+ alignItems: "center",
9169
+ marginBottom: "1rem",
9170
+ gap: "1rem"
9171
+ },
9172
+ headerTitle: {
9173
+ whiteSpace: "nowrap",
9174
+ fontWeight: reactComponents.tokens.fontWeightSemibold
9175
+ },
9176
+ headerLine: {
9177
+ height: "1px",
9178
+ flexGrow: 1,
9179
+ backgroundColor: reactComponents.tokens.colorNeutralStroke2
9180
+ },
9181
+ container: {
9182
+ display: "flex",
9183
+ flexDirection: "column",
9184
+ gap: reactComponents.tokens.spacingVerticalM
9185
+ },
9186
+ row: {
9187
+ display: "flex",
9188
+ justifyContent: "space-between",
9189
+ alignItems: "center"
9190
+ },
9191
+ label: {
9192
+ color: reactComponents.tokens.colorNeutralForeground2
9193
+ },
9194
+ value: {
9195
+ // Standard value color - using token or fallback
9196
+ color: "#bdbdbd",
9197
+ textAlign: "right"
9198
+ },
9199
+ textCritical: {
9200
+ color: reactComponents.tokens.colorPaletteRedBackground3
9201
+ },
9202
+ textMuted: {
9203
+ color: reactComponents.tokens.colorNeutralForegroundDisabled
9204
+ },
9205
+ subSection: {
9206
+ display: "flex",
9207
+ flexDirection: "column",
9208
+ gap: reactComponents.tokens.spacingVerticalS,
9209
+ marginTop: reactComponents.tokens.spacingVerticalS
9210
+ },
9211
+ totalRow: {
9212
+ display: "flex",
9213
+ justifyContent: "space-between",
9214
+ alignItems: "center",
9215
+ marginTop: reactComponents.tokens.spacingVerticalM,
9216
+ color: reactComponents.tokens.colorPaletteRedBackground3
9217
+ },
9218
+ totalLabel: {
9219
+ // Standard color for total label if needed
9220
+ },
9221
+ totalValue: {
9222
+ // Standard color for total value if needed
9223
+ },
9224
+ description: {
9225
+ color: reactComponents.tokens.colorNeutralForeground4,
9226
+ marginTop: "-8px"
9227
+ }
9228
+ });
9229
+ var CardPriceDetails = ({
9230
+ title = "Rincian Harga",
9231
+ sections,
9232
+ total
9233
+ }) => {
9234
+ const styles = useStyles32();
9235
+ const getVariantClass = (variant) => {
9236
+ switch (variant) {
9237
+ case "danger":
9238
+ return styles.textCritical;
9239
+ case "muted":
9240
+ return styles.textMuted;
9241
+ default:
9242
+ return "";
9243
+ }
9244
+ };
9245
+ const renderItem = (item, key) => {
9246
+ const variantClass = getVariantClass(item.variant);
9247
+ const isTaxLike = item.variant === "danger";
9248
+ return /* @__PURE__ */ jsxRuntime.jsxs(React5__default.default.Fragment, { children: [
9249
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.row, children: [
9250
+ isTaxLike ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { className: variantClass, children: item.name }) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: reactComponents.mergeClasses(styles.label, variantClass), children: item.name }),
9251
+ isTaxLike ? /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1Strong, { className: reactComponents.mergeClasses(styles.value, variantClass), children: [
9252
+ "Rp. ",
9253
+ item.price.toLocaleString("id-ID")
9254
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: reactComponents.mergeClasses(styles.value, variantClass), children: [
9255
+ item.isRedeem ? "-" : "Rp. ",
9256
+ item.price.toLocaleString("id-ID")
9257
+ ] })
9258
+ ] }),
9259
+ item.description && /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { className: styles.description, children: item.description })
9260
+ ] }, key);
9261
+ };
9262
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.card, children: [
9263
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerContainer, children: [
9264
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.headerTitle, children: title }),
9265
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerLine })
9266
+ ] }),
9267
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.container, children: [
9268
+ sections.map((section, index) => {
9269
+ if (section.title) {
9270
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.subSection, children: [
9271
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: section.title }),
9272
+ section.detail.map((item, i) => renderItem(item, i))
9273
+ ] }, index);
9274
+ }
9275
+ return /* @__PURE__ */ jsxRuntime.jsx(React5__default.default.Fragment, { children: section.detail.map((item, i) => renderItem(item, i)) }, index);
9276
+ }),
9277
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
9278
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.totalRow, children: [
9279
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.totalLabel, children: "Total Pembayaran" }),
9280
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle1, { className: styles.totalValue, children: [
9281
+ "Rp. ",
9282
+ total.toLocaleString("id-ID")
9283
+ ] })
9284
+ ] }),
9285
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}),
9286
+ /* @__PURE__ */ jsxRuntime.jsx(PriceDetailsTerms, {})
9287
+ ] })
9288
+ ] });
9289
+ };
9290
+ var useStyles33 = reactComponents.makeStyles({
9291
+ container: {
9292
+ display: "flex",
9293
+ flexDirection: "column",
9294
+ width: "100%",
9295
+ rowGap: reactComponents.tokens.spacingHorizontalXXL
9296
+ },
9297
+ dividerContainer: {
9298
+ marginBottom: reactComponents.tokens.spacingHorizontalXXL
9299
+ },
9300
+ title: {
9301
+ paddingLeft: reactComponents.tokens.spacingHorizontalSNudge,
9302
+ paddingRight: reactComponents.tokens.spacingHorizontalSNudge
9303
+ },
9304
+ itemContainer: {
9305
+ display: "flex",
9306
+ flexDirection: "column",
9307
+ gap: reactComponents.tokens.spacingHorizontalXXL,
9308
+ width: "100%"
9309
+ },
9310
+ optionContainer: {
9311
+ display: "flex",
9312
+ justifyContent: "space-between",
9313
+ width: "100%",
9314
+ cursor: "pointer",
9315
+ alignItems: "center"
9316
+ },
9317
+ codeImage: {
9318
+ display: "flex",
9319
+ gap: reactComponents.tokens.spacingHorizontalL,
9320
+ alignItems: "center",
9321
+ justifyContent: "center",
9322
+ textAlign: "center"
9323
+ },
9324
+ optionLabel: {
9325
+ color: reactComponents.tokens.colorNeutralForeground2
9326
+ },
9327
+ image: {
9328
+ width: "40px",
9329
+ height: "40px",
9330
+ objectFit: "contain"
9331
+ },
9332
+ card: {
9333
+ position: "relative",
9334
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
9335
+ ...reactComponents.shorthands.padding(reactComponents.tokens.spacingHorizontalXL, reactComponents.tokens.spacingVerticalXXL),
9336
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1,
9337
+ zIndex: 3
9338
+ }
9339
+ });
9340
+ var CardPaymentMethodList = ({
9341
+ methods,
9342
+ selectedValue,
9343
+ onSelect
9344
+ }) => {
9345
+ const styles = useStyles33();
9346
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.container}`, children: methods.map((category, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
9347
+ index > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) }),
9348
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Accordion, { multiple: true, collapsible: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionItem, { value: category.value, children: [
9349
+ /* @__PURE__ */ jsxRuntime.jsx(
9350
+ reactComponents.AccordionHeader,
9351
+ {
9352
+ expandIconPosition: "end",
9353
+ className: styles.title,
9354
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: category.title || category.value })
9355
+ }
9356
+ ),
9357
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.itemContainer, children: category.options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
9358
+ "div",
9359
+ {
9360
+ className: styles.optionContainer,
9361
+ onClick: () => onSelect(option.value),
9362
+ children: [
9363
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.codeImage, children: [
9364
+ /* @__PURE__ */ jsxRuntime.jsx(
9365
+ "img",
9366
+ {
9367
+ src: option.image,
9368
+ alt: option.label,
9369
+ className: styles.image
9370
+ }
9371
+ ),
9372
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { className: styles.optionLabel, children: option.label })
9373
+ ] }),
9374
+ /* @__PURE__ */ jsxRuntime.jsx(
9375
+ reactComponents.Radio,
9376
+ {
9377
+ checked: selectedValue === option.value,
9378
+ onChange: () => onSelect(option.value),
9379
+ value: option.value,
9380
+ name: "payment-method"
9381
+ }
9382
+ )
9383
+ ]
9384
+ },
9385
+ option.value
9386
+ )) }) })
9387
+ ] }) })
9388
+ ] }, category.value || index)) }) });
9389
+ };
9390
+ var useStyles34 = reactComponents.makeStyles({
9391
+ container: {
9392
+ display: "flex",
9393
+ flexDirection: "column",
9394
+ width: "100%"
9395
+ },
9396
+ titleContainer: {
9397
+ marginBottom: reactComponents.tokens.spacingVerticalM
9398
+ },
9399
+ title: {
9400
+ color: reactComponents.tokens.colorNeutralForeground2
9401
+ // Neutral_Stroke_Accessible_Rest based on Review.tsx usually
9402
+ },
9403
+ list: {
9404
+ margin: 0,
9405
+ padding: 0,
9406
+ listStyle: "none",
9407
+ counterReset: "guide-counter"
9408
+ },
9409
+ listItem: {
9410
+ counterIncrement: "guide-counter",
9411
+ display: "flex",
9412
+ marginBottom: reactComponents.tokens.spacingVerticalS,
9413
+ "&::before": {
9414
+ content: 'counter(guide-counter) "."',
9415
+ marginRight: reactComponents.tokens.spacingHorizontalS,
9416
+ fontWeight: reactComponents.tokens.fontWeightRegular
9417
+ }
9418
+ }
9419
+ });
9420
+ var CardPaymentGuide = ({
9421
+ title = "Cara Pembayaran",
9422
+ guides,
9423
+ className
9424
+ }) => {
9425
+ const styles = useStyles34();
9426
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
9427
+ title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.titleContainer, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { className: styles.title, children: title }) }),
9428
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Accordion, { collapsible: true, multiple: true, children: guides.map((guide, index) => /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionItem, { value: guide.value || String(index), children: [
9429
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionHeader, { expandIconPosition: "end", children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: guide.title }) }),
9430
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: styles.list, children: guide.steps.map((step, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles.listItem, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: step }) }, stepIndex)) }) })
9431
+ ] }, guide.value || index)) })
9432
+ ] });
9433
+ };
9434
+ var useStyles35 = reactComponents.makeStyles({
9435
+ container: {
9436
+ display: "flex",
9437
+ flexDirection: "column",
9438
+ gap: reactComponents.tokens.spacingHorizontalXXL,
9439
+ width: "100%"
9440
+ },
9441
+ headerRow: {
9442
+ display: "flex",
9443
+ flexDirection: "column",
9444
+ alignItems: "center",
9445
+ justifyContent: "center",
9446
+ gap: reactComponents.tokens.spacingHorizontalXXL,
9447
+ textAlign: "center"
9448
+ },
9449
+ expiryTitle: {
9450
+ fontSize: reactComponents.tokens.fontSizeBase500,
9451
+ // 19px approx/mapping
9452
+ color: reactComponents.tokens.colorPaletteRedBackground3
9453
+ // Foundation_Danger_error
9454
+ },
9455
+ infoCard: {
9456
+ border: `${reactComponents.tokens.strokeWidthThin} solid ${reactComponents.tokens.colorNeutralStroke1}`,
9457
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
9458
+ // 12px -> XLarge/Large depending on token map
9459
+ padding: reactComponents.tokens.spacingHorizontalXXL,
9460
+ display: "flex",
9461
+ flexDirection: "column",
9462
+ gap: reactComponents.tokens.spacingVerticalXXL
9463
+ },
9464
+ codeCard: {
9465
+ borderRadius: reactComponents.tokens.borderRadiusMedium,
9466
+ padding: reactComponents.tokens.spacingHorizontalL,
9467
+ backgroundColor: reactComponents.tokens.colorNeutralBackground3,
9468
+ // Neutral_Background_2_Rest
9469
+ display: "flex",
9470
+ flexDirection: "column",
9471
+ gap: reactComponents.tokens.spacingHorizontalL,
9472
+ alignItems: "center"
9473
+ },
9474
+ bankRow: {
9475
+ display: "flex",
9476
+ gap: reactComponents.tokens.spacingHorizontalM,
9477
+ justifyContent: "center",
9478
+ alignItems: "center"
9479
+ },
9480
+ vaRow: {
9481
+ display: "flex",
9482
+ flexDirection: "column",
9483
+ gap: reactComponents.tokens.spacingHorizontalXXXL,
9484
+ alignItems: "center"
9485
+ },
9486
+ input: {
9487
+ backgroundColor: reactComponents.tokens.colorNeutralBackground3
9488
+ },
9489
+ checkStatusButton: {
9490
+ width: "100%",
9491
+ border: `1px solid ${reactComponents.tokens.colorBrandBackground}`,
9492
+ color: reactComponents.tokens.colorBrandBackground
9493
+ },
9494
+ card: {
9495
+ position: "relative",
9496
+ ...reactComponents.shorthands.padding(
9497
+ reactComponents.tokens.spacingHorizontalXL,
9498
+ reactComponents.tokens.spacingHorizontalXXL
9499
+ ),
9500
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1,
9501
+ boxShadow: reactComponents.tokens.shadow4,
9502
+ zIndex: 3
9503
+ }
9504
+ });
9505
+ var CardPaymentInfo = ({
9506
+ expiryDate,
9507
+ bank,
9508
+ virtualAccount,
9509
+ totalAmount,
9510
+ guides,
9511
+ onCopyVA,
9512
+ onCheckStatus
9513
+ }) => {
9514
+ const styles = useStyles35();
9515
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.container, children: [
9516
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerRow, children: [
9517
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: "Kode virtual akun berlaku sampai" }),
9518
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title2, { className: styles.expiryTitle, children: expiryDate })
9519
+ ] }),
9520
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.infoCard, children: [
9521
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.codeCard, children: [
9522
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.bankRow, children: [
9523
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: bank.icon, alt: bank.name, width: 40, height: 40 }),
9524
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: bank.name })
9525
+ ] }),
9526
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.vaRow, children: [
9527
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title1, { children: virtualAccount }),
9528
+ /* @__PURE__ */ jsxRuntime.jsx(
9529
+ reactComponents.Button,
9530
+ {
9531
+ appearance: "primary",
9532
+ size: "large",
9533
+ shape: "circular",
9534
+ onClick: onCopyVA,
9535
+ children: "Salin Kode"
9536
+ }
9537
+ )
9538
+ ] })
9539
+ ] }),
9540
+ /* @__PURE__ */ jsxRuntime.jsx(
9541
+ reactComponents.Field,
9542
+ {
9543
+ size: "large",
9544
+ label: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { style: { color: reactComponents.tokens.colorNeutralForeground1 }, children: "Total Pembayaran" }),
9545
+ children: /* @__PURE__ */ jsxRuntime.jsx(
9546
+ reactComponents.Input,
9547
+ {
9548
+ disabled: true,
9549
+ value: `Rp. ${totalAmount.toLocaleString("id-ID")}`,
9550
+ className: styles.input
9551
+ }
9552
+ )
9553
+ }
9554
+ )
9555
+ ] }),
9556
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
9557
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: reactComponents.tokens.spacingVerticalM }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { style: { color: reactComponents.tokens.colorNeutralForeground2 }, children: "Klik tombol dibawah ini jika sudah melakukan pembayaran" }) }),
9558
+ /* @__PURE__ */ jsxRuntime.jsx(
9559
+ reactComponents.Button,
9560
+ {
9561
+ appearance: "secondary",
9562
+ size: "large",
9563
+ shape: "circular",
9564
+ className: styles.checkStatusButton,
9565
+ onClick: onCheckStatus,
9566
+ children: "Cek Status Pembayaran"
9567
+ }
9568
+ )
9569
+ ] }),
9570
+ /* @__PURE__ */ jsxRuntime.jsx(CardPaymentGuide, { guides })
9571
+ ] }) });
9572
+ };
9573
+ var useStyles36 = reactComponents.makeStyles({
9574
+ activeCard: {
9575
+ width: "100%",
9576
+ // padding: tokens.spacingHorizontalNone, // default
9577
+ color: reactComponents.tokens.colorNeutralStrokeAccessible
9578
+ },
9579
+ colGap: {
9580
+ gap: "58px"
9581
+ // approx spacing['580']
9582
+ },
9583
+ cardInfo: {
9584
+ border: `${reactComponents.tokens.strokeWidthThin} solid ${reactComponents.tokens.colorNeutralStroke1}`,
9585
+ backgroundColor: reactComponents.tokens.colorNeutralBackground1,
9586
+ borderRadius: reactComponents.tokens.borderRadiusXLarge,
9587
+ // borderRadius[120] -> XLarge approx
9588
+ padding: reactComponents.tokens.spacingHorizontalXXL
9589
+ },
9590
+ rowGap: {
9591
+ rowGap: "22px"
9592
+ // spacing[220]
9593
+ },
9594
+ gapdetail: {
9595
+ rowGap: reactComponents.tokens.spacingVerticalL
9596
+ },
9597
+ itemDetail: {
9598
+ display: "flex",
9599
+ justifyContent: "space-between"
9600
+ },
9601
+ divider: {
9602
+ "::before": {
9603
+ ...reactComponents.shorthands.borderColor(reactComponents.tokens.colorBrandBackground)
9604
+ // brandColors[80]
9605
+ }
9606
+ },
9607
+ titleDivider: {
9608
+ display: "flex",
9609
+ gap: "18px"
9610
+ // spacing[180]
9611
+ },
9612
+ centerContent: {
9613
+ display: "flex",
9614
+ justifyContent: "center",
9615
+ alignItems: "center",
9616
+ flexDirection: "column"
9617
+ }
9618
+ });
9619
+ var CardStatusOrder = ({
9620
+ bookingCode,
9621
+ departureDate,
9622
+ departureTime,
9623
+ arrivalDate,
9624
+ arrivalTime,
9625
+ origin,
9626
+ destination,
9627
+ duration = "-",
9628
+ vehicleClass,
9629
+ serviceType,
9630
+ vehicleNumber,
9631
+ shipType,
9632
+ statusLabel = "Sudah Dibayar",
9633
+ statusIcon,
9634
+ statusColor = "success",
9635
+ illustrationUrl = "/assets/images/illustrations/ticket.svg",
9636
+ title = "Pembayaran berhasil",
9637
+ description = "Tiket Anda aktif dan siap digunakan.",
9638
+ onClickViewTicket,
9639
+ className
9640
+ }) => {
9641
+ const styles = useStyles36();
9642
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.activeCard} ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { nogutter: true, className: styles.colGap, children: [
9643
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { direction: "column", nogutter: true, children: [
9644
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
9645
+ "img",
9646
+ {
9647
+ src: illustrationUrl,
9648
+ alt: "E-Ticket",
9649
+ width: 406,
9650
+ height: 266
9651
+ }
9652
+ ) }),
9653
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { direction: "column", justify: "center", align: "center", nogutter: true, children: [
9654
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: title }) }),
9655
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: description }) })
9656
+ ] }) })
9657
+ ] }) }),
9658
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.cardInfo, children: /* @__PURE__ */ jsxRuntime.jsxs(
9659
+ reactGridSystem.Row,
9660
+ {
9661
+ direction: "column",
9662
+ justify: "center",
9663
+ align: "center",
9664
+ nogutter: true,
9665
+ className: styles.rowGap,
9666
+ children: [
9667
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.titleDivider, children: [
9668
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: "Detail Pemesanan" }),
9669
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, { style: { width: 0 } })
9670
+ ] }) }),
9671
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { justify: "center", align: "center", nogutter: true, children: [
9672
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: "Status" }) }),
9673
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
9674
+ reactComponents.Badge,
9675
+ {
9676
+ color: statusColor,
9677
+ size: "extra-large",
9678
+ appearance: "filled",
9679
+ shape: "rounded",
9680
+ icon: statusIcon || /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:checkmark-circle-20-regular" }),
9681
+ children: statusLabel
9682
+ }
9683
+ ) })
9684
+ ] }) }),
9685
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { direction: "column", nogutter: true, className: styles.gapdetail, children: [
9686
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemDetail, children: [
9687
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1Stronger, { children: "Kode Booking" }),
9688
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: bookingCode })
9689
+ ] }) }),
9690
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemDetail, children: [
9691
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1Stronger, { children: "Jadwal Masuk Pelabuhan" }),
9692
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption1, { children: [
9693
+ departureDate,
9694
+ ", ",
9695
+ departureTime
9696
+ ] })
9697
+ ] }) }),
9698
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemDetail, children: [
9699
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1Stronger, { children: "Rute" }),
9700
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption1, { children: [
9701
+ origin,
9702
+ " ",
9703
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:arrow-right-20-regular" }),
9704
+ " ",
9705
+ destination
9706
+ ] })
9707
+ ] }) }),
9708
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemDetail, children: [
9709
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1Stronger, { children: "Jenis Pengguna Jasa" }),
9710
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: vehicleClass })
9711
+ ] }) }),
9712
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.itemDetail, children: [
9713
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1Stronger, { children: "Layanan" }),
9714
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption1, { children: shipType || serviceType })
9715
+ ] }) })
9716
+ ] }) }),
9717
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
9718
+ reactComponents.Button,
9719
+ {
9720
+ appearance: "primary",
9721
+ size: "large",
9722
+ style: { width: "100%" },
9723
+ shape: "circular",
9724
+ onClick: onClickViewTicket,
9725
+ children: "Lihat E-Tiket"
9726
+ }
9727
+ ) })
9728
+ ]
9729
+ }
9730
+ ) }) })
9731
+ ] }) });
9732
+ };
6432
9733
 
6433
9734
  exports.BackgroundTicketCard = BackgroundTicketCard_default;
6434
9735
  exports.BackgroundTicketCardVertical = BackgroundTicketCardVertical_default;
9736
+ exports.CardAddon = CardAddon;
6435
9737
  exports.CardBanner = CardBanner;
9738
+ exports.CardBookingTicket = CardBookingTicket;
9739
+ exports.CardFAQ = CardFAQ;
9740
+ exports.CardMealCatalog = CardMealCatalog;
9741
+ exports.CardOrdererInfo = CardOrdererInfo;
9742
+ exports.CardPassengerList = CardPassengerList;
9743
+ exports.CardPaymentGuide = CardPaymentGuide;
9744
+ exports.CardPaymentInfo = CardPaymentInfo;
9745
+ exports.CardPaymentMethodList = CardPaymentMethodList;
9746
+ exports.CardPriceDetails = CardPriceDetails;
6436
9747
  exports.CardPromo = CardPromo;
9748
+ exports.CardReview = CardReview;
9749
+ exports.CardReviewPassenger = CardReviewPassenger;
6437
9750
  exports.CardServiceMenu = CardServiceMenu;
9751
+ exports.CardStatusOrder = CardStatusOrder;
6438
9752
  exports.CardTicket = CardTicket;
6439
9753
  exports.CardTicketSearch = CardTicketSearch;
6440
9754
  exports.CardTicketSearchDefaultLabels = DEFAULT_LABELS;
6441
9755
  exports.CardTicketSearchSummary = CardTicketSearchSummary;
6442
9756
  exports.CardTicketSearchSummaryDefaultLabels = DEFAULT_LABELS2;
9757
+ exports.CardVehicleDetail = CardVehicleDetail;
9758
+ exports.CardVehicleOwnerForm = CardVehicleOwnerForm;
6443
9759
  exports.CarouselWithCustomNav = CarouselWithCustomNav;
6444
9760
  exports.DEFAULT_COUNTRY_CODES = DEFAULT_COUNTRY_CODES;
6445
9761
  exports.DEFAULT_DURATION_RANGE = DEFAULT_DURATION_RANGE;
@@ -6457,13 +9773,18 @@ exports.MODAL_PRESETS = MODAL_PRESETS;
6457
9773
  exports.ModalFilterTicket = ModalFilterTicket;
6458
9774
  exports.ModalFilterTicketDefaultLabels = DEFAULT_LABELS3;
6459
9775
  exports.ModalIllustration = ModalIllustration;
9776
+ exports.ModalListPassenger = ModalListPassenger;
9777
+ exports.ModalPassengerForm = ModalPassengerForm;
6460
9778
  exports.ModalSearchHarbor = ModalSearchHarbor;
6461
9779
  exports.ModalSearchTicket = ModalSearchTicket;
6462
9780
  exports.ModalSelectDate = ModalSelectDate;
6463
9781
  exports.ModalService = ModalService;
6464
9782
  exports.ModalTotalPassengers = ModalTotalPassengers;
6465
9783
  exports.ModalTypeOfService = ModalTypeOfService;
9784
+ exports.PriceDetailsTerms = PriceDetailsTerms;
6466
9785
  exports.SortMenu = SortMenu;
9786
+ exports.Stepper = Stepper;
9787
+ exports.getBadgeConfig = getBadgeConfig;
6467
9788
  exports.getModalPreset = getModalPreset;
6468
9789
  exports.getSortLabel = getSortLabel;
6469
9790
  //# sourceMappingURL=index.js.map