@asdp/ferryui 0.1.22-dev.8491 → 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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { makeStyles, tokens, shorthands, createLightTheme, createDarkTheme, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, mergeClasses, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, Subtitle1, Switch, typographyStyles, Textarea } from '@fluentui/react-components';
1
+ import { makeStyles, tokens, shorthands, createLightTheme, createDarkTheme, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, mergeClasses, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, Subtitle1, Switch, Body1Stronger, Caption1Stronger, Display, Image, Title1, typographyStyles, Textarea, Link } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React5, { forwardRef, useState, useCallback, useRef, useEffect, useMemo, Fragment as Fragment$1 } from 'react';
4
4
  import { Row, Col, Visible } from 'react-grid-system';
@@ -10,6 +10,7 @@ import Select from 'react-select';
10
10
  import { Calendar } from '@fluentui/react-calendar-compat';
11
11
  import moment from 'moment';
12
12
  import { Range } from 'react-range';
13
+ import { SubtractRegular, AddRegular, DeleteRegular, InfoRegular } from '@fluentui/react-icons';
13
14
 
14
15
  var useStyles = makeStyles({
15
16
  dialogSurface: {
@@ -7192,7 +7193,2535 @@ var CardPassengerList = ({
7192
7193
  }) })
7193
7194
  ] });
7194
7195
  };
7196
+ var useStyles23 = makeStyles({
7197
+ card: {
7198
+ padding: "1.5rem",
7199
+ borderRadius: tokens.borderRadiusXLarge,
7200
+ boxShadow: tokens.shadow4,
7201
+ zIndex: 3,
7202
+ width: "100%"
7203
+ },
7204
+ vehicleType: {
7205
+ display: "flex",
7206
+ alignItems: "center",
7207
+ gap: "0.75rem",
7208
+ marginTop: "1rem",
7209
+ marginBottom: "1.5rem"
7210
+ },
7211
+ radioGroup: {
7212
+ marginTop: "1rem"
7213
+ },
7214
+ question: {
7215
+ color: tokens.colorNeutralForeground1,
7216
+ marginBottom: "0.5rem"
7217
+ },
7218
+ headerTitle: {
7219
+ color: tokens.colorNeutralForeground3,
7220
+ fontWeight: "500",
7221
+ width: "250px"
7222
+ }
7223
+ });
7224
+ var CardVehicleDetail = ({
7225
+ serviceTitle,
7226
+ serviceImage,
7227
+ control,
7228
+ vehicleNumberName = "vehicleNumber",
7229
+ showLoadOption = false,
7230
+ hasLoad,
7231
+ onHasLoadChange
7232
+ }) => {
7233
+ const styles = useStyles23();
7234
+ return /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
7235
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7236
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: "Detail Kendaraan" }),
7237
+ /* @__PURE__ */ jsx("div", { style: { flex: 1, marginLeft: "1rem" }, children: /* @__PURE__ */ jsx(Divider, {}) })
7238
+ ] }),
7239
+ /* @__PURE__ */ jsxs("div", { className: styles.vehicleType, children: [
7240
+ /* @__PURE__ */ jsx(
7241
+ "img",
7242
+ {
7243
+ alt: serviceTitle,
7244
+ src: serviceImage,
7245
+ height: 75,
7246
+ width: 75,
7247
+ style: { objectFit: "contain" }
7248
+ }
7249
+ ),
7250
+ /* @__PURE__ */ jsx(Body1Strong, { children: serviceTitle })
7251
+ ] }),
7252
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.25rem" }, children: [
7253
+ /* @__PURE__ */ jsx(Body1, { style: { color: tokens.colorNeutralForeground1 }, children: "Nomor Kendaraan" }),
7254
+ /* @__PURE__ */ jsx(
7255
+ InputDynamic_default,
7256
+ {
7257
+ control,
7258
+ name: vehicleNumberName,
7259
+ placeholder: "Contoh: B1234CD",
7260
+ type: "text"
7261
+ }
7262
+ )
7263
+ ] }),
7264
+ showLoadOption && /* @__PURE__ */ jsxs("div", { className: styles.radioGroup, children: [
7265
+ /* @__PURE__ */ jsx(Body1, { className: styles.question, children: "Apakah kendaraan membawa muatan?" }),
7266
+ /* @__PURE__ */ jsxs(
7267
+ RadioGroup,
7268
+ {
7269
+ value: hasLoad,
7270
+ onChange: (_, data) => onHasLoadChange?.(data.value),
7271
+ layout: "horizontal",
7272
+ children: [
7273
+ /* @__PURE__ */ jsx(Radio, { value: "true", label: "Ya" }),
7274
+ /* @__PURE__ */ jsx(Radio, { value: "false", label: "Tidak" })
7275
+ ]
7276
+ }
7277
+ )
7278
+ ] })
7279
+ ] });
7280
+ };
7281
+ var useStyles24 = makeStyles({
7282
+ card: {
7283
+ padding: "1.5rem",
7284
+ borderRadius: tokens.borderRadiusXLarge,
7285
+ boxShadow: tokens.shadow4,
7286
+ zIndex: 3,
7287
+ marginTop: "1.5rem"
7288
+ },
7289
+ header: {
7290
+ display: "flex",
7291
+ justifyContent: "space-between",
7292
+ alignItems: "center",
7293
+ marginBottom: "1rem"
7294
+ },
7295
+ accordion: {
7296
+ ...shorthands.border("1px", "solid", tokens.colorNeutralStroke1),
7297
+ borderRadius: tokens.borderRadiusLarge,
7298
+ marginTop: "1rem"
7299
+ },
7300
+ accordionHeader: {
7301
+ backgroundColor: tokens.colorNeutralBackground2
7302
+ },
7303
+ form: {
7304
+ display: "flex",
7305
+ flexDirection: "column",
7306
+ gap: "1rem",
7307
+ padding: "1rem"
7308
+ },
7309
+ label: {
7310
+ color: tokens.colorNeutralForeground2,
7311
+ marginBottom: "0.25rem",
7312
+ display: "block"
7313
+ },
7314
+ link: {
7315
+ color: tokens.colorBrandForeground1,
7316
+ textDecorationLine: "none",
7317
+ ":hover": {
7318
+ textDecorationLine: "underline"
7319
+ }
7320
+ }
7321
+ });
7322
+ var CardVehicleOwnerForm = ({
7323
+ owners,
7324
+ hasLoad,
7325
+ control,
7326
+ watch,
7327
+ setValue,
7328
+ getValues,
7329
+ onAddOwner,
7330
+ onDeleteOwner,
7331
+ onUpdateOwner,
7332
+ onAddCargo,
7333
+ onDeleteCargo,
7334
+ onUpdateCargoQuantity,
7335
+ companyOptions = [],
7336
+ cityOptions = []
7337
+ }) => {
7338
+ const styles = useStyles24();
7339
+ return /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
7340
+ /* @__PURE__ */ jsxs("div", { className: styles.header, children: [
7341
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
7342
+ /* @__PURE__ */ jsx(Title3, { style: { marginRight: "1rem" }, children: "Informasi Pemilik & Muatan" }),
7343
+ /* @__PURE__ */ jsx(Divider, { style: { flex: 1 } })
7344
+ ] }),
7345
+ /* @__PURE__ */ jsx(
7346
+ Button,
7347
+ {
7348
+ appearance: "transparent",
7349
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:add-24-regular" }),
7350
+ style: { color: tokens.colorNeutralForeground2 },
7351
+ onClick: onAddOwner,
7352
+ children: "Tambah Pemilik"
7353
+ }
7354
+ )
7355
+ ] }),
7356
+ /* @__PURE__ */ jsx(Accordion, { collapsible: true, defaultOpenItems: owners.map((o) => String(o.id)), multiple: true, children: owners.map((owner, index) => /* @__PURE__ */ jsxs(
7357
+ AccordionItem,
7358
+ {
7359
+ value: String(owner.id),
7360
+ className: styles.accordion,
7361
+ children: [
7362
+ /* @__PURE__ */ jsx(AccordionHeader, { className: styles.accordionHeader, expandIconPosition: "end", children: /* @__PURE__ */ jsxs(
7363
+ "div",
7364
+ {
7365
+ style: {
7366
+ display: "flex",
7367
+ justifyContent: "space-between",
7368
+ alignItems: "center",
7369
+ width: "100%"
7370
+ },
7371
+ children: [
7372
+ /* @__PURE__ */ jsxs(Body1Strong, { children: [
7373
+ "Informasi Pemilik ",
7374
+ index + 1
7375
+ ] }),
7376
+ owners.length > 1 && /* @__PURE__ */ jsx(
7377
+ Button,
7378
+ {
7379
+ appearance: "transparent",
7380
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
7381
+ onClick: (e) => {
7382
+ e.stopPropagation();
7383
+ onDeleteOwner(owner.id);
7384
+ },
7385
+ style: { color: tokens.colorPaletteRedForeground1 }
7386
+ }
7387
+ )
7388
+ ]
7389
+ }
7390
+ ) }),
7391
+ /* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: styles.form, children: [
7392
+ /* @__PURE__ */ jsxs(Row, { children: [
7393
+ /* @__PURE__ */ jsx(Col, { lg: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Nama Pengirim" }) }),
7394
+ /* @__PURE__ */ jsxs(Col, { lg: 6, children: [
7395
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
7396
+ RadioGroup,
7397
+ {
7398
+ layout: "horizontal",
7399
+ value: owner.senderType,
7400
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7401
+ senderType: data.value
7402
+ }),
7403
+ children: [
7404
+ /* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
7405
+ /* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
7406
+ ]
7407
+ }
7408
+ ) }),
7409
+ /* @__PURE__ */ jsx(
7410
+ InputDynamic_default,
7411
+ {
7412
+ control,
7413
+ name: `owners.${index}.senderName`,
7414
+ placeholder: owner.senderType === "Perusahaan" ? "Pilih Nama Perusahaan" : "Masukkan Nama Pengirim",
7415
+ size: "large",
7416
+ type: owner.senderType === "Perusahaan" ? "select" : "text",
7417
+ options: owner.senderType === "Perusahaan" ? companyOptions : []
7418
+ }
7419
+ )
7420
+ ] }),
7421
+ /* @__PURE__ */ jsxs(Col, { lg: 6, children: [
7422
+ /* @__PURE__ */ jsx("div", { style: { height: "1rem" } }),
7423
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7424
+ "Data Estimasi Berat Muatan dan Kendaraan (Ton)",
7425
+ " ",
7426
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7427
+ ] }),
7428
+ /* @__PURE__ */ jsx(
7429
+ InputDynamic_default,
7430
+ {
7431
+ control,
7432
+ name: `owners.${index}.estimatedWeight`,
7433
+ placeholder: "Masukkan Angka",
7434
+ size: "large",
7435
+ type: "number"
7436
+ }
7437
+ )
7438
+ ] })
7439
+ ] }),
7440
+ /* @__PURE__ */ jsxs(Row, { children: [
7441
+ /* @__PURE__ */ jsxs(Col, { children: [
7442
+ /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Kota Asal" }),
7443
+ /* @__PURE__ */ jsx(
7444
+ InputDynamic_default,
7445
+ {
7446
+ control,
7447
+ name: `looseCargoOwners.${index}.originCity`,
7448
+ placeholder: "Pilih",
7449
+ type: "select",
7450
+ options: cityOptions
7451
+ }
7452
+ )
7453
+ ] }),
7454
+ /* @__PURE__ */ jsxs(Col, { children: [
7455
+ /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Kota Tujuan" }),
7456
+ /* @__PURE__ */ jsx(
7457
+ InputDynamic_default,
7458
+ {
7459
+ control,
7460
+ name: `looseCargoOwners.${index}.destinationCity`,
7461
+ placeholder: "Pilih",
7462
+ type: "select",
7463
+ options: cityOptions
7464
+ }
7465
+ )
7466
+ ] })
7467
+ ] }),
7468
+ hasLoad && /* @__PURE__ */ jsxs(Fragment, { children: [
7469
+ /* @__PURE__ */ jsxs(Row, { children: [
7470
+ /* @__PURE__ */ jsxs(Col, { children: [
7471
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7472
+ "Nama Perusahaan Pemilik Barang ",
7473
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7474
+ ] }),
7475
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
7476
+ RadioGroup,
7477
+ {
7478
+ layout: "horizontal",
7479
+ value: owner.cargoOwnerType || "Perusahaan",
7480
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7481
+ cargoOwnerType: data.value
7482
+ }),
7483
+ children: [
7484
+ /* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
7485
+ /* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
7486
+ ]
7487
+ }
7488
+ ) }),
7489
+ /* @__PURE__ */ jsx(
7490
+ InputDynamic_default,
7491
+ {
7492
+ control,
7493
+ name: `looseCargoOwners.${index}.cargoOwnerName`,
7494
+ placeholder: owner.cargoOwnerType === "Perusahaan" ? "Pilih Nama Perusahaan Pemilik Barang" : "Masukkan Nama Pemilik Barang",
7495
+ size: "large",
7496
+ type: owner.cargoOwnerType === "Perusahaan" ? "select" : "text",
7497
+ options: owner.cargoOwnerType === "Perusahaan" ? companyOptions : []
7498
+ }
7499
+ ),
7500
+ /* @__PURE__ */ jsx(
7501
+ Caption1,
7502
+ {
7503
+ style: {
7504
+ color: tokens.colorNeutralForeground3,
7505
+ marginTop: "0.25rem"
7506
+ },
7507
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7508
+ }
7509
+ )
7510
+ ] }),
7511
+ /* @__PURE__ */ jsxs(Col, { children: [
7512
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7513
+ "Nama Perusahaan Logistik ",
7514
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7515
+ ] }),
7516
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
7517
+ RadioGroup,
7518
+ {
7519
+ layout: "horizontal",
7520
+ value: owner.logisticsCompanyType || "Perseorangan",
7521
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7522
+ logisticsCompanyType: data.value
7523
+ }),
7524
+ children: [
7525
+ /* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
7526
+ /* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
7527
+ ]
7528
+ }
7529
+ ) }),
7530
+ /* @__PURE__ */ jsx(
7531
+ InputDynamic_default,
7532
+ {
7533
+ control,
7534
+ name: `looseCargoOwners.${index}.logisticsCompanyName`,
7535
+ placeholder: owner.logisticsCompanyType === "Perusahaan" ? "Pilih Nama Perusahaan Logistik" : "Masukkan Nama Logistik",
7536
+ size: "large",
7537
+ type: owner.logisticsCompanyType === "Perusahaan" ? "select" : "text",
7538
+ options: owner.logisticsCompanyType === "Perusahaan" ? companyOptions : []
7539
+ }
7540
+ ),
7541
+ /* @__PURE__ */ jsx(
7542
+ Caption1,
7543
+ {
7544
+ style: {
7545
+ color: tokens.colorNeutralForeground3,
7546
+ marginTop: "0.25rem"
7547
+ },
7548
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7549
+ }
7550
+ )
7551
+ ] })
7552
+ ] }),
7553
+ /* @__PURE__ */ jsxs(Row, { children: [
7554
+ /* @__PURE__ */ jsx(Col, { xs: 12, md: 12, lg: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Nama Perusahaan Penerima Barang" }) }),
7555
+ /* @__PURE__ */ jsxs(Col, { children: [
7556
+ /* @__PURE__ */ jsxs(
7557
+ RadioGroup,
7558
+ {
7559
+ layout: "horizontal",
7560
+ value: owner.cargoReceiverType || "Perusahaan",
7561
+ onChange: (_, data) => onUpdateOwner(owner.id, {
7562
+ cargoReceiverType: data.value
7563
+ }),
7564
+ children: [
7565
+ /* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
7566
+ /* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
7567
+ ]
7568
+ }
7569
+ ),
7570
+ /* @__PURE__ */ jsx(
7571
+ InputDynamic_default,
7572
+ {
7573
+ control,
7574
+ name: `looseCargoOwners.${index}.cargoReceiverName`,
7575
+ placeholder: owner.cargoReceiverType === "Perusahaan" ? "Pilih Nama Perusahaan Penerima Barang" : "Masukkan Nama Penerima Barang",
7576
+ size: "large",
7577
+ type: owner.cargoReceiverType === "Perusahaan" ? "select" : "text",
7578
+ options: owner.cargoReceiverType === "Perusahaan" ? companyOptions : []
7579
+ }
7580
+ ),
7581
+ /* @__PURE__ */ jsx(
7582
+ Caption1,
7583
+ {
7584
+ style: {
7585
+ color: tokens.colorNeutralForeground3,
7586
+ marginTop: "0.25rem"
7587
+ },
7588
+ children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
7589
+ }
7590
+ )
7591
+ ] }),
7592
+ /* @__PURE__ */ jsxs(Col, { children: [
7593
+ /* @__PURE__ */ jsx("div", { style: { height: ".5rem" } }),
7594
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7595
+ "Berat Muatan dan Kendaraan (Ton)",
7596
+ " ",
7597
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7598
+ ] }),
7599
+ /* @__PURE__ */ jsx(
7600
+ InputDynamic_default,
7601
+ {
7602
+ control,
7603
+ name: `looseCargoOwners.${index}.cargoWeight`,
7604
+ placeholder: "Masukkan Angka",
7605
+ type: "number",
7606
+ size: "large"
7607
+ }
7608
+ )
7609
+ ] })
7610
+ ] }),
7611
+ /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Daftar Muatan" }) }) }),
7612
+ /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsxs(Col, { xs: 12, children: [
7613
+ /* @__PURE__ */ jsx(
7614
+ Accordion,
7615
+ {
7616
+ collapsible: true,
7617
+ defaultOpenItems: owner.cargoItems?.map((cargo) => `cargo-${cargo.id}`) || [],
7618
+ multiple: true,
7619
+ children: owner.cargoItems?.map((cargo, cargoIndex) => /* @__PURE__ */ jsxs(
7620
+ AccordionItem,
7621
+ {
7622
+ value: `cargo-${cargo.id}`,
7623
+ className: styles.accordion,
7624
+ children: [
7625
+ /* @__PURE__ */ jsx(
7626
+ AccordionHeader,
7627
+ {
7628
+ className: styles.accordionHeader,
7629
+ expandIconPosition: "end",
7630
+ children: /* @__PURE__ */ jsx(
7631
+ "div",
7632
+ {
7633
+ style: {
7634
+ display: "flex",
7635
+ justifyContent: "space-between",
7636
+ alignItems: "center",
7637
+ width: "100%"
7638
+ },
7639
+ children: /* @__PURE__ */ jsxs(Body1Strong, { children: [
7640
+ "Muatan ",
7641
+ cargoIndex + 1
7642
+ ] })
7643
+ }
7644
+ )
7645
+ }
7646
+ ),
7647
+ /* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: styles.form, children: [
7648
+ /* @__PURE__ */ jsxs(Row, { children: [
7649
+ /* @__PURE__ */ jsxs(Col, { md: 3, children: [
7650
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7651
+ "Data Komoditas ",
7652
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7653
+ ] }),
7654
+ /* @__PURE__ */ jsx(
7655
+ InputDynamic_default,
7656
+ {
7657
+ control,
7658
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.commodity`,
7659
+ placeholder: "Pilih",
7660
+ type: "select",
7661
+ options: []
7662
+ }
7663
+ ),
7664
+ /* @__PURE__ */ jsxs(
7665
+ Caption1,
7666
+ {
7667
+ style: {
7668
+ color: tokens.colorNeutralForeground3,
7669
+ marginTop: "0.25rem"
7670
+ },
7671
+ children: [
7672
+ "Pahami definisi, jenis dan contoh komoditas",
7673
+ " ",
7674
+ /* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: "disini" })
7675
+ ]
7676
+ }
7677
+ )
7678
+ ] }),
7679
+ /* @__PURE__ */ jsxs(Col, { md: 3, children: [
7680
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7681
+ "Data Jenis Muatan",
7682
+ " ",
7683
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7684
+ ] }),
7685
+ /* @__PURE__ */ jsx(
7686
+ InputDynamic_default,
7687
+ {
7688
+ control,
7689
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`,
7690
+ placeholder: "Pilih",
7691
+ type: "select",
7692
+ options: [
7693
+ { value: "karung", label: "Karung" },
7694
+ { value: "kg", label: "Kg" },
7695
+ { value: "ton", label: "Ton" },
7696
+ { value: "unit", label: "Unit" }
7697
+ ]
7698
+ }
7699
+ ),
7700
+ /* @__PURE__ */ jsx(
7701
+ Caption1,
7702
+ {
7703
+ style: {
7704
+ color: tokens.colorNeutralForeground3,
7705
+ marginTop: "0.25rem"
7706
+ },
7707
+ children: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.'
7708
+ }
7709
+ )
7710
+ ] }),
7711
+ /* @__PURE__ */ jsxs(Col, { md: 3, children: [
7712
+ /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Jumlah Muatan" }),
7713
+ /* @__PURE__ */ jsxs(
7714
+ "div",
7715
+ {
7716
+ style: {
7717
+ display: "flex",
7718
+ alignItems: "center",
7719
+ border: `1px solid ${tokens.colorNeutralStroke1}`,
7720
+ borderRadius: tokens.borderRadiusMedium,
7721
+ height: "40px",
7722
+ padding: "0 12px",
7723
+ backgroundColor: tokens.colorNeutralBackground1
7724
+ },
7725
+ children: [
7726
+ /* @__PURE__ */ jsx("div", { style: { flex: 0.5 } }),
7727
+ /* @__PURE__ */ jsxs(
7728
+ "div",
7729
+ {
7730
+ style: {
7731
+ display: "flex",
7732
+ alignItems: "center",
7733
+ gap: "12px"
7734
+ },
7735
+ children: [
7736
+ /* @__PURE__ */ jsx(
7737
+ Button,
7738
+ {
7739
+ appearance: "transparent",
7740
+ icon: /* @__PURE__ */ jsx(
7741
+ Icon,
7742
+ {
7743
+ icon: "fluent:subtract-circle-24-regular",
7744
+ style: {
7745
+ fontSize: "24px",
7746
+ color: tokens.colorNeutralForeground4
7747
+ }
7748
+ }
7749
+ ),
7750
+ size: "small",
7751
+ onClick: () => {
7752
+ const currentVal = getValues(
7753
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
7754
+ ) || 0;
7755
+ const currentQty = Number(currentVal);
7756
+ if (currentQty > 0) {
7757
+ const newVal = currentQty - 1;
7758
+ setValue(
7759
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7760
+ newVal
7761
+ );
7762
+ onUpdateCargoQuantity(owner.id, cargo.id, newVal);
7763
+ }
7764
+ },
7765
+ style: { minWidth: "32px", padding: "0" }
7766
+ }
7767
+ ),
7768
+ /* @__PURE__ */ jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsx(
7769
+ Controller,
7770
+ {
7771
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7772
+ control,
7773
+ render: ({ field }) => /* @__PURE__ */ jsx(
7774
+ "input",
7775
+ {
7776
+ ...field,
7777
+ type: "number",
7778
+ style: {
7779
+ border: "none",
7780
+ width: "100%",
7781
+ textAlign: "center",
7782
+ outline: "none",
7783
+ backgroundColor: "transparent",
7784
+ color: tokens.colorNeutralForeground1,
7785
+ fontSize: tokens.fontSizeBase400,
7786
+ fontFamily: tokens.fontFamilyBase
7787
+ },
7788
+ onWheel: (e) => e.target.blur()
7789
+ }
7790
+ )
7791
+ }
7792
+ ) }),
7793
+ /* @__PURE__ */ jsx(
7794
+ Button,
7795
+ {
7796
+ appearance: "transparent",
7797
+ icon: /* @__PURE__ */ jsx(
7798
+ Icon,
7799
+ {
7800
+ icon: "fluent:add-circle-24-regular",
7801
+ style: {
7802
+ fontSize: "24px",
7803
+ color: tokens.colorBrandStroke1
7804
+ }
7805
+ }
7806
+ ),
7807
+ size: "small",
7808
+ onClick: () => {
7809
+ const currentVal = getValues(
7810
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
7811
+ ) || 0;
7812
+ const currentQty = Number(currentVal);
7813
+ const newVal = currentQty + 1;
7814
+ setValue(
7815
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
7816
+ newVal
7817
+ );
7818
+ onUpdateCargoQuantity(owner.id, cargo.id, newVal);
7819
+ },
7820
+ style: { minWidth: "32px", padding: "0" }
7821
+ }
7822
+ )
7823
+ ]
7824
+ }
7825
+ ),
7826
+ /* @__PURE__ */ jsx(
7827
+ "div",
7828
+ {
7829
+ style: {
7830
+ flex: 1,
7831
+ textAlign: "left",
7832
+ color: tokens.colorNeutralForeground1,
7833
+ fontSize: tokens.fontSizeBase300,
7834
+ paddingRight: "8px"
7835
+ },
7836
+ children: (() => {
7837
+ const type = watch(
7838
+ `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`
7839
+ );
7840
+ if (type === "karung") return "Karung";
7841
+ if (type === "kg") return "Kg";
7842
+ if (type === "ton") return "Ton";
7843
+ if (type === "unit") return "Unit";
7844
+ return "";
7845
+ })()
7846
+ }
7847
+ )
7848
+ ]
7849
+ }
7850
+ )
7851
+ ] }),
7852
+ /* @__PURE__ */ jsxs(Col, { md: 3, children: [
7853
+ /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Harga" }),
7854
+ /* @__PURE__ */ jsx(
7855
+ InputDynamic_default,
7856
+ {
7857
+ control,
7858
+ name: `owners.${index}.price`,
7859
+ placeholder: "Rp. 0",
7860
+ disabled: true,
7861
+ size: "large",
7862
+ type: "text"
7863
+ }
7864
+ )
7865
+ ] })
7866
+ ] }),
7867
+ /* @__PURE__ */ jsxs(Row, { children: [
7868
+ /* @__PURE__ */ jsxs(Col, { md: 6, children: [
7869
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7870
+ "Data Jenis Industri",
7871
+ " ",
7872
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7873
+ ] }),
7874
+ /* @__PURE__ */ jsx(
7875
+ InputDynamic_default,
7876
+ {
7877
+ control,
7878
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.industryType`,
7879
+ placeholder: "Pilih",
7880
+ type: "select",
7881
+ options: []
7882
+ }
7883
+ ),
7884
+ /* @__PURE__ */ jsx(
7885
+ Caption1,
7886
+ {
7887
+ style: {
7888
+ color: tokens.colorNeutralForeground3,
7889
+ marginTop: "0.25rem"
7890
+ },
7891
+ children: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.'
7892
+ }
7893
+ )
7894
+ ] }),
7895
+ /* @__PURE__ */ jsxs(Col, { md: 6, children: [
7896
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
7897
+ "Kategori Muatan ",
7898
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
7899
+ ] }),
7900
+ /* @__PURE__ */ jsx(
7901
+ InputDynamic_default,
7902
+ {
7903
+ control,
7904
+ name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoCategory`,
7905
+ placeholder: "Pilih",
7906
+ type: "select",
7907
+ options: []
7908
+ }
7909
+ ),
7910
+ /* @__PURE__ */ jsxs(
7911
+ Caption1,
7912
+ {
7913
+ style: {
7914
+ color: tokens.colorNeutralForeground3,
7915
+ marginTop: "0.25rem"
7916
+ },
7917
+ children: [
7918
+ "Pahami definisi, jenis dan contoh kategori muatan",
7919
+ " ",
7920
+ /* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: "disini" })
7921
+ ]
7922
+ }
7923
+ )
7924
+ ] })
7925
+ ] }),
7926
+ /* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsx(
7927
+ Button,
7928
+ {
7929
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
7930
+ onClick: (e) => {
7931
+ e.stopPropagation();
7932
+ onDeleteCargo(owner.id, cargo.id);
7933
+ },
7934
+ onKeyDown: (e) => {
7935
+ if (e.key === "Enter" || e.key === " ") {
7936
+ e.stopPropagation();
7937
+ onDeleteCargo(owner.id, cargo.id);
7938
+ }
7939
+ },
7940
+ size: "medium",
7941
+ shape: "circular",
7942
+ style: {
7943
+ border: `1px solid ${tokens.colorPaletteRedForeground1}`,
7944
+ color: tokens.colorPaletteRedForeground1,
7945
+ width: "100%"
7946
+ },
7947
+ children: "Hapus Muatan"
7948
+ }
7949
+ ) }) })
7950
+ ] }) })
7951
+ ]
7952
+ },
7953
+ cargo.id
7954
+ ))
7955
+ }
7956
+ ),
7957
+ /* @__PURE__ */ jsx(
7958
+ Button,
7959
+ {
7960
+ appearance: "secondary",
7961
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:add-24-regular" }),
7962
+ shape: "circular",
7963
+ style: {
7964
+ borderColor: tokens.colorBrandStroke1,
7965
+ color: tokens.colorBrandBackground,
7966
+ marginTop: "1rem",
7967
+ width: "100%"
7968
+ },
7969
+ onClick: () => onAddCargo(owner.id),
7970
+ children: "Tambah Muatan"
7971
+ }
7972
+ )
7973
+ ] }) })
7974
+ ] })
7975
+ ] }) })
7976
+ ]
7977
+ },
7978
+ owner.id
7979
+ )) })
7980
+ ] });
7981
+ };
7982
+ var useStyles25 = makeStyles({
7983
+ container: {
7984
+ display: "flex",
7985
+ flexDirection: "column",
7986
+ gap: "2rem"
7987
+ },
7988
+ bookingDetail: {
7989
+ overflow: "visible",
7990
+ borderRadius: tokens.borderRadiusXLarge,
7991
+ boxShadow: tokens.shadow4
7992
+ },
7993
+ bookingDetailTop: {
7994
+ padding: "2rem",
7995
+ borderBottomLeftRadius: 0,
7996
+ borderBottomRightRadius: 0,
7997
+ boxShadow: "none",
7998
+ borderTopLeftRadius: tokens.borderRadiusXLarge,
7999
+ borderTopRightRadius: tokens.borderRadiusXLarge,
8000
+ borderBottom: "0.7em dashed " + tokens.colorNeutralBackground1Hover,
8001
+ overflow: "visible",
8002
+ paddingBottom: "4rem",
8003
+ position: "relative"
8004
+ },
8005
+ bookingDetailBottom: {
8006
+ padding: "2rem",
8007
+ paddingTop: "4rem",
8008
+ borderTopLeftRadius: 0,
8009
+ borderTopRightRadius: 0,
8010
+ boxShadow: "none",
8011
+ borderBottomLeftRadius: tokens.borderRadiusXLarge,
8012
+ borderBottomRightRadius: tokens.borderRadiusXLarge,
8013
+ overflow: "visible",
8014
+ display: "flex",
8015
+ flexDirection: "column",
8016
+ alignItems: "center",
8017
+ justifyContent: "center",
8018
+ gap: "1.5rem"
8019
+ },
8020
+ circularLeft: {
8021
+ position: "absolute",
8022
+ width: "100px",
8023
+ height: "50px",
8024
+ borderRadius: "50%",
8025
+ backgroundColor: tokens.colorNeutralBackground1Hover,
8026
+ left: "-50px",
8027
+ bottom: "-30px",
8028
+ zIndex: 2,
8029
+ boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
8030
+ },
8031
+ circularRight: {
8032
+ position: "absolute",
8033
+ width: "100px",
8034
+ height: "50px",
8035
+ borderRadius: "50%",
8036
+ backgroundColor: tokens.colorNeutralBackground1Hover,
8037
+ right: "-50px",
8038
+ bottom: "-30px",
8039
+ zIndex: 2,
8040
+ boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
8041
+ },
8042
+ headerBookingDetail: {
8043
+ display: "flex",
8044
+ justifyContent: "space-between",
8045
+ alignItems: "center"
8046
+ },
8047
+ shipInfo: {
8048
+ display: "flex",
8049
+ flexDirection: "column",
8050
+ alignItems: "center",
8051
+ gap: "1rem"
8052
+ },
8053
+ ticketInfo: {
8054
+ display: "flex",
8055
+ justifyContent: "space-between",
8056
+ alignItems: "center",
8057
+ gap: "0.5em"
8058
+ },
8059
+ ticketTime: {
8060
+ display: "flex",
8061
+ flexDirection: "column",
8062
+ alignItems: "start",
8063
+ gap: "0.5em"
8064
+ },
8065
+ ticketDuration: {
8066
+ display: "flex",
8067
+ alignItems: "center",
8068
+ justifyContent: "center",
8069
+ gap: "0.5rem"
8070
+ },
8071
+ totalPrice: {
8072
+ display: "flex",
8073
+ alignItems: "center",
8074
+ justifyContent: "space-between",
8075
+ gap: "1rem",
8076
+ width: "100%"
8077
+ },
8078
+ gapButton: {
8079
+ width: "100%",
8080
+ display: "flex",
8081
+ flexDirection: "column",
8082
+ gap: tokens.spacingHorizontalM
8083
+ },
8084
+ priceText: {
8085
+ color: tokens.colorPaletteRedForeground1
8086
+ },
8087
+ secondaryButton: {
8088
+ border: "1px solid " + tokens.colorBrandStroke1,
8089
+ color: tokens.colorBrandBackground,
8090
+ width: "100%"
8091
+ }
8092
+ });
8093
+ var CardBookingTicket = ({
8094
+ shipName = "KMP PORTLINK",
8095
+ shipType = "Water Taxi",
8096
+ shipTypeColor = "success",
8097
+ departureDay = "Kamis, 25 Sep",
8098
+ departureTime = "18:15",
8099
+ departureLocation = "Merak, Banten",
8100
+ arrivalDay = "Jumat, 26 Sep",
8101
+ arrivalTime = "19:25",
8102
+ arrivalLocation = "Bakauheni, Lampung",
8103
+ duration = "1 jam 10 menit",
8104
+ totalPrice,
8105
+ reservationStep,
8106
+ paymentStep,
8107
+ onPriceDetailClick,
8108
+ onNext,
8109
+ onPrevious,
8110
+ className
8111
+ }) => {
8112
+ const styles = useStyles25();
8113
+ return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
8114
+ /* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
8115
+ /* @__PURE__ */ jsx(Subtitle1, { children: "Booking Details" }),
8116
+ /* @__PURE__ */ jsxs("div", { className: styles.headerBookingDetail, children: [
8117
+ /* @__PURE__ */ jsxs("div", { className: styles.shipInfo, children: [
8118
+ /* @__PURE__ */ jsx("img", { src: "/assets/logo/asdp-default.svg", width: 81, height: 54, alt: "asdp" }),
8119
+ /* @__PURE__ */ jsx(Body1, { children: shipName })
8120
+ ] }),
8121
+ /* @__PURE__ */ jsx(
8122
+ Badge,
8123
+ {
8124
+ size: "extra-large",
8125
+ appearance: "filled",
8126
+ color: shipTypeColor,
8127
+ iconPosition: "before",
8128
+ shape: "rounded",
8129
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:info-24-regular" }),
8130
+ children: shipType
8131
+ }
8132
+ )
8133
+ ] }),
8134
+ /* @__PURE__ */ jsx(Body1Strong, { children: "Rute Perjalanan" }),
8135
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.ticketInfo, children: [
8136
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
8137
+ /* @__PURE__ */ jsx(Caption2, { children: departureDay }),
8138
+ /* @__PURE__ */ jsxs(Body1Stronger, { children: [
8139
+ departureTime,
8140
+ " WIB"
8141
+ ] }),
8142
+ /* @__PURE__ */ jsx(Caption2, { children: departureLocation })
8143
+ ] }),
8144
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
8145
+ /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular" }),
8146
+ /* @__PURE__ */ jsxs(Caption2, { children: [
8147
+ "Estimasi ",
8148
+ duration
8149
+ ] })
8150
+ ] }),
8151
+ /* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
8152
+ /* @__PURE__ */ jsx(Caption2, { children: arrivalDay }),
8153
+ /* @__PURE__ */ jsxs(Body1Stronger, { children: [
8154
+ arrivalTime,
8155
+ " WIB"
8156
+ ] }),
8157
+ /* @__PURE__ */ jsx(Caption2, { children: arrivalLocation })
8158
+ ] })
8159
+ ] }) }),
8160
+ /* @__PURE__ */ jsx("div", { className: styles.circularLeft }),
8161
+ /* @__PURE__ */ jsx("div", { className: styles.circularRight })
8162
+ ] }),
8163
+ /* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailBottom, children: [
8164
+ /* @__PURE__ */ jsxs("div", { className: styles.totalPrice, children: [
8165
+ /* @__PURE__ */ jsx(Subtitle1, { children: "Total Harga" }),
8166
+ /* @__PURE__ */ jsxs(Title3, { className: styles.priceText, children: [
8167
+ "IDR ",
8168
+ totalPrice
8169
+ ] }),
8170
+ /* @__PURE__ */ jsx(
8171
+ Icon,
8172
+ {
8173
+ icon: "fluent:chevron-down-24-filled",
8174
+ onClick: onPriceDetailClick,
8175
+ style: { cursor: "pointer" }
8176
+ }
8177
+ )
8178
+ ] }),
8179
+ /* @__PURE__ */ jsxs("div", { className: styles.gapButton, children: [
8180
+ !(paymentStep === "pay") && /* @__PURE__ */ jsx(
8181
+ Button,
8182
+ {
8183
+ appearance: "primary",
8184
+ onClick: onNext,
8185
+ shape: "circular",
8186
+ size: "large",
8187
+ style: { width: "100%" },
8188
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-right-20-regular" }),
8189
+ iconPosition: "after",
8190
+ children: "Lanjutkan"
8191
+ }
8192
+ ),
8193
+ ["addon", "meals", "review", "payment", "eticket"].includes(reservationStep) && !["pay"].includes(paymentStep) && /* @__PURE__ */ jsx(
8194
+ Button,
8195
+ {
8196
+ appearance: "secondary",
8197
+ onClick: onPrevious,
8198
+ shape: "circular",
8199
+ size: "large",
8200
+ className: styles.secondaryButton,
8201
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-left-20-regular" }),
8202
+ iconPosition: "before",
8203
+ children: "Sebelumnya"
8204
+ }
8205
+ )
8206
+ ] }),
8207
+ paymentStep === "pay" && /* @__PURE__ */ jsxs("div", { className: styles.gapButton, children: [
8208
+ /* @__PURE__ */ jsx(
8209
+ Button,
8210
+ {
8211
+ appearance: "primary",
8212
+ shape: "circular",
8213
+ size: "large",
8214
+ style: { width: "100%" },
8215
+ onClick: onNext,
8216
+ children: "Lihat Pemesanan"
8217
+ }
8218
+ ),
8219
+ /* @__PURE__ */ jsx(
8220
+ Button,
8221
+ {
8222
+ appearance: "secondary",
8223
+ shape: "circular",
8224
+ size: "large",
8225
+ className: styles.secondaryButton,
8226
+ onClick: onPrevious,
8227
+ children: "Ubah Metode Pembayaran"
8228
+ }
8229
+ )
8230
+ ] })
8231
+ ] })
8232
+ ] }) });
8233
+ };
8234
+ var useStyles26 = makeStyles({
8235
+ faqSection: {
8236
+ // marginTop: '2rem', // Let parent control spacing if needed, or keep consistent
8237
+ },
8238
+ faqCard: {
8239
+ padding: "2rem",
8240
+ borderRadius: tokens.borderRadiusXLarge,
8241
+ boxShadow: tokens.shadow4
8242
+ },
8243
+ accordionItem: {
8244
+ borderBottom: `1px solid ${tokens.colorNeutralStroke2}`,
8245
+ padding: tokens.spacingVerticalS
8246
+ },
8247
+ accordionHeader: {
8248
+ fontSize: tokens.fontSizeBase300,
8249
+ fontWeight: tokens.fontWeightBold
8250
+ }
8251
+ });
8252
+ var FAQ_ITEMS = [
8253
+ {
8254
+ value: "1",
8255
+ question: "FAQ 1",
8256
+ 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?"
8257
+ },
8258
+ {
8259
+ value: "2",
8260
+ question: "FAQ 2",
8261
+ 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."
8262
+ },
8263
+ {
8264
+ value: "3",
8265
+ question: "FAQ 3",
8266
+ 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!"
8267
+ },
8268
+ {
8269
+ value: "4",
8270
+ question: "FAQ 4",
8271
+ 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!"
8272
+ }
8273
+ ];
8274
+ var CardFAQ = ({ className }) => {
8275
+ const styles = useStyles26();
8276
+ return /* @__PURE__ */ jsxs(Card, { className: styles.faqCard, children: [
8277
+ /* @__PURE__ */ jsx(Subtitle1, { children: "FAQ" }),
8278
+ /* @__PURE__ */ jsx(Accordion, { collapsible: true, children: FAQ_ITEMS.map((item) => /* @__PURE__ */ jsxs(AccordionItem, { value: item.value, className: styles.accordionItem, children: [
8279
+ /* @__PURE__ */ jsxs(AccordionHeader, { className: styles.accordionHeader, expandIconPosition: "end", children: [
8280
+ /* @__PURE__ */ jsx(
8281
+ Icon,
8282
+ {
8283
+ icon: "fluent:question-circle-28-regular",
8284
+ style: { marginRight: "5px" }
8285
+ }
8286
+ ),
8287
+ " ",
8288
+ item.question
8289
+ ] }),
8290
+ /* @__PURE__ */ jsx(AccordionPanel, { children: item.answer })
8291
+ ] }, item.value)) })
8292
+ ] });
8293
+ };
8294
+ var useStyles27 = makeStyles({
8295
+ card: {
8296
+ backgroundColor: tokens.colorNeutralBackground1,
8297
+ boxShadow: tokens.shadow4,
8298
+ ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalXXL),
8299
+ borderRadius: tokens.borderRadiusXLarge,
8300
+ zIndex: 3
8301
+ },
8302
+ gapRow: {
8303
+ display: "flex",
8304
+ flexDirection: "column",
8305
+ rowGap: tokens.spacingVerticalXXL
8306
+ },
8307
+ titleDivider: {
8308
+ display: "flex",
8309
+ alignItems: "center",
8310
+ width: "100%"
8311
+ },
8312
+ textTitle: {
8313
+ fontWeight: tokens.fontWeightRegular,
8314
+ whiteSpace: "nowrap",
8315
+ marginRight: tokens.spacingHorizontalM
8316
+ },
8317
+ sizeDivider: {
8318
+ flexGrow: 1
8319
+ },
8320
+ card1: {
8321
+ display: "flex",
8322
+ flexDirection: "column",
8323
+ ...shorthands.padding(tokens.spacingHorizontalL, tokens.spacingVerticalL),
8324
+ rowGap: tokens.spacingHorizontalM
8325
+ },
8326
+ horizontalContainer: {
8327
+ display: "flex",
8328
+ justifyContent: "space-between",
8329
+ alignItems: "center"
8330
+ },
8331
+ itemFlexCard1: {
8332
+ display: "flex",
8333
+ columnGap: tokens.spacingHorizontalM,
8334
+ alignItems: "center"
8335
+ },
8336
+ textContainerCard1: {
8337
+ display: "flex",
8338
+ flexDirection: "column"
8339
+ },
8340
+ img: {
8341
+ objectFit: "contain"
8342
+ },
8343
+ // Footer
8344
+ footerContainer: {
8345
+ display: "flex",
8346
+ justifyContent: "space-between",
8347
+ alignItems: "center",
8348
+ width: "100%"
8349
+ },
8350
+ footerColRight: {
8351
+ display: "flex",
8352
+ alignItems: "center"
8353
+ },
8354
+ detailToogle: {
8355
+ color: tokens.colorBrandForeground1
8356
+ },
8357
+ // Assurance Styles
8358
+ badge: {
8359
+ ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalL),
8360
+ backgroundColor: tokens.colorPaletteBlueBackground2,
8361
+ // Approximate for Shared_Dark_blue_Primary if not avail
8362
+ color: tokens.colorNeutralForegroundOnBrand,
8363
+ width: "fit-content"
8364
+ },
8365
+ breakdownContainer: {
8366
+ display: "flex",
8367
+ flexDirection: "column",
8368
+ gap: tokens.spacingVerticalM
8369
+ },
8370
+ breakdownRow: {
8371
+ display: "flex",
8372
+ justifyContent: "space-between",
8373
+ width: "100%"
8374
+ },
8375
+ // Meal Styles
8376
+ mealListContainer: {
8377
+ display: "flex",
8378
+ flexDirection: "column",
8379
+ rowGap: tokens.spacingVerticalXL,
8380
+ marginTop: tokens.spacingVerticalM
8381
+ },
8382
+ mealItem: {
8383
+ display: "flex",
8384
+ alignItems: "flex-start",
8385
+ columnGap: tokens.spacingHorizontalL,
8386
+ gap: "12px",
8387
+ ...shorthands.padding(tokens.spacingVerticalS, 0)
8388
+ },
8389
+ mealImage: {
8390
+ borderRadius: tokens.borderRadiusMedium,
8391
+ objectFit: "cover",
8392
+ flexShrink: 0
8393
+ },
8394
+ mealContent: {
8395
+ display: "flex",
8396
+ flexDirection: "column",
8397
+ flexGrow: 1,
8398
+ rowGap: tokens.spacingVerticalXS
8399
+ },
8400
+ mealDescription: {
8401
+ color: tokens.colorNeutralForeground3,
8402
+ display: "-webkit-box",
8403
+ WebkitLineClamp: "2",
8404
+ WebkitBoxOrient: "vertical",
8405
+ overflow: "hidden"
8406
+ },
8407
+ mealPriceInfo: {
8408
+ color: tokens.colorBrandBackground
8409
+ },
8410
+ mealActions: {
8411
+ display: "flex",
8412
+ flexDirection: "column",
8413
+ alignItems: "flex-end",
8414
+ rowGap: tokens.spacingVerticalM,
8415
+ flexShrink: 0
8416
+ },
8417
+ qtySelector: {
8418
+ display: "flex",
8419
+ alignItems: "center",
8420
+ columnGap: tokens.spacingHorizontalM
8421
+ },
8422
+ qtyButton: {
8423
+ minWidth: "32px",
8424
+ height: "32px",
8425
+ ...shorthands.padding(0)
8426
+ },
8427
+ deleteMealButton: {
8428
+ display: "flex",
8429
+ alignItems: "center",
8430
+ columnGap: tokens.spacingHorizontalS,
8431
+ color: tokens.colorPaletteRedForeground1,
8432
+ ...shorthands.border("1px", "solid", tokens.colorPaletteRedForeground1),
8433
+ ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalS),
8434
+ backgroundColor: "transparent",
8435
+ cursor: "pointer",
8436
+ fontSize: tokens.fontSizeBase300,
8437
+ ":hover": {
8438
+ backgroundColor: tokens.colorPaletteRedBackground1
8439
+ }
8440
+ },
8441
+ totalContainer: {
8442
+ display: "flex",
8443
+ justifyContent: "space-between",
8444
+ alignItems: "center",
8445
+ marginTop: tokens.spacingVerticalL,
8446
+ paddingTop: tokens.spacingVerticalM
8447
+ }
8448
+ });
8449
+ var CardAddon = ({
8450
+ title,
8451
+ itemTitle,
8452
+ itemSubtitle,
8453
+ iconUrl,
8454
+ description,
8455
+ rightAction,
8456
+ footerData,
8457
+ assuranceData,
8458
+ mealData,
8459
+ children,
8460
+ className
8461
+ }) => {
8462
+ const styles = useStyles27();
8463
+ return /* @__PURE__ */ jsx(Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.gapRow, children: [
8464
+ /* @__PURE__ */ jsxs("div", { className: styles.titleDivider, children: [
8465
+ /* @__PURE__ */ jsx(Title3, { className: styles.textTitle, children: title }),
8466
+ /* @__PURE__ */ jsx(Divider, { className: styles.sizeDivider })
8467
+ ] }),
8468
+ /* @__PURE__ */ jsxs("div", { className: styles.card1, children: [
8469
+ /* @__PURE__ */ jsxs("div", { className: styles.horizontalContainer, children: [
8470
+ /* @__PURE__ */ jsxs("div", { className: styles.itemFlexCard1, children: [
8471
+ iconUrl && /* @__PURE__ */ jsx(
8472
+ "img",
8473
+ {
8474
+ src: iconUrl,
8475
+ alt: "icon",
8476
+ width: 81,
8477
+ height: 56,
8478
+ className: styles.img
8479
+ }
8480
+ ),
8481
+ /* @__PURE__ */ jsxs("div", { className: styles.textContainerCard1, children: [
8482
+ /* @__PURE__ */ jsx(Subtitle2, { children: itemTitle }),
8483
+ /* @__PURE__ */ jsx(Caption1, { children: itemSubtitle })
8484
+ ] })
8485
+ ] }),
8486
+ rightAction
8487
+ ] }),
8488
+ description && /* @__PURE__ */ jsx("div", { style: { paddingRight: "20%" }, children: /* @__PURE__ */ jsx(Body1, { children: description }) }),
8489
+ footerData && /* @__PURE__ */ jsx(Fragment, { children: footerData.actionType === "detail-link" && /* @__PURE__ */ jsxs("div", { className: styles.footerContainer, children: [
8490
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Caption1, { children: [
8491
+ footerData.priceLabel,
8492
+ " ",
8493
+ /* @__PURE__ */ jsxs(Caption1Stronger, { children: [
8494
+ "Rp",
8495
+ footerData.price.toLocaleString("id-ID"),
8496
+ footerData.priceUnit
8497
+ ] })
8498
+ ] }) }),
8499
+ /* @__PURE__ */ jsx("div", { className: styles.footerColRight, children: /* @__PURE__ */ jsx(
8500
+ Button,
8501
+ {
8502
+ appearance: "transparent",
8503
+ size: "small",
8504
+ style: {
8505
+ color: tokens.colorBrandForeground1
8506
+ },
8507
+ onClick: footerData.onActionClick,
8508
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-down-12-regular" }),
8509
+ iconPosition: "after",
8510
+ children: /* @__PURE__ */ jsx(Caption1, { className: styles.detailToogle, children: footerData.actionLabel || "Lihat detail" })
8511
+ }
8512
+ ) })
8513
+ ] }) }),
8514
+ assuranceData && /* @__PURE__ */ jsxs(Fragment, { children: [
8515
+ /* @__PURE__ */ jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsxs(
8516
+ Badge,
8517
+ {
8518
+ size: "large",
8519
+ appearance: "filled",
8520
+ icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-16-regular" }),
8521
+ iconPosition: "after",
8522
+ className: styles.badge,
8523
+ style: { backgroundColor: "rgb(30, 57, 141)" },
8524
+ children: [
8525
+ assuranceData.totalPassenger,
8526
+ " Asuransi Penumpang"
8527
+ ]
8528
+ }
8529
+ ) }),
8530
+ /* @__PURE__ */ jsxs("div", { className: styles.breakdownContainer, children: [
8531
+ assuranceData.items.map((item, idx) => /* @__PURE__ */ jsxs("div", { className: styles.breakdownRow, children: [
8532
+ /* @__PURE__ */ jsxs(Body1, { children: [
8533
+ item.label,
8534
+ " (",
8535
+ item.priceDetails,
8536
+ ")"
8537
+ ] }),
8538
+ /* @__PURE__ */ jsxs(Body1, { children: [
8539
+ "Rp",
8540
+ item.totalPrice.toLocaleString("id-ID")
8541
+ ] })
8542
+ ] }, idx)),
8543
+ /* @__PURE__ */ jsxs("div", { className: styles.breakdownRow, children: [
8544
+ /* @__PURE__ */ jsx(Subtitle2, { children: "Total Harga" }),
8545
+ /* @__PURE__ */ jsxs(Subtitle2, { children: [
8546
+ "Rp",
8547
+ assuranceData.totalPrice.toLocaleString("id-ID")
8548
+ ] })
8549
+ ] })
8550
+ ] })
8551
+ ] }),
8552
+ mealData && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: styles.mealListContainer, children: mealData.items.map((item) => /* @__PURE__ */ jsxs("div", { className: styles.mealItem, children: [
8553
+ /* @__PURE__ */ jsx(
8554
+ "img",
8555
+ {
8556
+ src: item.image,
8557
+ alt: item.name,
8558
+ width: 119,
8559
+ height: 119,
8560
+ className: styles.mealImage
8561
+ }
8562
+ ),
8563
+ /* @__PURE__ */ jsxs("div", { className: styles.mealContent, children: [
8564
+ /* @__PURE__ */ jsx(Body1Strong, { children: item.name }),
8565
+ /* @__PURE__ */ jsx(Caption1, { className: styles.mealDescription, children: item.description }),
8566
+ /* @__PURE__ */ jsxs(Body1Strong, { className: styles.mealPriceInfo, children: [
8567
+ "Rp",
8568
+ item.price.toLocaleString("id-ID"),
8569
+ " x ",
8570
+ item.quantity,
8571
+ " = Rp",
8572
+ (item.price * item.quantity).toLocaleString("id-ID")
8573
+ ] })
8574
+ ] }),
8575
+ /* @__PURE__ */ jsxs("div", { className: styles.mealActions, children: [
8576
+ /* @__PURE__ */ jsxs("div", { className: styles.qtySelector, children: [
8577
+ /* @__PURE__ */ jsx(
8578
+ Button,
8579
+ {
8580
+ appearance: "subtle",
8581
+ shape: "circular",
8582
+ className: styles.qtyButton,
8583
+ disabled: item.quantity <= 1,
8584
+ icon: /* @__PURE__ */ jsx(SubtractRegular, {}),
8585
+ onClick: () => mealData.onUpdateQuantity(item.id, -1),
8586
+ style: {
8587
+ border: `1px solid ${item.quantity <= 1 ? tokens.colorNeutralForegroundDisabled : tokens.colorBrandBackground}`,
8588
+ color: item.quantity <= 1 ? tokens.colorNeutralForegroundDisabled : tokens.colorBrandBackground
8589
+ }
8590
+ }
8591
+ ),
8592
+ /* @__PURE__ */ jsx(Body1, { children: item.quantity }),
8593
+ /* @__PURE__ */ jsx(
8594
+ Button,
8595
+ {
8596
+ appearance: "subtle",
8597
+ className: styles.qtyButton,
8598
+ shape: "circular",
8599
+ icon: /* @__PURE__ */ jsx(AddRegular, {}),
8600
+ onClick: () => mealData.onUpdateQuantity(item.id, 1),
8601
+ style: {
8602
+ border: `1px solid ${tokens.colorBrandBackground}`,
8603
+ color: tokens.colorBrandBackground
8604
+ }
8605
+ }
8606
+ )
8607
+ ] }),
8608
+ /* @__PURE__ */ jsxs(
8609
+ Button,
8610
+ {
8611
+ appearance: "subtle",
8612
+ className: styles.deleteMealButton,
8613
+ shape: "rounded",
8614
+ onClick: () => mealData.onDelete(item.id),
8615
+ children: [
8616
+ /* @__PURE__ */ jsx(DeleteRegular, { fontSize: 18 }),
8617
+ "Hapus Pesanan"
8618
+ ]
8619
+ }
8620
+ )
8621
+ ] })
8622
+ ] }, item.id)) }) }),
8623
+ footerData && footerData.actionType === "primary-button" && /* @__PURE__ */ jsxs(Fragment, { children: [
8624
+ /* @__PURE__ */ jsxs("div", { className: styles.totalContainer, children: [
8625
+ /* @__PURE__ */ jsx(Subtitle2, { children: footerData.priceLabel }),
8626
+ /* @__PURE__ */ jsxs(Subtitle1, { style: { fontSize: tokens.fontSizeBase600 }, children: [
8627
+ "Rp. ",
8628
+ footerData.price.toLocaleString("id-ID")
8629
+ ] })
8630
+ ] }),
8631
+ /* @__PURE__ */ jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsx(
8632
+ Button,
8633
+ {
8634
+ appearance: "secondary",
8635
+ shape: "circular",
8636
+ onClick: footerData.onActionClick,
8637
+ style: {
8638
+ width: "100%",
8639
+ borderColor: tokens.colorBrandStroke1,
8640
+ color: tokens.colorBrandBackground
8641
+ },
8642
+ children: footerData.actionLabel
8643
+ }
8644
+ ) })
8645
+ ] }),
8646
+ children
8647
+ ] })
8648
+ ] }) });
8649
+ };
8650
+ var useStyles28 = makeStyles({
8651
+ container: {
8652
+ display: "flex",
8653
+ flexDirection: "column",
8654
+ gap: tokens.spacingVerticalXXL
8655
+ },
8656
+ banner: {
8657
+ position: "relative",
8658
+ height: "240px",
8659
+ width: "100%",
8660
+ borderRadius: tokens.borderRadiusXLarge,
8661
+ overflow: "hidden",
8662
+ display: "flex",
8663
+ flexDirection: "column",
8664
+ justifyContent: "center",
8665
+ alignItems: "center",
8666
+ color: "white",
8667
+ textAlign: "center",
8668
+ ...shorthands.padding(tokens.spacingVerticalXXL)
8669
+ },
8670
+ bannerOverlay: {
8671
+ position: "absolute",
8672
+ top: 0,
8673
+ left: 0,
8674
+ right: 0,
8675
+ bottom: 0,
8676
+ backgroundColor: "rgba(0, 0, 0, 0.4)",
8677
+ zIndex: 1
8678
+ },
8679
+ bannerBg: {
8680
+ position: "absolute",
8681
+ top: 0,
8682
+ left: 0,
8683
+ right: 0,
8684
+ bottom: 0,
8685
+ objectFit: "cover",
8686
+ zIndex: 0,
8687
+ width: "100%",
8688
+ height: "100%"
8689
+ },
8690
+ bannerContent: {
8691
+ position: "relative",
8692
+ zIndex: 2
8693
+ },
8694
+ bannerTitle: {
8695
+ fontSize: "48px",
8696
+ fontWeight: tokens.fontWeightBold,
8697
+ marginBottom: tokens.spacingVerticalS,
8698
+ color: "white"
8699
+ // Ensure text is white on banner
8700
+ },
8701
+ bannerSubtitle: {
8702
+ color: "white"
8703
+ },
8704
+ disclaimer: {
8705
+ display: "flex",
8706
+ alignItems: "center",
8707
+ gap: tokens.spacingHorizontalS,
8708
+ backgroundColor: tokens.colorNeutralBackground2,
8709
+ ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalM),
8710
+ ...shorthands.border("1px", "solid", tokens.colorNeutralStroke2),
8711
+ borderRadius: tokens.borderRadiusMedium
8712
+ },
8713
+ sectionTitle: {
8714
+ marginBottom: tokens.spacingVerticalL
8715
+ },
8716
+ grid: {
8717
+ display: "grid",
8718
+ gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
8719
+ columnGap: tokens.spacingHorizontalL,
8720
+ rowGap: tokens.spacingVerticalL
8721
+ },
8722
+ productCard: {
8723
+ display: "flex",
8724
+ flexDirection: "row",
8725
+ ...shorthands.padding(tokens.spacingVerticalM),
8726
+ gap: tokens.spacingHorizontalM,
8727
+ height: "100%"
8728
+ },
8729
+ productImage: {
8730
+ width: "100px",
8731
+ height: "100px",
8732
+ borderRadius: tokens.borderRadiusMedium,
8733
+ objectFit: "cover",
8734
+ flexShrink: 0
8735
+ },
8736
+ productInfo: {
8737
+ display: "flex",
8738
+ flexDirection: "column",
8739
+ justifyContent: "space-between",
8740
+ flexGrow: 1
8741
+ },
8742
+ productDescription: {
8743
+ color: tokens.colorNeutralForeground3,
8744
+ display: "-webkit-box",
8745
+ WebkitLineClamp: "2",
8746
+ WebkitBoxOrient: "vertical",
8747
+ overflow: "hidden",
8748
+ marginBottom: tokens.spacingVerticalS
8749
+ },
8750
+ productFooter: {
8751
+ display: "flex",
8752
+ justifyContent: "space-between",
8753
+ alignItems: "center",
8754
+ marginTop: "auto"
8755
+ },
8756
+ price: {
8757
+ color: "#D13438",
8758
+ // Or use a token if available/consistent
8759
+ fontWeight: tokens.fontWeightSemibold
8760
+ },
8761
+ quantitySelector: {
8762
+ display: "flex",
8763
+ alignItems: "center",
8764
+ gap: tokens.spacingHorizontalS
8765
+ },
8766
+ addButton: {
8767
+ // We'll use color="brand" or similar from Fluent v9 if possible, or fallback to custom styles
8768
+ // ...shorthands.border('1px', 'solid', tokens.colorBrandStroke1),
8769
+ // color: tokens.colorBrandForeground1,
8770
+ },
8771
+ // Replicating the custom add button style from original
8772
+ customAddButton: {
8773
+ border: "1px solid rgb(30, 57, 141)",
8774
+ // tokensV2.lightModeColors.Brand_Stroke_1_Rest
8775
+ color: "rgb(30, 57, 141)"
8776
+ // tokensV2.lightModeColors.Brand_Foreground_1_Rest
8777
+ }
8778
+ });
8779
+ var CardMealCatalog = ({
8780
+ banner,
8781
+ disclaimerText,
8782
+ categories,
8783
+ onAdd,
8784
+ onUpdateQuantity,
8785
+ className
8786
+ }) => {
8787
+ const styles = useStyles28();
8788
+ return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
8789
+ /* @__PURE__ */ jsxs("div", { className: styles.banner, children: [
8790
+ /* @__PURE__ */ jsx("div", { className: styles.bannerOverlay }),
8791
+ /* @__PURE__ */ jsx(
8792
+ "img",
8793
+ {
8794
+ src: banner.imageUrl,
8795
+ alt: banner.title,
8796
+ className: styles.bannerBg
8797
+ }
8798
+ ),
8799
+ /* @__PURE__ */ jsxs("div", { className: styles.bannerContent, children: [
8800
+ /* @__PURE__ */ jsx(Display, { className: styles.bannerTitle, children: banner.title }),
8801
+ /* @__PURE__ */ jsx("br", {}),
8802
+ /* @__PURE__ */ jsx(Title2, { className: styles.bannerSubtitle, children: banner.subtitle })
8803
+ ] })
8804
+ ] }),
8805
+ /* @__PURE__ */ jsxs("div", { className: styles.disclaimer, children: [
8806
+ /* @__PURE__ */ jsx(InfoRegular, {}),
8807
+ /* @__PURE__ */ jsx(Caption1, { children: disclaimerText })
8808
+ ] }),
8809
+ categories.map((cat, index) => /* @__PURE__ */ jsxs("section", { children: [
8810
+ /* @__PURE__ */ jsx(Title3, { className: styles.sectionTitle, style: { textTransform: "capitalize" }, children: cat.category }),
8811
+ /* @__PURE__ */ jsx("br", {}),
8812
+ /* @__PURE__ */ jsx("br", {}),
8813
+ /* @__PURE__ */ jsx("div", { className: styles.grid, children: cat.list.map((item) => /* @__PURE__ */ jsxs(Card, { className: styles.productCard, children: [
8814
+ /* @__PURE__ */ jsx(Image, { src: item.image, alt: item.name, className: styles.productImage }),
8815
+ /* @__PURE__ */ jsxs("div", { className: styles.productInfo, children: [
8816
+ /* @__PURE__ */ jsxs("div", { children: [
8817
+ /* @__PURE__ */ jsx(Subtitle2, { children: item.name }),
8818
+ /* @__PURE__ */ jsx(Caption1, { className: styles.productDescription, children: item.description })
8819
+ ] }),
8820
+ /* @__PURE__ */ jsxs("div", { className: styles.productFooter, children: [
8821
+ /* @__PURE__ */ jsxs(Body1, { className: styles.price, children: [
8822
+ "Rp",
8823
+ item.price.toLocaleString("id-ID")
8824
+ ] }),
8825
+ item.quantity > 0 ? /* @__PURE__ */ jsxs("div", { className: styles.quantitySelector, children: [
8826
+ /* @__PURE__ */ jsx(
8827
+ Button,
8828
+ {
8829
+ size: "small",
8830
+ shape: "circular",
8831
+ icon: /* @__PURE__ */ jsx(SubtractRegular, {}),
8832
+ onClick: () => onUpdateQuantity(item.id, -1)
8833
+ }
8834
+ ),
8835
+ /* @__PURE__ */ jsx(Body1, { children: item.quantity }),
8836
+ /* @__PURE__ */ jsx(
8837
+ Button,
8838
+ {
8839
+ size: "small",
8840
+ shape: "circular",
8841
+ icon: /* @__PURE__ */ jsx(AddRegular, {}),
8842
+ onClick: () => onUpdateQuantity(item.id, 1)
8843
+ }
8844
+ )
8845
+ ] }) : /* @__PURE__ */ jsx(
8846
+ Button,
8847
+ {
8848
+ size: "small",
8849
+ shape: "rounded",
8850
+ className: styles.customAddButton,
8851
+ onClick: () => onAdd(item),
8852
+ children: "Tambah"
8853
+ }
8854
+ )
8855
+ ] })
8856
+ ] })
8857
+ ] }, item.id)) })
8858
+ ] }, index))
8859
+ ] });
8860
+ };
8861
+ var useStyles29 = makeStyles({
8862
+ card: {
8863
+ padding: "1.5rem",
8864
+ borderRadius: tokens.borderRadiusXLarge,
8865
+ boxShadow: tokens.shadow4,
8866
+ zIndex: 3
8867
+ },
8868
+ headerContainer: {
8869
+ display: "flex",
8870
+ alignItems: "center",
8871
+ marginBottom: "1rem",
8872
+ gap: "1rem"
8873
+ },
8874
+ headerTitle: {
8875
+ whiteSpace: "nowrap",
8876
+ fontWeight: tokens.fontWeightSemibold
8877
+ },
8878
+ headerLine: {
8879
+ height: "1px",
8880
+ flexGrow: 1,
8881
+ backgroundColor: tokens.colorNeutralStroke2
8882
+ },
8883
+ contentContainer: {
8884
+ display: "flex",
8885
+ flexDirection: "column",
8886
+ gap: tokens.spacingVerticalM
8887
+ },
8888
+ row: {
8889
+ display: "flex",
8890
+ justifyContent: "space-between",
8891
+ alignItems: "center"
8892
+ },
8893
+ defaultLabel: {
8894
+ color: tokens.colorNeutralForeground2
8895
+ },
8896
+ defaultValue: {
8897
+ // color: tokens.colorNeutralForegroundDisabled, // In ferizy: tokensV2.lightModeColors.Neutral_Foreground_Disabled_Rest
8898
+ color: "#bdbdbd",
8899
+ // Approximate fallback or use token if available in ferryui context
8900
+ textAlign: "right"
8901
+ }
8902
+ });
8903
+ var CardReview = ({
8904
+ title,
8905
+ items,
8906
+ children,
8907
+ className,
8908
+ headerAction
8909
+ }) => {
8910
+ const styles = useStyles29();
8911
+ return /* @__PURE__ */ jsxs(Card, { className: `${styles.card} ${className || ""}`, children: [
8912
+ /* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
8913
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title }),
8914
+ /* @__PURE__ */ jsx("div", { className: styles.headerLine }),
8915
+ headerAction && /* @__PURE__ */ jsx("div", { children: headerAction })
8916
+ ] }),
8917
+ /* @__PURE__ */ jsxs("div", { className: styles.contentContainer, children: [
8918
+ items?.map((item, index) => /* @__PURE__ */ jsxs("div", { className: `${styles.row} ${item.className || ""}`, children: [
8919
+ typeof item.label === "string" ? /* @__PURE__ */ jsx(Caption1, { className: `${styles.defaultLabel} ${item.labelClassName || ""}`, children: item.label }) : (
8920
+ // Clone element to append className if it's a valid React element
8921
+ React5.isValidElement(item.label) ? React5.cloneElement(item.label, {
8922
+ className: `${styles.defaultLabel} ${item.labelClassName || ""}${item.label.props.className ? " " + item.label.props.className : ""}`
8923
+ }) : /* @__PURE__ */ jsx("div", { className: `${styles.defaultLabel} ${item.labelClassName || ""}`, children: item.label })
8924
+ ),
8925
+ typeof item.value === "string" || typeof item.value === "number" ? /* @__PURE__ */ jsx(Body1, { className: `${styles.defaultValue} ${item.valueClassName || ""}`, children: item.value }) : /* @__PURE__ */ jsx("div", { className: `${styles.defaultValue} ${item.valueClassName || ""}`, children: item.value })
8926
+ ] }, index)),
8927
+ children
8928
+ ] })
8929
+ ] });
8930
+ };
8931
+ var getBadgeConfig2 = (ticketClass) => {
8932
+ const normalizedClass = ticketClass?.toUpperCase();
8933
+ switch (normalizedClass) {
8934
+ case "EKONOMI":
8935
+ case "ECONOMY":
8936
+ return {
8937
+ color: "#A74109",
8938
+ icon: "/assets/images/class/shield_badge_ekonomi.svg"
8939
+ };
8940
+ case "BISNIS":
8941
+ case "BUSINESS":
8942
+ return {
8943
+ color: "#859599",
8944
+ icon: "/assets/images/class/ribbon_badge_bisnis.svg"
8945
+ };
8946
+ case "EKSEKUTIF":
8947
+ case "EXECUTIVE":
8948
+ return {
8949
+ color: "#C19C00",
8950
+ icon: "/assets/images/class/crown_badge_eksekutif.svg"
8951
+ };
8952
+ default:
8953
+ return {
8954
+ color: tokens.colorNeutralBackground3,
8955
+ icon: ""
8956
+ };
8957
+ }
8958
+ };
8959
+ var useStyles30 = makeStyles({
8960
+ card: {
8961
+ padding: "1.5rem",
8962
+ borderRadius: tokens.borderRadiusXLarge,
8963
+ boxShadow: tokens.shadow4,
8964
+ zIndex: 3
8965
+ },
8966
+ headerContainer: {
8967
+ display: "flex",
8968
+ alignItems: "center",
8969
+ marginBottom: "1rem",
8970
+ gap: "1rem"
8971
+ },
8972
+ headerTitle: {
8973
+ whiteSpace: "nowrap",
8974
+ fontWeight: tokens.fontWeightSemibold
8975
+ },
8976
+ headerLine: {
8977
+ height: "1px",
8978
+ flexGrow: 1,
8979
+ backgroundColor: tokens.colorNeutralStroke2
8980
+ },
8981
+ contentContainer: {
8982
+ display: "flex",
8983
+ flexDirection: "column"
8984
+ },
8985
+ passengerItem: {
8986
+ display: "flex",
8987
+ flexDirection: "column",
8988
+ gap: tokens.spacingVerticalS,
8989
+ paddingBottom: tokens.spacingVerticalL,
8990
+ paddingTop: tokens.spacingVerticalM,
8991
+ borderBottom: `1px solid ${tokens.colorNeutralStroke2}`,
8992
+ ":last-child": {
8993
+ borderBottom: "none",
8994
+ paddingBottom: 0
8995
+ }
8996
+ // Matches styles.passengerItem in Review.tsx
8997
+ },
8998
+ itemHeader: {
8999
+ display: "flex",
9000
+ justifyContent: "space-between",
9001
+ alignItems: "center",
9002
+ marginBottom: tokens.spacingVerticalS
9003
+ },
9004
+ name: {
9005
+ color: "#00B8D4",
9006
+ // Cyan color from design
9007
+ fontSize: tokens.fontSizeBase400
9008
+ },
9009
+ // Badge Styles
9010
+ badgeContainer: {
9011
+ display: "flex",
9012
+ alignItems: "center",
9013
+ position: "relative"
9014
+ },
9015
+ badgeContent: {
9016
+ display: "flex",
9017
+ alignItems: "center",
9018
+ padding: "0.25rem 0.75rem 0.25rem 1.5rem",
9019
+ // Extra left padding for the icon overlap
9020
+ borderRadius: "0 4px 4px 0",
9021
+ borderTopRightRadius: "9999px",
9022
+ borderBottomRightRadius: "9999px",
9023
+ color: "white",
9024
+ fontSize: tokens.fontSizeBase200,
9025
+ fontWeight: tokens.fontWeightMedium,
9026
+ marginLeft: "-14px",
9027
+ // Pull the text container under the icon
9028
+ minHeight: "24px"
9029
+ },
9030
+ badgeIcon: {
9031
+ width: "28px",
9032
+ height: "32px",
9033
+ zIndex: 1,
9034
+ filter: "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"
9035
+ },
9036
+ fields: {
9037
+ display: "grid",
9038
+ gridTemplateColumns: "1fr 1fr",
9039
+ gap: tokens.spacingHorizontalL
9040
+ },
9041
+ inputBox: {
9042
+ border: `1px solid ${tokens.colorNeutralStroke1}`,
9043
+ borderRadius: tokens.borderRadiusMedium,
9044
+ padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalM}`,
9045
+ display: "flex",
9046
+ alignItems: "center",
9047
+ height: "32px"
9048
+ }
9049
+ });
9050
+ var CardReviewPassenger = ({
9051
+ title = "Penumpang",
9052
+ passengers,
9053
+ className
9054
+ }) => {
9055
+ const styles = useStyles30();
9056
+ return /* @__PURE__ */ jsxs(Card, { className: `${styles.card} ${className || ""}`, children: [
9057
+ /* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
9058
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title }),
9059
+ /* @__PURE__ */ jsx("div", { className: styles.headerLine })
9060
+ ] }),
9061
+ /* @__PURE__ */ jsx("div", { className: styles.contentContainer, children: passengers.map((passenger, index) => {
9062
+ const badgeConfig = getBadgeConfig2(passenger.serviceClass);
9063
+ return /* @__PURE__ */ jsxs("div", { className: styles.passengerItem, children: [
9064
+ /* @__PURE__ */ jsxs("div", { className: styles.itemHeader, children: [
9065
+ /* @__PURE__ */ jsx(Subtitle2, { className: styles.name, children: passenger.name }),
9066
+ /* @__PURE__ */ jsxs("div", { className: styles.badgeContainer, children: [
9067
+ badgeConfig.icon && /* @__PURE__ */ jsx(
9068
+ Image,
9069
+ {
9070
+ src: badgeConfig.icon,
9071
+ alt: passenger.ticketClass,
9072
+ className: styles.badgeIcon,
9073
+ height: 28,
9074
+ width: 24
9075
+ }
9076
+ ),
9077
+ /* @__PURE__ */ jsx(
9078
+ "div",
9079
+ {
9080
+ className: styles.badgeContent,
9081
+ style: { backgroundColor: badgeConfig.color },
9082
+ children: passenger.ticketClass
9083
+ }
9084
+ )
9085
+ ] })
9086
+ ] }),
9087
+ /* @__PURE__ */ jsxs("div", { className: styles.fields, children: [
9088
+ /* @__PURE__ */ jsx(Field, { label: "Nomor ID", size: "small", children: /* @__PURE__ */ jsx("div", { className: styles.inputBox, children: /* @__PURE__ */ jsx(Body1, { children: passenger.identityNumber }) }) }),
9089
+ /* @__PURE__ */ jsx(
9090
+ Field,
9091
+ {
9092
+ label: passenger.ageLabel,
9093
+ size: "small",
9094
+ children: /* @__PURE__ */ jsx("div", { className: styles.inputBox, children: /* @__PURE__ */ jsx(Body1, { children: passenger.ageValue }) })
9095
+ }
9096
+ )
9097
+ ] })
9098
+ ] }, passenger.id || index);
9099
+ }) })
9100
+ ] });
9101
+ };
9102
+ var useStyles31 = makeStyles({
9103
+ list: {
9104
+ margin: 0,
9105
+ padding: 0,
9106
+ listStyle: "none",
9107
+ counterReset: "list-counter"
9108
+ },
9109
+ listItem: {
9110
+ counterIncrement: "list-counter",
9111
+ display: "flex",
9112
+ marginBottom: tokens.spacingVerticalS,
9113
+ "&::before": {
9114
+ content: 'counter(list-counter) "."',
9115
+ marginRight: tokens.spacingHorizontalS,
9116
+ fontWeight: tokens.fontWeightRegular
9117
+ }
9118
+ }
9119
+ });
9120
+ var PriceDetailsTerms = () => {
9121
+ const styles = useStyles31();
9122
+ const linkColor = tokens.colorBrandBackground;
9123
+ const bookingTerms = [
9124
+ "Transaksi booking akan dibatalkan secara otomatis apabila Anda tidak menyelesaikan pembayaran pada periode waktu yang telah ditentukan.",
9125
+ "Setelah pembyaran berhasil, dikumen E-Tiket dapat di unduh melailui E-Mail atau menu \u201CPesanan Saya\u201D di Web Reservation atau Mobile Application Ferizy.",
9126
+ "Dokumen E-Tiket wajib ditunjukan saat melakukan proses Masuk Pelabuhan (Check-In)",
9127
+ "Anda sudah dapat Masuk Pelabuhan (Check-In) mulai dari 2 (dua) jam sebelum jadwal masukpelabuhan yang Anda pilih.",
9128
+ "Tiket akan hangus (expired) apabila Anda belum Masuk Pelabuhan (Check-In) hingga melewati batas waktu jadwal Masuk Pelabuhan yang Anda pilih."
9129
+ ];
9130
+ const agreementTerms = [
9131
+ /* @__PURE__ */ jsxs(Fragment, { children: [
9132
+ /* @__PURE__ */ jsx(Link, { href: "/terms-and-conditions", style: { color: linkColor }, children: "Syarat & Ketentuan" }),
9133
+ "\xA0Ferizy."
9134
+ ] }),
9135
+ /* @__PURE__ */ jsxs(Fragment, { children: [
9136
+ "Ketentuan persyaratan menyeberang sesuai dengan\xA0",
9137
+ /* @__PURE__ */ jsx(Link, { href: "/surat-edaran-satgas-covid-19", style: { color: linkColor }, children: "Surat Edaran Satgas Covid-19 Nomor 23 Tahun 2002." })
9138
+ ] }),
9139
+ "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."
9140
+ ];
9141
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9142
+ /* @__PURE__ */ jsx(Body1, { children: /* @__PURE__ */ jsx("ul", { className: styles.list, children: bookingTerms.map((term, index) => /* @__PURE__ */ jsx("li", { className: styles.listItem, children: term }, index)) }) }),
9143
+ /* @__PURE__ */ jsx(Divider, {}),
9144
+ /* @__PURE__ */ jsxs(Body1, { children: [
9145
+ "Dengan menekan tombol \u201CLanjutkan Pembayaran\u201D, maka saya telah membaca dan menyetujuii :",
9146
+ /* @__PURE__ */ jsx("ul", { className: styles.list, children: agreementTerms.map((term, index) => /* @__PURE__ */ jsx("li", { className: styles.listItem, children: term }, index)) })
9147
+ ] })
9148
+ ] });
9149
+ };
9150
+ var useStyles32 = makeStyles({
9151
+ card: {
9152
+ padding: "1.5rem",
9153
+ borderRadius: tokens.borderRadiusXLarge,
9154
+ boxShadow: tokens.shadow4,
9155
+ zIndex: 3
9156
+ },
9157
+ headerContainer: {
9158
+ display: "flex",
9159
+ alignItems: "center",
9160
+ marginBottom: "1rem",
9161
+ gap: "1rem"
9162
+ },
9163
+ headerTitle: {
9164
+ whiteSpace: "nowrap",
9165
+ fontWeight: tokens.fontWeightSemibold
9166
+ },
9167
+ headerLine: {
9168
+ height: "1px",
9169
+ flexGrow: 1,
9170
+ backgroundColor: tokens.colorNeutralStroke2
9171
+ },
9172
+ container: {
9173
+ display: "flex",
9174
+ flexDirection: "column",
9175
+ gap: tokens.spacingVerticalM
9176
+ },
9177
+ row: {
9178
+ display: "flex",
9179
+ justifyContent: "space-between",
9180
+ alignItems: "center"
9181
+ },
9182
+ label: {
9183
+ color: tokens.colorNeutralForeground2
9184
+ },
9185
+ value: {
9186
+ // Standard value color - using token or fallback
9187
+ color: "#bdbdbd",
9188
+ textAlign: "right"
9189
+ },
9190
+ textCritical: {
9191
+ color: tokens.colorPaletteRedBackground3
9192
+ },
9193
+ textMuted: {
9194
+ color: tokens.colorNeutralForegroundDisabled
9195
+ },
9196
+ subSection: {
9197
+ display: "flex",
9198
+ flexDirection: "column",
9199
+ gap: tokens.spacingVerticalS,
9200
+ marginTop: tokens.spacingVerticalS
9201
+ },
9202
+ totalRow: {
9203
+ display: "flex",
9204
+ justifyContent: "space-between",
9205
+ alignItems: "center",
9206
+ marginTop: tokens.spacingVerticalM,
9207
+ color: tokens.colorPaletteRedBackground3
9208
+ },
9209
+ totalLabel: {
9210
+ // Standard color for total label if needed
9211
+ },
9212
+ totalValue: {
9213
+ // Standard color for total value if needed
9214
+ },
9215
+ description: {
9216
+ color: tokens.colorNeutralForeground4,
9217
+ marginTop: "-8px"
9218
+ }
9219
+ });
9220
+ var CardPriceDetails = ({
9221
+ title = "Rincian Harga",
9222
+ sections,
9223
+ total
9224
+ }) => {
9225
+ const styles = useStyles32();
9226
+ const getVariantClass = (variant) => {
9227
+ switch (variant) {
9228
+ case "danger":
9229
+ return styles.textCritical;
9230
+ case "muted":
9231
+ return styles.textMuted;
9232
+ default:
9233
+ return "";
9234
+ }
9235
+ };
9236
+ const renderItem = (item, key) => {
9237
+ const variantClass = getVariantClass(item.variant);
9238
+ const isTaxLike = item.variant === "danger";
9239
+ return /* @__PURE__ */ jsxs(React5.Fragment, { children: [
9240
+ /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
9241
+ isTaxLike ? /* @__PURE__ */ jsx(Body1Strong, { className: variantClass, children: item.name }) : /* @__PURE__ */ jsx(Caption1, { className: mergeClasses(styles.label, variantClass), children: item.name }),
9242
+ isTaxLike ? /* @__PURE__ */ jsxs(Body1Strong, { className: mergeClasses(styles.value, variantClass), children: [
9243
+ "Rp. ",
9244
+ item.price.toLocaleString("id-ID")
9245
+ ] }) : /* @__PURE__ */ jsxs(Body1, { className: mergeClasses(styles.value, variantClass), children: [
9246
+ item.isRedeem ? "-" : "Rp. ",
9247
+ item.price.toLocaleString("id-ID")
9248
+ ] })
9249
+ ] }),
9250
+ item.description && /* @__PURE__ */ jsx(Caption1, { className: styles.description, children: item.description })
9251
+ ] }, key);
9252
+ };
9253
+ return /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
9254
+ /* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
9255
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title }),
9256
+ /* @__PURE__ */ jsx("div", { className: styles.headerLine })
9257
+ ] }),
9258
+ /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
9259
+ sections.map((section, index) => {
9260
+ if (section.title) {
9261
+ return /* @__PURE__ */ jsxs("div", { className: styles.subSection, children: [
9262
+ /* @__PURE__ */ jsx(Body1Strong, { children: section.title }),
9263
+ section.detail.map((item, i) => renderItem(item, i))
9264
+ ] }, index);
9265
+ }
9266
+ return /* @__PURE__ */ jsx(React5.Fragment, { children: section.detail.map((item, i) => renderItem(item, i)) }, index);
9267
+ }),
9268
+ /* @__PURE__ */ jsx(Divider, {}),
9269
+ /* @__PURE__ */ jsxs("div", { className: styles.totalRow, children: [
9270
+ /* @__PURE__ */ jsx(Subtitle1, { className: styles.totalLabel, children: "Total Pembayaran" }),
9271
+ /* @__PURE__ */ jsxs(Subtitle1, { className: styles.totalValue, children: [
9272
+ "Rp. ",
9273
+ total.toLocaleString("id-ID")
9274
+ ] })
9275
+ ] }),
9276
+ /* @__PURE__ */ jsx(Divider, {}),
9277
+ /* @__PURE__ */ jsx(PriceDetailsTerms, {})
9278
+ ] })
9279
+ ] });
9280
+ };
9281
+ var useStyles33 = makeStyles({
9282
+ container: {
9283
+ display: "flex",
9284
+ flexDirection: "column",
9285
+ width: "100%",
9286
+ rowGap: tokens.spacingHorizontalXXL
9287
+ },
9288
+ dividerContainer: {
9289
+ marginBottom: tokens.spacingHorizontalXXL
9290
+ },
9291
+ title: {
9292
+ paddingLeft: tokens.spacingHorizontalSNudge,
9293
+ paddingRight: tokens.spacingHorizontalSNudge
9294
+ },
9295
+ itemContainer: {
9296
+ display: "flex",
9297
+ flexDirection: "column",
9298
+ gap: tokens.spacingHorizontalXXL,
9299
+ width: "100%"
9300
+ },
9301
+ optionContainer: {
9302
+ display: "flex",
9303
+ justifyContent: "space-between",
9304
+ width: "100%",
9305
+ cursor: "pointer",
9306
+ alignItems: "center"
9307
+ },
9308
+ codeImage: {
9309
+ display: "flex",
9310
+ gap: tokens.spacingHorizontalL,
9311
+ alignItems: "center",
9312
+ justifyContent: "center",
9313
+ textAlign: "center"
9314
+ },
9315
+ optionLabel: {
9316
+ color: tokens.colorNeutralForeground2
9317
+ },
9318
+ image: {
9319
+ width: "40px",
9320
+ height: "40px",
9321
+ objectFit: "contain"
9322
+ },
9323
+ card: {
9324
+ position: "relative",
9325
+ borderRadius: tokens.borderRadiusXLarge,
9326
+ ...shorthands.padding(tokens.spacingHorizontalXL, tokens.spacingVerticalXXL),
9327
+ backgroundColor: tokens.colorNeutralBackground1,
9328
+ zIndex: 3
9329
+ }
9330
+ });
9331
+ var CardPaymentMethodList = ({
9332
+ methods,
9333
+ selectedValue,
9334
+ onSelect
9335
+ }) => {
9336
+ const styles = useStyles33();
9337
+ return /* @__PURE__ */ jsx("div", { className: styles.card, children: /* @__PURE__ */ jsx("div", { className: `${styles.container}`, children: methods.map((category, index) => /* @__PURE__ */ jsxs("div", { children: [
9338
+ index > 0 && /* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, {}) }),
9339
+ /* @__PURE__ */ jsx(Accordion, { multiple: true, collapsible: true, children: /* @__PURE__ */ jsxs(AccordionItem, { value: category.value, children: [
9340
+ /* @__PURE__ */ jsx(
9341
+ AccordionHeader,
9342
+ {
9343
+ expandIconPosition: "end",
9344
+ className: styles.title,
9345
+ children: /* @__PURE__ */ jsx(Body1, { children: category.title || category.value })
9346
+ }
9347
+ ),
9348
+ /* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsx("div", { className: styles.itemContainer, children: category.options.map((option) => /* @__PURE__ */ jsxs(
9349
+ "div",
9350
+ {
9351
+ className: styles.optionContainer,
9352
+ onClick: () => onSelect(option.value),
9353
+ children: [
9354
+ /* @__PURE__ */ jsxs("div", { className: styles.codeImage, children: [
9355
+ /* @__PURE__ */ jsx(
9356
+ "img",
9357
+ {
9358
+ src: option.image,
9359
+ alt: option.label,
9360
+ className: styles.image
9361
+ }
9362
+ ),
9363
+ /* @__PURE__ */ jsx(Subtitle2, { className: styles.optionLabel, children: option.label })
9364
+ ] }),
9365
+ /* @__PURE__ */ jsx(
9366
+ Radio,
9367
+ {
9368
+ checked: selectedValue === option.value,
9369
+ onChange: () => onSelect(option.value),
9370
+ value: option.value,
9371
+ name: "payment-method"
9372
+ }
9373
+ )
9374
+ ]
9375
+ },
9376
+ option.value
9377
+ )) }) })
9378
+ ] }) })
9379
+ ] }, category.value || index)) }) });
9380
+ };
9381
+ var useStyles34 = makeStyles({
9382
+ container: {
9383
+ display: "flex",
9384
+ flexDirection: "column",
9385
+ width: "100%"
9386
+ },
9387
+ titleContainer: {
9388
+ marginBottom: tokens.spacingVerticalM
9389
+ },
9390
+ title: {
9391
+ color: tokens.colorNeutralForeground2
9392
+ // Neutral_Stroke_Accessible_Rest based on Review.tsx usually
9393
+ },
9394
+ list: {
9395
+ margin: 0,
9396
+ padding: 0,
9397
+ listStyle: "none",
9398
+ counterReset: "guide-counter"
9399
+ },
9400
+ listItem: {
9401
+ counterIncrement: "guide-counter",
9402
+ display: "flex",
9403
+ marginBottom: tokens.spacingVerticalS,
9404
+ "&::before": {
9405
+ content: 'counter(guide-counter) "."',
9406
+ marginRight: tokens.spacingHorizontalS,
9407
+ fontWeight: tokens.fontWeightRegular
9408
+ }
9409
+ }
9410
+ });
9411
+ var CardPaymentGuide = ({
9412
+ title = "Cara Pembayaran",
9413
+ guides,
9414
+ className
9415
+ }) => {
9416
+ const styles = useStyles34();
9417
+ return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
9418
+ title && /* @__PURE__ */ jsx("div", { className: styles.titleContainer, children: /* @__PURE__ */ jsx(Subtitle1, { className: styles.title, children: title }) }),
9419
+ /* @__PURE__ */ jsx(Accordion, { collapsible: true, multiple: true, children: guides.map((guide, index) => /* @__PURE__ */ jsxs(AccordionItem, { value: guide.value || String(index), children: [
9420
+ /* @__PURE__ */ jsx(AccordionHeader, { expandIconPosition: "end", children: /* @__PURE__ */ jsx(Body1, { children: guide.title }) }),
9421
+ /* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsx("ul", { className: styles.list, children: guide.steps.map((step, stepIndex) => /* @__PURE__ */ jsx("li", { className: styles.listItem, children: /* @__PURE__ */ jsx(Body1, { children: step }) }, stepIndex)) }) })
9422
+ ] }, guide.value || index)) })
9423
+ ] });
9424
+ };
9425
+ var useStyles35 = makeStyles({
9426
+ container: {
9427
+ display: "flex",
9428
+ flexDirection: "column",
9429
+ gap: tokens.spacingHorizontalXXL,
9430
+ width: "100%"
9431
+ },
9432
+ headerRow: {
9433
+ display: "flex",
9434
+ flexDirection: "column",
9435
+ alignItems: "center",
9436
+ justifyContent: "center",
9437
+ gap: tokens.spacingHorizontalXXL,
9438
+ textAlign: "center"
9439
+ },
9440
+ expiryTitle: {
9441
+ fontSize: tokens.fontSizeBase500,
9442
+ // 19px approx/mapping
9443
+ color: tokens.colorPaletteRedBackground3
9444
+ // Foundation_Danger_error
9445
+ },
9446
+ infoCard: {
9447
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
9448
+ borderRadius: tokens.borderRadiusXLarge,
9449
+ // 12px -> XLarge/Large depending on token map
9450
+ padding: tokens.spacingHorizontalXXL,
9451
+ display: "flex",
9452
+ flexDirection: "column",
9453
+ gap: tokens.spacingVerticalXXL
9454
+ },
9455
+ codeCard: {
9456
+ borderRadius: tokens.borderRadiusMedium,
9457
+ padding: tokens.spacingHorizontalL,
9458
+ backgroundColor: tokens.colorNeutralBackground3,
9459
+ // Neutral_Background_2_Rest
9460
+ display: "flex",
9461
+ flexDirection: "column",
9462
+ gap: tokens.spacingHorizontalL,
9463
+ alignItems: "center"
9464
+ },
9465
+ bankRow: {
9466
+ display: "flex",
9467
+ gap: tokens.spacingHorizontalM,
9468
+ justifyContent: "center",
9469
+ alignItems: "center"
9470
+ },
9471
+ vaRow: {
9472
+ display: "flex",
9473
+ flexDirection: "column",
9474
+ gap: tokens.spacingHorizontalXXXL,
9475
+ alignItems: "center"
9476
+ },
9477
+ input: {
9478
+ backgroundColor: tokens.colorNeutralBackground3
9479
+ },
9480
+ checkStatusButton: {
9481
+ width: "100%",
9482
+ border: `1px solid ${tokens.colorBrandBackground}`,
9483
+ color: tokens.colorBrandBackground
9484
+ },
9485
+ card: {
9486
+ position: "relative",
9487
+ ...shorthands.padding(
9488
+ tokens.spacingHorizontalXL,
9489
+ tokens.spacingHorizontalXXL
9490
+ ),
9491
+ backgroundColor: tokens.colorNeutralBackground1,
9492
+ boxShadow: tokens.shadow4,
9493
+ zIndex: 3
9494
+ }
9495
+ });
9496
+ var CardPaymentInfo = ({
9497
+ expiryDate,
9498
+ bank,
9499
+ virtualAccount,
9500
+ totalAmount,
9501
+ guides,
9502
+ onCopyVA,
9503
+ onCheckStatus
9504
+ }) => {
9505
+ const styles = useStyles35();
9506
+ return /* @__PURE__ */ jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
9507
+ /* @__PURE__ */ jsxs("div", { className: styles.headerRow, children: [
9508
+ /* @__PURE__ */ jsx(Subtitle1, { children: "Kode virtual akun berlaku sampai" }),
9509
+ /* @__PURE__ */ jsx(Title2, { className: styles.expiryTitle, children: expiryDate })
9510
+ ] }),
9511
+ /* @__PURE__ */ jsxs("div", { className: styles.infoCard, children: [
9512
+ /* @__PURE__ */ jsxs("div", { className: styles.codeCard, children: [
9513
+ /* @__PURE__ */ jsxs("div", { className: styles.bankRow, children: [
9514
+ /* @__PURE__ */ jsx("img", { src: bank.icon, alt: bank.name, width: 40, height: 40 }),
9515
+ /* @__PURE__ */ jsx(Subtitle2, { children: bank.name })
9516
+ ] }),
9517
+ /* @__PURE__ */ jsxs("div", { className: styles.vaRow, children: [
9518
+ /* @__PURE__ */ jsx(Title1, { children: virtualAccount }),
9519
+ /* @__PURE__ */ jsx(
9520
+ Button,
9521
+ {
9522
+ appearance: "primary",
9523
+ size: "large",
9524
+ shape: "circular",
9525
+ onClick: onCopyVA,
9526
+ children: "Salin Kode"
9527
+ }
9528
+ )
9529
+ ] })
9530
+ ] }),
9531
+ /* @__PURE__ */ jsx(
9532
+ Field,
9533
+ {
9534
+ size: "large",
9535
+ label: /* @__PURE__ */ jsx(Subtitle2, { style: { color: tokens.colorNeutralForeground1 }, children: "Total Pembayaran" }),
9536
+ children: /* @__PURE__ */ jsx(
9537
+ Input,
9538
+ {
9539
+ disabled: true,
9540
+ value: `Rp. ${totalAmount.toLocaleString("id-ID")}`,
9541
+ className: styles.input
9542
+ }
9543
+ )
9544
+ }
9545
+ )
9546
+ ] }),
9547
+ /* @__PURE__ */ jsxs("div", { children: [
9548
+ /* @__PURE__ */ jsx("div", { style: { marginBottom: tokens.spacingVerticalM }, children: /* @__PURE__ */ jsx(Subtitle2, { style: { color: tokens.colorNeutralForeground2 }, children: "Klik tombol dibawah ini jika sudah melakukan pembayaran" }) }),
9549
+ /* @__PURE__ */ jsx(
9550
+ Button,
9551
+ {
9552
+ appearance: "secondary",
9553
+ size: "large",
9554
+ shape: "circular",
9555
+ className: styles.checkStatusButton,
9556
+ onClick: onCheckStatus,
9557
+ children: "Cek Status Pembayaran"
9558
+ }
9559
+ )
9560
+ ] }),
9561
+ /* @__PURE__ */ jsx(CardPaymentGuide, { guides })
9562
+ ] }) });
9563
+ };
9564
+ var useStyles36 = makeStyles({
9565
+ activeCard: {
9566
+ width: "100%",
9567
+ // padding: tokens.spacingHorizontalNone, // default
9568
+ color: tokens.colorNeutralStrokeAccessible
9569
+ },
9570
+ colGap: {
9571
+ gap: "58px"
9572
+ // approx spacing['580']
9573
+ },
9574
+ cardInfo: {
9575
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
9576
+ backgroundColor: tokens.colorNeutralBackground1,
9577
+ borderRadius: tokens.borderRadiusXLarge,
9578
+ // borderRadius[120] -> XLarge approx
9579
+ padding: tokens.spacingHorizontalXXL
9580
+ },
9581
+ rowGap: {
9582
+ rowGap: "22px"
9583
+ // spacing[220]
9584
+ },
9585
+ gapdetail: {
9586
+ rowGap: tokens.spacingVerticalL
9587
+ },
9588
+ itemDetail: {
9589
+ display: "flex",
9590
+ justifyContent: "space-between"
9591
+ },
9592
+ divider: {
9593
+ "::before": {
9594
+ ...shorthands.borderColor(tokens.colorBrandBackground)
9595
+ // brandColors[80]
9596
+ }
9597
+ },
9598
+ titleDivider: {
9599
+ display: "flex",
9600
+ gap: "18px"
9601
+ // spacing[180]
9602
+ },
9603
+ centerContent: {
9604
+ display: "flex",
9605
+ justifyContent: "center",
9606
+ alignItems: "center",
9607
+ flexDirection: "column"
9608
+ }
9609
+ });
9610
+ var CardStatusOrder = ({
9611
+ bookingCode,
9612
+ departureDate,
9613
+ departureTime,
9614
+ arrivalDate,
9615
+ arrivalTime,
9616
+ origin,
9617
+ destination,
9618
+ duration = "-",
9619
+ vehicleClass,
9620
+ serviceType,
9621
+ vehicleNumber,
9622
+ shipType,
9623
+ statusLabel = "Sudah Dibayar",
9624
+ statusIcon,
9625
+ statusColor = "success",
9626
+ illustrationUrl = "/assets/images/illustrations/ticket.svg",
9627
+ title = "Pembayaran berhasil",
9628
+ description = "Tiket Anda aktif dan siap digunakan.",
9629
+ onClickViewTicket,
9630
+ className
9631
+ }) => {
9632
+ const styles = useStyles36();
9633
+ return /* @__PURE__ */ jsx("div", { className: `${styles.activeCard} ${className || ""}`, children: /* @__PURE__ */ jsxs(Row, { nogutter: true, className: styles.colGap, children: [
9634
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsxs(Row, { direction: "column", nogutter: true, children: [
9635
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
9636
+ "img",
9637
+ {
9638
+ src: illustrationUrl,
9639
+ alt: "E-Ticket",
9640
+ width: 406,
9641
+ height: 266
9642
+ }
9643
+ ) }),
9644
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsxs(Row, { direction: "column", justify: "center", align: "center", nogutter: true, children: [
9645
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(Subtitle2, { children: title }) }),
9646
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(Body1, { children: description }) })
9647
+ ] }) })
9648
+ ] }) }),
9649
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx("div", { className: styles.cardInfo, children: /* @__PURE__ */ jsxs(
9650
+ Row,
9651
+ {
9652
+ direction: "column",
9653
+ justify: "center",
9654
+ align: "center",
9655
+ nogutter: true,
9656
+ className: styles.rowGap,
9657
+ children: [
9658
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.titleDivider, children: [
9659
+ /* @__PURE__ */ jsx(Subtitle1, { children: "Detail Pemesanan" }),
9660
+ /* @__PURE__ */ jsx(Divider, { style: { width: 0 } })
9661
+ ] }) }),
9662
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { justify: "center", align: "center", nogutter: true, children: [
9663
+ /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(Body1, { children: "Status" }) }),
9664
+ /* @__PURE__ */ jsx(Col, { xs: "content", children: /* @__PURE__ */ jsx(
9665
+ Badge,
9666
+ {
9667
+ color: statusColor,
9668
+ size: "extra-large",
9669
+ appearance: "filled",
9670
+ shape: "rounded",
9671
+ icon: statusIcon || /* @__PURE__ */ jsx(Icon, { icon: "fluent:checkmark-circle-20-regular" }),
9672
+ children: statusLabel
9673
+ }
9674
+ ) })
9675
+ ] }) }),
9676
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs(Row, { direction: "column", nogutter: true, className: styles.gapdetail, children: [
9677
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.itemDetail, children: [
9678
+ /* @__PURE__ */ jsx(Caption1Stronger, { children: "Kode Booking" }),
9679
+ /* @__PURE__ */ jsx(Caption1, { children: bookingCode })
9680
+ ] }) }),
9681
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.itemDetail, children: [
9682
+ /* @__PURE__ */ jsx(Caption1Stronger, { children: "Jadwal Masuk Pelabuhan" }),
9683
+ /* @__PURE__ */ jsxs(Caption1, { children: [
9684
+ departureDate,
9685
+ ", ",
9686
+ departureTime
9687
+ ] })
9688
+ ] }) }),
9689
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.itemDetail, children: [
9690
+ /* @__PURE__ */ jsx(Caption1Stronger, { children: "Rute" }),
9691
+ /* @__PURE__ */ jsxs(Caption1, { children: [
9692
+ origin,
9693
+ " ",
9694
+ /* @__PURE__ */ jsx(Icon, { icon: "fluent:arrow-right-20-regular" }),
9695
+ " ",
9696
+ destination
9697
+ ] })
9698
+ ] }) }),
9699
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.itemDetail, children: [
9700
+ /* @__PURE__ */ jsx(Caption1Stronger, { children: "Jenis Pengguna Jasa" }),
9701
+ /* @__PURE__ */ jsx(Caption1, { children: vehicleClass })
9702
+ ] }) }),
9703
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsxs("div", { className: styles.itemDetail, children: [
9704
+ /* @__PURE__ */ jsx(Caption1Stronger, { children: "Layanan" }),
9705
+ /* @__PURE__ */ jsx(Caption1, { children: shipType || serviceType })
9706
+ ] }) })
9707
+ ] }) }),
9708
+ /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(
9709
+ Button,
9710
+ {
9711
+ appearance: "primary",
9712
+ size: "large",
9713
+ style: { width: "100%" },
9714
+ shape: "circular",
9715
+ onClick: onClickViewTicket,
9716
+ children: "Lihat E-Tiket"
9717
+ }
9718
+ ) })
9719
+ ]
9720
+ }
9721
+ ) }) })
9722
+ ] }) });
9723
+ };
7195
9724
 
7196
- export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardBanner, CardOrdererInfo, CardPassengerList, CardPromo, CardServiceMenu, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS2 as CardTicketSearchSummaryDefaultLabels, CarouselWithCustomNav, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS4 as DateFilterDefaultLabels, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS3 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalListPassenger, ModalPassengerForm, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
9725
+ export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS2 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, CarouselWithCustomNav, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS4 as DateFilterDefaultLabels, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS3 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalListPassenger, ModalPassengerForm, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, PriceDetailsTerms, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
7197
9726
  //# sourceMappingURL=index.mjs.map
7198
9727
  //# sourceMappingURL=index.mjs.map