@asdp/ferryui 0.1.20 → 0.1.22-dev.10038

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.d.mts CHANGED
@@ -1,8 +1,16 @@
1
1
  import React$1, { ReactNode } from 'react';
2
- import { CarouselAnnouncerFunction } from '@fluentui/react-components';
2
+ import { CarouselAnnouncerFunction, DialogProps } from '@fluentui/react-components';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { FieldValues, Path } from 'react-hook-form';
4
+ import * as react_hook_form from 'react-hook-form';
5
+ import { FieldValues, Path, Control, UseFormWatch, UseFormSetValue, UseFormGetValues } from 'react-hook-form';
5
6
 
7
+ type Language = 'id' | 'en';
8
+
9
+ interface ModalIllustrationLabels {
10
+ defaultImageAlt: string;
11
+ defaultTitle: string;
12
+ defaultButtonText: string;
13
+ }
6
14
  interface ModalIllustrationButton {
7
15
  /**
8
16
  * Button text
@@ -69,60 +77,145 @@ interface ModalIllustrationProps {
69
77
  * If provided, buttons will be displayed side by side
70
78
  */
71
79
  secondaryButton?: ModalIllustrationButton;
80
+ /**
81
+ * Language for labels
82
+ * @default 'id'
83
+ */
84
+ language?: Language;
85
+ /**
86
+ * Custom labels override
87
+ */
88
+ labels?: Partial<ModalIllustrationLabels>;
72
89
  }
90
+
73
91
  declare const ModalIllustration: React$1.FC<ModalIllustrationProps>;
74
92
 
75
- /**
76
- * Preset configurations for common modal use cases
77
- */
78
- declare const MODAL_PRESETS: {
79
- /**
80
- * Modal for radius/location restriction
81
- */
93
+ declare const PRESET_CONTENT: {
82
94
  readonly RADIUS: {
83
- readonly title: "Anda berada di luar area pemesanan";
84
- readonly message: "Pemesanan tiket tidak dapat dilakukan dari lokasi Anda saat ini. Fitur pembatasan wilayah sedang aktif untuk mencegah pemesanan tidak sah.";
85
- readonly imageSrc: "/assets/images/illustrations/radius.svg";
86
- readonly imageAlt: "Radius Limitation Illustration";
95
+ readonly id: {
96
+ readonly title: "Anda berada di luar area pemesanan";
97
+ readonly message: "Pemesanan tiket tidak dapat dilakukan dari lokasi Anda saat ini. Fitur pembatasan wilayah sedang aktif untuk mencegah pemesanan tidak sah.";
98
+ readonly imageSrc: "/assets/images/illustrations/radius.svg";
99
+ readonly imageAlt: "Radius Limitation Illustration";
100
+ };
101
+ readonly en: {
102
+ readonly title: "You are outside the booking area";
103
+ readonly message: "Ticket booking cannot be done from your current location. Location restriction feature is active to prevent unauthorized booking.";
104
+ readonly imageSrc: "/assets/images/illustrations/radius.svg";
105
+ readonly imageAlt: "Radius Limitation Illustration";
106
+ };
87
107
  };
88
- /**
89
- * Modal for expired session
90
- */
91
108
  readonly SESSION_EXPIRED: {
92
- readonly title: "Sesi anda telah berakhir";
93
- readonly message: "Waktu sesi Anda telah habis untuk alasan keamanan. Silakan klik tombol dibawah untuk masuk kembali.";
94
- readonly imageSrc: "/assets/images/illustrations/sessionexp.svg";
95
- readonly imageAlt: "Session Expired Illustration";
109
+ readonly id: {
110
+ readonly title: "Sesi anda telah berakhir";
111
+ readonly message: "Waktu sesi Anda telah habis untuk alasan keamanan. Silakan klik tombol dibawah untuk masuk kembali.";
112
+ readonly imageSrc: "/assets/images/illustrations/sessionexp.svg";
113
+ readonly imageAlt: "Session Expired Illustration";
114
+ };
115
+ readonly en: {
116
+ readonly title: "Your session has expired";
117
+ readonly message: "Your session time has run out for security reasons. Please click the button below to sign in again.";
118
+ readonly imageSrc: "/assets/images/illustrations/sessionexp.svg";
119
+ readonly imageAlt: "Session Expired Illustration";
120
+ };
96
121
  };
97
- /**
98
- * Modal for purchase period expired
99
- */
100
122
  readonly PURCHASE_PERIOD_EXPIRED: {
101
- readonly title: "Waktu pembelian telah berakhir";
102
- readonly message: "Pemesanan tiket ditutup 1 jam sebelum jadwal keberangkatan. Silakan pilih jadwal keberangkatan lain yang masih tersedia.";
103
- readonly imageSrc: "/assets/images/illustrations/pay.svg";
104
- readonly imageAlt: "Purchase Period Expired Illustration";
123
+ readonly id: {
124
+ readonly title: "Waktu pembelian telah berakhir";
125
+ readonly message: "Pemesanan tiket ditutup 1 jam sebelum jadwal keberangkatan. Silakan pilih jadwal keberangkatan lain yang masih tersedia.";
126
+ readonly imageSrc: "/assets/images/illustrations/pay.svg";
127
+ readonly imageAlt: "Purchase Period Expired Illustration";
128
+ };
129
+ readonly en: {
130
+ readonly title: "Purchase period has expired";
131
+ readonly message: "Ticket booking closes 1 hour before departure schedule. Please choose another available departure schedule.";
132
+ readonly imageSrc: "/assets/images/illustrations/pay.svg";
133
+ readonly imageAlt: "Purchase Period Expired Illustration";
134
+ };
105
135
  };
106
- /**
107
- * Modal for transaction limit reached
108
- */
109
136
  readonly TRANSACTION_LIMIT: {
110
- readonly title: "Anda mencapai batas transaksi tertunda";
111
- readonly message: "Anda telah mencapai batas transaksi tertunda. Pemesanan dapat dilakukan kembali setelah transaksi sebelumnya diselesaikan.";
112
- readonly imageSrc: "/assets/images/illustrations/mobile-pay.svg";
113
- readonly imageAlt: "Transaction Limit Illustration";
137
+ readonly id: {
138
+ readonly title: "Anda mencapai batas transaksi tertunda";
139
+ readonly message: "Anda telah mencapai batas transaksi tertunda. Pemesanan dapat dilakukan kembali setelah transaksi sebelumnya diselesaikan.";
140
+ readonly imageSrc: "/assets/images/illustrations/mobile-pay.svg";
141
+ readonly imageAlt: "Transaction Limit Illustration";
142
+ };
143
+ readonly en: {
144
+ readonly title: "Pending transaction limit reached";
145
+ readonly message: "You have reached the pending transaction limit. Booking can be done again after the previous transaction is completed.";
146
+ readonly imageSrc: "/assets/images/illustrations/mobile-pay.svg";
147
+ readonly imageAlt: "Transaction Limit Illustration";
148
+ };
149
+ };
150
+ readonly UNAUTHENTICATED: {
151
+ readonly id: {
152
+ readonly title: "Masuk untuk melanjutkan pemesanan";
153
+ readonly message: "Untuk memesan tiket dan mengisi manifest penumpang, Anda perlu masuk terlebih dahulu. Pilihan jadwal Anda akan tetap tersimpan.";
154
+ readonly imageSrc: "/assets/images/illustrations/auth.svg";
155
+ readonly imageAlt: "Unauthenticated Illustration";
156
+ };
157
+ readonly en: {
158
+ readonly title: "Sign in to continue booking";
159
+ readonly message: "To book tickets and fill in the passenger manifest, you need to sign in first. Your schedule selection will be saved.";
160
+ readonly imageSrc: "/assets/images/illustrations/auth.svg";
161
+ readonly imageAlt: "Unauthenticated Illustration";
162
+ };
163
+ };
164
+ readonly PROFILE_NOT_COMPLETE: {
165
+ readonly id: {
166
+ readonly title: "Profil Belum Lengkap";
167
+ readonly message: "Untuk melanjutkan pemesanan tiket, kami memerlukan data profil yang lengkap sesuai ketentuan ASDP. Lengkapi profil Anda terlebih dahulu agar dapat melanjutkan ke pengisian manifest.";
168
+ readonly imageSrc: "/assets/images/illustrations/profile.svg";
169
+ readonly imageAlt: "Profile Not Complete Illustration";
170
+ };
171
+ readonly en: {
172
+ readonly title: "Profile Not Complete";
173
+ readonly message: "To continue booking tickets, we need complete profile data according to ASDP provisions. Please complete your profile first to proceed to manifest filling.";
174
+ readonly imageSrc: "/assets/images/illustrations/profile.svg";
175
+ readonly imageAlt: "Profile Not Complete Illustration";
176
+ };
114
177
  };
115
178
  };
179
+
116
180
  /**
117
181
  * Type for preset keys
118
182
  */
119
- type ModalPresetKey = keyof typeof MODAL_PRESETS;
183
+ type ModalPresetKey = keyof typeof PRESET_CONTENT;
120
184
  /**
121
185
  * Helper function to get preset configuration
122
186
  */
123
- declare const getModalPreset: (presetKey: ModalPresetKey) => Partial<ModalIllustrationProps>;
187
+ declare const getModalPreset: (presetKey: ModalPresetKey, language?: Language) => Partial<ModalIllustrationProps>;
188
+ /**
189
+ * @deprecated Use getModalPreset instead
190
+ * Preset configurations for common modal use cases (defaults to ID)
191
+ */
192
+ declare const MODAL_PRESETS: {
193
+ readonly RADIUS: Partial<ModalIllustrationProps>;
194
+ readonly SESSION_EXPIRED: Partial<ModalIllustrationProps>;
195
+ readonly PURCHASE_PERIOD_EXPIRED: Partial<ModalIllustrationProps>;
196
+ readonly TRANSACTION_LIMIT: Partial<ModalIllustrationProps>;
197
+ readonly UNAUTHENTICATED: Partial<ModalIllustrationProps>;
198
+ readonly PROFILE_NOT_COMPLETE: Partial<ModalIllustrationProps>;
199
+ };
124
200
 
201
+ interface CarouselWithCustomNavLabels {
202
+ carouselAriaLabel: string;
203
+ slideAriaLabel: string;
204
+ announcementTemplate: string;
205
+ prevButtonAriaLabel: string;
206
+ nextButtonAriaLabel: string;
207
+ closeButtonAriaLabel: string;
208
+ }
125
209
  interface CarouselWithCustomNavProps {
210
+ /**
211
+ * Language for labels
212
+ * @default 'id'
213
+ */
214
+ language?: Language;
215
+ /**
216
+ * Custom labels override
217
+ */
218
+ labels?: Partial<CarouselWithCustomNavLabels>;
126
219
  /**
127
220
  * Carousel items/children
128
221
  */
@@ -162,6 +255,7 @@ interface CarouselWithCustomNavProps {
162
255
  /**
163
256
  * ARIA label for the carousel slider
164
257
  * @default "Carousel"
258
+ * @deprecated Use labels
165
259
  */
166
260
  ariaLabel?: string;
167
261
  /**
@@ -178,10 +272,47 @@ interface CarouselWithCustomNavProps {
178
272
  * @default false
179
273
  */
180
274
  cardFocus?: boolean;
275
+ /**
276
+ * Whether to show navigation arrows (prev/next buttons)
277
+ * @default false
278
+ */
279
+ showNavButtons?: boolean;
280
+ /**
281
+ * Whether to show the close/dismiss button
282
+ * @default false
283
+ */
284
+ showCloseButton?: boolean;
285
+ /**
286
+ * Callback when close button is clicked
287
+ */
288
+ onCloseClick?: () => void;
289
+ /**
290
+ * Whether the carousel should auto play
291
+ * @default false
292
+ */
293
+ autoPlay?: boolean;
294
+ /**
295
+ * Interval for auto play in milliseconds
296
+ * @default 5000
297
+ */
298
+ autoPlayInterval?: number;
181
299
  }
300
+
182
301
  declare const CarouselWithCustomNav: React$1.FC<CarouselWithCustomNavProps>;
183
302
 
303
+ interface CardPromoLabels {
304
+ defaultImageAlt: string;
305
+ defaultButtonText: string;
306
+ promoAriaLabel: string;
307
+ promoAriaLabelSingle: string;
308
+ loadingContent: string;
309
+ }
184
310
  interface CardPromoProps {
311
+ /**
312
+ * Language for labels (Indonesian or English)
313
+ * @default 'id'
314
+ */
315
+ language?: Language;
185
316
  /**
186
317
  * Image URL for the promo
187
318
  */
@@ -193,7 +324,7 @@ interface CardPromoProps {
193
324
  /**
194
325
  * Promo description/subtitle
195
326
  */
196
- description: string;
327
+ description: string | React.ReactNode;
197
328
  /**
198
329
  * Image alt text
199
330
  * @default "Promo image"
@@ -239,9 +370,20 @@ interface CardPromoProps {
239
370
  * Image Only
240
371
  */
241
372
  imageOnly?: boolean;
373
+ /**
374
+ * Custom labels override (optional)
375
+ * If not provided, default labels based on language will be used
376
+ */
377
+ labels?: Partial<CardPromoLabels>;
242
378
  }
379
+
243
380
  declare const CardPromo: React$1.FC<CardPromoProps>;
244
381
 
382
+ interface CardBannerLabels {
383
+ bannerAriaLabel: string;
384
+ bannerAriaLabelSingle: string;
385
+ loadingBanner: string;
386
+ }
245
387
  interface CardBannerProps {
246
388
  /**
247
389
  * Banner image URL
@@ -267,84 +409,132 @@ interface CardBannerProps {
267
409
  * Loading state
268
410
  */
269
411
  isLoading?: boolean;
412
+ /**
413
+ * Language for accessibility labels
414
+ * @default 'id'
415
+ */
416
+ language?: 'id' | 'en';
417
+ /**
418
+ * Custom labels override
419
+ */
420
+ labels?: Partial<CardBannerLabels>;
270
421
  }
422
+
271
423
  declare const CardBanner: React$1.FC<CardBannerProps>;
272
424
 
273
- interface CardTicketButton {
274
- label: string;
275
- icon?: JSX.Element;
276
- onClick?: () => void;
425
+ interface CardTicketLabels {
426
+ availableSeatsLabel: string;
427
+ estimationPrefix: string;
428
+ priceDetailsButton: string;
429
+ policyButton: string;
430
+ totalPriceLabel: string;
431
+ facilitiesLabel: string;
432
+ selectTicketButton: string;
433
+ timezoneLabel: string;
434
+ currencySymbol: string;
435
+ logoAlt: string;
436
+ verifyingTicketButton: string;
277
437
  }
278
438
  interface CardTicketProps {
279
439
  /**
280
- * Ship type badge configuration
281
- */
282
- shipType: {
283
- label: string;
284
- color: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
285
- tooltip?: string;
286
- };
287
- /**
288
- * Logo image source
289
- * @default "/assets/logo/asdp-default.svg"
290
- */
291
- logoSrc?: string;
292
- /**
293
- * Ship name
294
- */
295
- shipName: string;
296
- /**
297
- * Available seats configuration
440
+ * Route item
298
441
  */
299
- availableSeats: {
300
- count: number;
301
- threshold?: number;
302
- };
442
+ routeItem: RouteItem;
303
443
  /**
304
- * Departure information
444
+ * Departure item
305
445
  */
306
- departure: {
307
- day: string;
308
- time: string;
309
- location: string;
310
- };
446
+ departureItem: DepartureItem;
311
447
  /**
312
- * Arrival information
448
+ * Language for labels
449
+ * @default 'id'
313
450
  */
314
- arrival: {
315
- day: string;
316
- time: string;
317
- location: string;
318
- };
451
+ language?: Language;
319
452
  /**
320
- * Duration text
453
+ * Custom labels override
321
454
  */
322
- duration: string;
455
+ labels?: Partial<CardTicketLabels>;
323
456
  /**
324
- * Middle section action buttons (max 2)
457
+ * Button text for selecting ticket
325
458
  */
326
- actionButtons?: CardTicketButton[];
459
+ buttonText?: string;
327
460
  /**
328
- * Price display (formatted string)
461
+ * Callback when price detail button is clicked
329
462
  */
330
- price: string;
463
+ onPriceDetailClick: (billingDetail: BillingDetail, provider: Provider) => void;
331
464
  /**
332
- * Primary button configuration
465
+ * Callback when policy button is clicked
333
466
  */
334
- primaryButton: CardTicketButton;
467
+ onPolicyClick?: () => void;
335
468
  /**
336
- * List of facilities
469
+ * Callback when select ticket button is clicked
337
470
  */
471
+ onSelectTicket?: () => void;
472
+ isLoading?: boolean;
473
+ isVerifyingTicket?: boolean;
474
+ }
475
+ interface DepartureItem {
476
+ departureDay: string;
477
+ departureId: string;
478
+ departureTime: string;
479
+ arrivedTime: string;
480
+ arrivedDay: string;
481
+ estimatedSailingMinute: number;
482
+ availableTicket: number;
483
+ provider: Provider;
484
+ currency: string;
485
+ total: PriceSummary;
486
+ billingDetail: BillingDetail;
487
+ routeDetail?: RouteItem;
488
+ prices: {
489
+ passengerTypeId: number;
490
+ passengerTypeName: string;
491
+ passengerServiceId: number;
492
+ passengerServiceName: string;
493
+ price: number;
494
+ }[];
495
+ shipType: string;
496
+ arrivalLocation: string;
497
+ departureLocation: string;
498
+ }
499
+ interface Provider {
500
+ code: string;
501
+ name: string;
502
+ service: string;
503
+ logo: string;
504
+ shipService: string;
505
+ serviceColor: string;
506
+ description: string;
338
507
  facilities: string[];
339
- /**
340
- * Custom icon for ship indicator
341
- */
342
- shipIcon?: JSX.Element;
343
- /**
344
- * Custom icon for facilities checkmark
345
- */
346
- facilityIcon?: JSX.Element;
347
508
  }
509
+ interface PriceSummary {
510
+ value: number;
511
+ formatted: string;
512
+ }
513
+ interface BillingDetail {
514
+ items: BillingItem[];
515
+ subtotal: PriceSummary;
516
+ discount: PriceSummary;
517
+ total: PriceSummary;
518
+ }
519
+ interface BillingItem {
520
+ category: 'vehicle' | 'passenger' | string;
521
+ title: string;
522
+ subtitle: string;
523
+ quantity: number;
524
+ unitPrice: number;
525
+ formattedUnitPrice: string;
526
+ subTotal: number;
527
+ formattedSubTotal: string;
528
+ }
529
+ interface RouteItem {
530
+ id: string;
531
+ name: string;
532
+ portFrom: string;
533
+ portTo: string;
534
+ branchFrom: string;
535
+ branchTo: string;
536
+ }
537
+
348
538
  declare const CardTicket: React$1.FC<CardTicketProps>;
349
539
 
350
540
  /**
@@ -359,87 +549,27 @@ declare const BackgroundTicketCard: (props: React$1.SVGProps<SVGSVGElement>) =>
359
549
  */
360
550
  declare const BackgroundTicketCardVertical: (props: React$1.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
361
551
 
362
- type Language = 'id' | 'en';
363
-
364
- declare const SERVICE_MENU_ITEMS: {
365
- readonly ferry: {
366
- readonly id: "ferry";
367
- readonly logo: "/assets/images/icons/ferry.svg";
368
- readonly labels: {
369
- readonly id: {
370
- readonly label: "Ferry";
371
- readonly description: "Layanan penyeberangan ferry ASDP";
372
- };
373
- readonly en: {
374
- readonly label: "Ferry";
375
- readonly description: "ASDP Ferry Crossing Service";
376
- };
377
- };
378
- };
379
- readonly ifcs: {
380
- readonly id: "ifcs";
381
- readonly logo: "/assets/logo/asdp-default.svg";
382
- readonly labels: {
383
- readonly id: {
384
- readonly label: "IFCS";
385
- readonly description: "Integrated Ferry Control System";
386
- };
387
- readonly en: {
388
- readonly label: "IFCS";
389
- readonly description: "Integrated Ferry Control System";
390
- };
391
- };
392
- };
393
- readonly skpt: {
394
- readonly id: "skpt";
395
- readonly logo: "/assets/logo/asdp-default.svg";
396
- readonly labels: {
397
- readonly id: {
398
- readonly label: "SKPT";
399
- readonly description: "Sistem Karcis Penumpang Terpadu";
400
- };
401
- readonly en: {
402
- readonly label: "SKPT";
403
- readonly description: "Integrated Passenger Ticketing System";
404
- };
405
- };
406
- };
407
- readonly hotel: {
408
- readonly id: "hotel";
409
- readonly logo: "/assets/images/icons/hotel.svg";
410
- readonly labels: {
411
- readonly id: {
412
- readonly label: "Hotel";
413
- readonly description: "Layanan pemesanan hotel";
414
- };
415
- readonly en: {
416
- readonly label: "Hotel";
417
- readonly description: "Hotel Booking Service";
418
- };
419
- };
420
- };
421
- readonly other: {
422
- readonly id: "other";
423
- readonly logo: "/assets/images/icons/other.svg";
424
- readonly labels: {
425
- readonly id: {
426
- readonly label: "Lainnya";
427
- readonly description: "Layanan lainnya";
428
- };
429
- readonly en: {
430
- readonly label: "Other";
431
- readonly description: "Other Services";
432
- };
433
- };
434
- };
435
- };
436
- type ServiceId = keyof typeof SERVICE_MENU_ITEMS;
552
+ type ServiceId = 'ferry' | 'ifcs' | 'skpt' | 'hotel' | 'other';
553
+ interface CardServiceMenuLabels {
554
+ ferryLabel: string;
555
+ ferryDescription: string;
556
+ ifcsLabel: string;
557
+ ifcsDescription: string;
558
+ skptLabel: string;
559
+ skptDescription: string;
560
+ hotelLabel: string;
561
+ hotelDescription: string;
562
+ otherLabel: string;
563
+ otherDescription: string;
564
+ modalTitle: string;
565
+ serviceAriaLabel: string;
566
+ }
437
567
  interface CardServiceMenuProps {
438
568
  /**
439
569
  * Currently active service ID
440
- * @default 'ferry'
570
+ * @default 1
441
571
  */
442
- activeServiceId?: ServiceId;
572
+ activeServiceId?: number;
443
573
  /**
444
574
  * Language for labels (Indonesian or English)
445
575
  * @default 'id'
@@ -448,7 +578,7 @@ interface CardServiceMenuProps {
448
578
  /**
449
579
  * Callback when a service is clicked
450
580
  */
451
- onServiceClick?: (serviceId: ServiceId) => void;
581
+ onServiceClick?: (serviceId: number) => void;
452
582
  /**
453
583
  * Whether to show descriptions on desktop
454
584
  * @default true
@@ -458,7 +588,34 @@ interface CardServiceMenuProps {
458
588
  * Custom className for the card
459
589
  */
460
590
  className?: string;
591
+ /**
592
+ * Custom labels override
593
+ */
594
+ labels?: Partial<CardServiceMenuLabels>;
595
+ /**
596
+ * Menu items
597
+ */
598
+ menuItems?: CardServiceMenuItem[];
599
+ /**
600
+ * Whether the menu is in a loading state
601
+ * @default false
602
+ */
603
+ isLoading?: boolean;
604
+ /**
605
+ * Number of skeleton items to display while loading
606
+ * @default 4
607
+ */
608
+ skeletonCount?: number;
609
+ }
610
+ interface CardServiceMenuItem {
611
+ id: number;
612
+ description: string;
613
+ imageUrl: string;
614
+ linkUrl: string;
615
+ name: string;
616
+ sortOrder: number;
461
617
  }
618
+
462
619
  declare const CardServiceMenu: React$1.FC<CardServiceMenuProps>;
463
620
 
464
621
  interface ServiceMenuItem {
@@ -488,12 +645,22 @@ interface CardTicketSearchLabels {
488
645
  roundTripLabel: string;
489
646
  searchButton: string;
490
647
  placeholderPort: string;
648
+ ferryDescription: string;
649
+ ifcsDescription: string;
650
+ skptDescription: string;
651
+ hotelDescription: string;
652
+ otherDescription: string;
491
653
  placeholderDestinationPort: string;
492
654
  placeholderDepartureDate: string;
493
655
  placeholderReturnDate: string;
494
656
  placeholderTypeClass: string;
495
657
  placeholderTypeService: string;
496
658
  placeholderPassenger: string;
659
+ errorOriginRequired: string;
660
+ errorDestinationRequired: string;
661
+ errorDepartureDateRequired: string;
662
+ errorReturnDateRequired: string;
663
+ switchAriaLabel: string;
497
664
  }
498
665
  interface CardTicketSearchProps {
499
666
  /**
@@ -536,11 +703,12 @@ interface CardTicketSearchProps {
536
703
  onSwitchClick?: () => void;
537
704
  onRoundTripChange?: (value: boolean) => void;
538
705
  onSubmit?: (data: CardTicketSearchFormData) => void;
706
+ onServiceClick?: (serviceId: number) => void;
539
707
  /**
540
708
  * Active service ID
541
- * @default 'ferry'
709
+ * @default 1
542
710
  */
543
- activeServiceId?: ServiceId;
711
+ activeServiceId?: number;
544
712
  /**
545
713
  * Custom labels override (optional)
546
714
  * If not provided, default labels based on locale will be used
@@ -556,13 +724,93 @@ interface CardTicketSearchProps {
556
724
  isRotating?: boolean;
557
725
  showPassengerField?: boolean;
558
726
  showRoundTrip?: boolean;
727
+ menuItems?: CardServiceMenuItem[];
728
+ isLoadingServiceMenu?: boolean;
559
729
  }
560
730
 
561
731
  declare const CardTicketSearch: React$1.FC<CardTicketSearchProps>;
562
732
 
563
- declare const DEFAULT_LABELS: Record<Language, CardTicketSearchLabels>;
733
+ declare const DEFAULT_LABELS$4: Record<Language, CardTicketSearchLabels>;
734
+
735
+ interface SearchSummaryField {
736
+ /**
737
+ * Field label
738
+ */
739
+ label: string;
740
+ /**
741
+ * Field value
742
+ */
743
+ value: string;
744
+ /**
745
+ * Icon name from iconify
746
+ */
747
+ icon?: string;
748
+ }
749
+ interface CardTicketSearchSummaryLabels {
750
+ originHarbor: string;
751
+ destinationHarbor: string;
752
+ departureDate: string;
753
+ serviceClass: string;
754
+ typeOfService: string;
755
+ totalPassengers: string;
756
+ changeSearchButton: string;
757
+ swapAriaLabel: string;
758
+ }
759
+ interface CardTicketSearchSummaryProps {
760
+ /**
761
+ * Language for labels (Indonesian or English)
762
+ * @default 'id'
763
+ */
764
+ language?: Language;
765
+ /**
766
+ * Origin harbor name
767
+ */
768
+ originHarbor: string;
769
+ /**
770
+ * Destination harbor name
771
+ */
772
+ destinationHarbor: string;
773
+ /**
774
+ * Departure date
775
+ */
776
+ departureDate: string;
777
+ /**
778
+ * Service type text (e.g., "3 Service Types")
779
+ */
780
+ serviceClass: string;
781
+ /**
782
+ * Type of service (e.g., "Penumpang", "Kendaraan")
783
+ */
784
+ typeOfService: string;
785
+ /**
786
+ * Total passengers text (e.g., "2 Penumpang")
787
+ */
788
+ totalPassengers: string;
789
+ /**
790
+ * Callback when change search button is clicked
791
+ */
792
+ onChangeSearch: () => void;
793
+ /**
794
+ * Custom field labels override (optional)
795
+ * If not provided, default labels based on language will be used
796
+ */
797
+ labels?: Partial<CardTicketSearchSummaryLabels>;
798
+ /**
799
+ * Show swap button between origin and destination
800
+ * @default false
801
+ */
802
+ showSwapButton?: boolean;
803
+ /**
804
+ * Children to render below the search fields (e.g., SortMenu)
805
+ */
806
+ children?: React.ReactNode;
807
+ }
808
+
809
+ declare const CardTicketSearchSummary: React$1.FC<CardTicketSearchSummaryProps>;
810
+
811
+ declare const DEFAULT_LABELS$3: Record<Language, CardTicketSearchSummaryLabels>;
564
812
 
565
- type InputType = 'checkbox' | 'date' | 'datetime-local' | 'email' | 'file' | 'identity' | 'emailOrPhone' | 'number' | 'otp' | 'passport' | 'password' | 'phone' | 'radio' | 'radiobutton' | 'select' | 'switch' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
813
+ type InputType = 'checkbox' | 'country' | 'date' | 'datetime-local' | 'email' | 'file' | 'identity' | 'emailOrPhone' | 'number' | 'otp' | 'passport' | 'password' | 'phone' | 'radio' | 'radiobutton' | 'select' | 'switch' | 'tel' | 'text' | 'textarea' | 'time' | 'url';
566
814
  interface SelectOption {
567
815
  value: string;
568
816
  label: string;
@@ -594,6 +842,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
594
842
  rows?: number;
595
843
  min?: number | string;
596
844
  max?: number | string;
845
+ onlyCountries?: string[];
597
846
  step?: number | string;
598
847
  isMultiSelect?: boolean;
599
848
  selectScrollbarColor?: string;
@@ -624,6 +873,7 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
624
873
  validate?: (value: any) => string | boolean;
625
874
  };
626
875
  helperText?: string;
876
+ helperIcon?: string;
627
877
  className?: string;
628
878
  layout?: 'horizontal' | 'vertical';
629
879
  size?: 'small' | 'medium' | 'large';
@@ -639,70 +889,244 @@ interface InputDynamicProps<T extends FieldValues = FieldValues> {
639
889
  onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
640
890
  contentAfter?: React.ReactNode;
641
891
  onChange?: (value: any) => void;
892
+ /**
893
+ * Language for labels
894
+ * @default 'id'
895
+ */
896
+ language?: 'id' | 'en';
897
+ /**
898
+ * Custom labels override
899
+ */
900
+ labels?: Partial<InputDynamicLabels>;
901
+ menuPlacement?: 'top' | 'bottom' | 'auto';
902
+ /**
903
+ * Disable selecting past dates for type "date"
904
+ * @default false
905
+ */
906
+ disablePastDates?: boolean;
907
+ disableFutureDates?: boolean;
908
+ }
909
+ interface InputDynamicLabels {
910
+ emailOrPhonePlaceholder: string;
911
+ emailPlaceholder: string;
912
+ phonePlaceholder: string;
913
+ identityPlaceholder: string;
914
+ identityPhonePlaceholder: string;
915
+ identityIdPlaceholder: string;
916
+ showPasswordAriaLabel: string;
917
+ hidePasswordAriaLabel: string;
918
+ datePickerPlaceholder: string;
919
+ phoneDefaultPlaceholder: string;
920
+ requiredFieldError: string;
921
+ invalidEmailError: string;
922
+ emailOrPhoneRequiredError: string;
923
+ invalidEmailFormatError: string;
924
+ phoneMustStartWithPlusError: string;
925
+ phoneMustBeOnlyDigitsError: string;
926
+ phoneMinDigitsError: string;
927
+ invalidEmailOrPhoneError: string;
928
+ identityPhoneMustStartWithPlusError: string;
929
+ identityPhoneMustBeOnlyDigitsError: string;
930
+ phoneInvalidLengthError: string;
642
931
  }
643
932
 
644
933
  declare const InputDynamic: React$1.FC<InputDynamicProps>;
645
934
 
646
- declare const DEFAULT_COUNTRY_CODES: CountryCode[];
647
-
935
+ interface CountryOption {
936
+ value: string;
937
+ label: string;
938
+ flag: string;
939
+ }
648
940
  /**
649
- * Harbor item interface
941
+ * List of countries with their ISO codes and flag icons
942
+ * Flag icons use Iconify's twemoji flags
650
943
  */
651
- interface HarborItem {
944
+ declare const COUNTRIES: CountryOption[];
945
+
946
+ interface EmptyContentLabels {
947
+ defaultImageAlt: string;
948
+ defaultTitle: string;
949
+ defaultMessage: string;
950
+ defaultButtonText: string;
951
+ }
952
+ interface EmptyContentButton {
652
953
  /**
653
- * Unique identifier for the harbor
954
+ * Button text
654
955
  */
655
- id: number;
956
+ text: string;
656
957
  /**
657
- * Display name of the harbor
958
+ * Button click handler
658
959
  */
659
- name: string;
660
- }
661
- /**
662
- * Props for ModalSearchHarbor component
663
- */
664
- interface ModalSearchHarborProps {
960
+ onClick: () => void;
665
961
  /**
666
- * Whether the modal is open
962
+ * Button appearance
963
+ * @default "primary"
667
964
  */
668
- open: boolean;
965
+ appearance?: 'primary' | 'outline' | 'secondary' | 'subtle' | 'transparent';
966
+ }
967
+ interface EmptyContentProps {
669
968
  /**
670
- * Callback when modal should close
969
+ * Title for the empty state
970
+ * If not provided, falls back to the default label for the given language
671
971
  */
672
- onClose: () => void;
972
+ title?: ReactNode | string;
673
973
  /**
674
- * Modal title
675
- * @default "Pilih Pelabuhan"
974
+ * Dynamic content name to replace `{konten}` or `{content}` placeholder in the default title
676
975
  */
677
- title?: string;
976
+ content?: string;
678
977
  /**
679
- * Type of modal - origin or destination
680
- * @default "origin"
978
+ * Message content for the empty state
979
+ * Can be a string or React node for more complex content
980
+ * If not provided, falls back to the default label for the given language
681
981
  */
682
- modalType?: 'origin' | 'destination';
982
+ message?: string | ReactNode;
683
983
  /**
684
- * List of harbors to display
984
+ * Image source URL
985
+ * @default "/assets/images/illustrations/no-content.svg"
986
+ * @remarks
987
+ * When using this component in your application, ensure the asset is available at this path
988
+ * in your public directory, or provide a custom imageSrc prop pointing to your own image.
685
989
  */
686
- harbors: HarborItem[];
990
+ imageSrc?: string;
687
991
  /**
688
- * List of favorite harbors
992
+ * Image alt text
993
+ * If not provided, falls back to the default label for the given language
689
994
  */
690
- favoriteHarbors: HarborItem[];
995
+ imageAlt?: string;
691
996
  /**
692
- * List of last searched harbors
997
+ * Image width
998
+ * @default 240
693
999
  */
694
- lastSearchedHarbors: HarborItem[];
1000
+ imageWidth?: number;
695
1001
  /**
696
- * Loading state
697
- * @default false
1002
+ * Image height
1003
+ * @default 180
698
1004
  */
699
- isLoading?: boolean;
1005
+ imageHeight?: number;
700
1006
  /**
701
- * Current search query value
1007
+ * Optional action button configuration
1008
+ * If not provided, no button will be displayed
702
1009
  */
703
- searchQuery: string;
1010
+ actionButton?: EmptyContentButton;
704
1011
  /**
705
- * Callback when search query changes
1012
+ * Language for default labels
1013
+ * @default 'id'
1014
+ */
1015
+ language?: Language;
1016
+ /**
1017
+ * Custom labels override
1018
+ */
1019
+ labels?: Partial<EmptyContentLabels>;
1020
+ /**
1021
+ * Additional class name for root element
1022
+ */
1023
+ className?: string;
1024
+ }
1025
+
1026
+ declare const EmptyContent: React$1.FC<EmptyContentProps>;
1027
+
1028
+ declare const DEFAULT_LABELS$2: Record<Language, EmptyContentLabels>;
1029
+
1030
+ /**
1031
+ * Harbor item interface
1032
+ */
1033
+ interface HarborItem {
1034
+ branchId: number;
1035
+ branchName: string;
1036
+ branchCode: string;
1037
+ cityId: number;
1038
+ cityName: string;
1039
+ timezone: string;
1040
+ portId: number;
1041
+ portName: string;
1042
+ portCode: string;
1043
+ rowNum: number;
1044
+ isFavorite: boolean;
1045
+ routeId?: number;
1046
+ }
1047
+ /**
1048
+ * Labels for ModalSearchHarbor component
1049
+ */
1050
+ interface ModalSearchHarborLabels {
1051
+ title: string;
1052
+ searchPlaceholder: string;
1053
+ lastSearchedHeader: string;
1054
+ clearAllButton: string;
1055
+ allHarborsHeader: string;
1056
+ loadingData: string;
1057
+ harborNotFound: string;
1058
+ closeAriaLabel: string;
1059
+ popularHarborHeader: string;
1060
+ favoriteHeader: string;
1061
+ emptyContent: string;
1062
+ travelPlanHeader: string;
1063
+ }
1064
+ /**
1065
+ * Props for ModalSearchHarbor component
1066
+ */
1067
+ interface ModalSearchHarborProps {
1068
+ /**
1069
+ * Language for labels
1070
+ * @default 'id'
1071
+ */
1072
+ language?: Language;
1073
+ /**
1074
+ * Custom labels override
1075
+ */
1076
+ labels?: Partial<ModalSearchHarborLabels>;
1077
+ /**
1078
+ * Whether the modal is open
1079
+ */
1080
+ open: boolean;
1081
+ /**
1082
+ * Callback when modal should close
1083
+ */
1084
+ onClose: () => void;
1085
+ /**
1086
+ * Modal title
1087
+ */
1088
+ title?: string;
1089
+ /**
1090
+ * Type of modal - origin or destination
1091
+ * @default "origin"
1092
+ */
1093
+ modalType?: 'origin' | 'destination';
1094
+ /**
1095
+ * List of harbors to display
1096
+ */
1097
+ harbors: HarborItem[];
1098
+ /**
1099
+ * List of favorite harbors
1100
+ */
1101
+ favoriteHarbors: HarborItem[];
1102
+ /**
1103
+ * List of last searched harbors
1104
+ */
1105
+ lastSearchedHarbors: HarborItem[];
1106
+ /**
1107
+ * List of popular harbors
1108
+ */
1109
+ popularHarbors: HarborItem[];
1110
+ /**
1111
+ * Loading state port
1112
+ * @default false
1113
+ */
1114
+ isLoadingPort?: boolean;
1115
+ /**
1116
+ * Loading state travel plan
1117
+ * @default false
1118
+ */
1119
+ isLoadingTravelPlan?: boolean;
1120
+ /**
1121
+ * Current search query value
1122
+ */
1123
+ searchQuery: string;
1124
+ /**
1125
+ * Show button favorite
1126
+ */
1127
+ showButtonFavorite?: boolean;
1128
+ /**
1129
+ * Callback when search query changes
706
1130
  */
707
1131
  onSearchChange: (query: string) => void;
708
1132
  /**
@@ -720,12 +1144,43 @@ interface ModalSearchHarborProps {
720
1144
  /**
721
1145
  * Callback when removing from last searched
722
1146
  */
723
- onRemoveLastSearched: (harborId: number) => void;
1147
+ onRemoveLastSearched?: (harborId: HarborItem) => void;
724
1148
  /**
725
1149
  * Callback when clearing all last searched
726
1150
  */
727
1151
  onClearLastSearched: () => void;
1152
+ /**
1153
+ * Callback when clearing all favorite
1154
+ */
1155
+ onClearFavorite: () => void;
1156
+ /**
1157
+ * Reload button for port
1158
+ */
1159
+ reloadButtonPort?: EmptyContentButton;
1160
+ /**
1161
+ * Reload button for travel plan
1162
+ */
1163
+ reloadButtonTravelPlan?: EmptyContentButton;
1164
+ /**
1165
+ * Reload button for all
1166
+ */
1167
+ reloadButtonAll?: EmptyContentButton;
1168
+ /**
1169
+ * Image source for empty state
1170
+ */
1171
+ emptyImageSrc?: string;
1172
+ /**
1173
+ * Error state for travel plan
1174
+ * @default false
1175
+ */
1176
+ isErrorTravelPlan?: boolean;
1177
+ /**
1178
+ * Error state for port
1179
+ * @default false
1180
+ */
1181
+ isErrorPort?: boolean;
728
1182
  }
1183
+
729
1184
  /**
730
1185
  * ModalSearchHarbor - A reusable modal component for searching and selecting harbors
731
1186
  *
@@ -760,10 +1215,28 @@ declare const ModalSearchHarbor: React$1.FC<ModalSearchHarborProps>;
760
1215
  * Tab type for trip selection
761
1216
  */
762
1217
  type TabType = 'one-way' | 'round-trip';
1218
+ /**
1219
+ * Labels for ModalSelectDate component
1220
+ */
1221
+ interface ModalSelectDateLabels {
1222
+ title: string;
1223
+ oneWay: string;
1224
+ roundTrip: string;
1225
+ closeAriaLabel: string;
1226
+ }
763
1227
  /**
764
1228
  * Props for ModalSelectDate component
765
1229
  */
766
1230
  interface ModalSelectDateProps {
1231
+ /**
1232
+ * Language for labels
1233
+ * @default 'id'
1234
+ */
1235
+ language?: Language;
1236
+ /**
1237
+ * Custom labels override
1238
+ */
1239
+ labels?: Partial<ModalSelectDateLabels>;
767
1240
  /**
768
1241
  * Whether the modal is open
769
1242
  */
@@ -774,7 +1247,6 @@ interface ModalSelectDateProps {
774
1247
  onClose: () => void;
775
1248
  /**
776
1249
  * Modal title
777
- * @default "Pilih Tanggal"
778
1250
  */
779
1251
  title?: string;
780
1252
  /**
@@ -821,7 +1293,13 @@ interface ModalSelectDateProps {
821
1293
  * @default "DD MMMM YYYY"
822
1294
  */
823
1295
  dateFormat?: string;
1296
+ /**
1297
+ * Show Roundtrip
1298
+ * @default true
1299
+ */
1300
+ showRoundtrip?: boolean;
824
1301
  }
1302
+
825
1303
  /**
826
1304
  * ModalSelectDate - A reusable modal component for selecting dates
827
1305
  *
@@ -852,9 +1330,9 @@ declare const ModalSelectDate: React$1.FC<ModalSelectDateProps>;
852
1330
  */
853
1331
  interface ServiceItem {
854
1332
  /**
855
- * Unique identifier for the service
1333
+ * Unique identifier for the service type
856
1334
  */
857
- id: number;
1335
+ serviceTypeId: number;
858
1336
  /**
859
1337
  * Display name of the service type
860
1338
  */
@@ -867,6 +1345,23 @@ interface ServiceItem {
867
1345
  * Detailed description of the service
868
1346
  */
869
1347
  serviceDescription: string;
1348
+ /**
1349
+ * Color code for the service type
1350
+ */
1351
+ serviceTypeColor: string;
1352
+ /**
1353
+ * Short description of the service
1354
+ */
1355
+ serviceShortDescription: string;
1356
+ }
1357
+ interface ModalServiceLabels {
1358
+ title: string;
1359
+ loading: string;
1360
+ error: string;
1361
+ selectAll: string;
1362
+ saveButton: string;
1363
+ closeAriaLabel: string;
1364
+ emptyContent: string;
870
1365
  }
871
1366
  /**
872
1367
  * Props for ModalService component
@@ -882,7 +1377,7 @@ interface ModalServiceProps {
882
1377
  onClose: () => void;
883
1378
  /**
884
1379
  * Modal title
885
- * @default "Pilih Kelas Layanan"
1380
+ * @default "Pilih Jenis Layanan"
886
1381
  */
887
1382
  title?: string;
888
1383
  /**
@@ -908,7 +1403,25 @@ interface ModalServiceProps {
908
1403
  * @default false
909
1404
  */
910
1405
  isError?: boolean;
1406
+ /**
1407
+ * Language for labels
1408
+ * @default 'id'
1409
+ */
1410
+ language?: Language;
1411
+ /**
1412
+ * Custom labels override
1413
+ */
1414
+ labels?: Partial<ModalServiceLabels>;
1415
+ /**
1416
+ * Reload button for error state
1417
+ */
1418
+ reloadButton?: EmptyContentButton;
1419
+ /**
1420
+ * Image source for empty state
1421
+ */
1422
+ emptyImageSrc?: string;
911
1423
  }
1424
+
912
1425
  /**
913
1426
  * ModalService - A reusable modal component for selecting service classes
914
1427
  *
@@ -923,7 +1436,7 @@ interface ModalServiceProps {
923
1436
  * <ModalService
924
1437
  * open={isOpen}
925
1438
  * onClose={() => setIsOpen(false)}
926
- * title="Pilih Kelas Layanan"
1439
+ * title="Pilih Jenis Layanan"
927
1440
  * services={servicesList}
928
1441
  * selectedServiceIds={selectedIds}
929
1442
  * onSave={handleSave}
@@ -935,35 +1448,70 @@ interface ModalServiceProps {
935
1448
  declare const ModalService: React$1.FC<ModalServiceProps>;
936
1449
 
937
1450
  /**
938
- * Service class codes for passenger services
1451
+ * Passenger class from API (e.g. EKONOMI, Bisnis, Eksekutive)
939
1452
  */
940
- type PassengerServiceCode = 'ECONOMY' | 'BUSINESS' | 'EXECUTIVE';
941
- /**
942
- * Service class data structure
943
- */
944
- interface ServiceClass {
1453
+ interface PassengerClass {
945
1454
  id: number;
946
- name: string;
947
- key: string;
948
- serviceName: PassengerServiceCode;
1455
+ classCode: string;
1456
+ className: string;
1457
+ classDescription: string;
1458
+ maxCapacity: number;
1459
+ count?: number;
1460
+ passengers?: Passenger[];
949
1461
  }
950
1462
  /**
951
- * Default service classes available
1463
+ * Labels for ModalTotalPassengers component
952
1464
  */
953
- declare const DEFAULT_SERVICE_CLASSES: ServiceClass[];
954
-
1465
+ interface ModalTotalPassengersLabels {
1466
+ title: string;
1467
+ infoMessage: string;
1468
+ loading: string;
1469
+ saveButton: string;
1470
+ closeAriaLabel: string;
1471
+ emptyContent: string;
1472
+ }
955
1473
  /**
956
1474
  * Passenger object structure
957
1475
  */
958
1476
  interface Passenger {
959
- [key: string]: any;
1477
+ id?: number;
1478
+ isAccountOwner?: boolean;
1479
+ titleId?: number;
1480
+ titleName?: string;
1481
+ fullName?: string;
1482
+ identityTypeId?: number;
1483
+ countryId?: number;
1484
+ countryName?: string;
1485
+ identityTypeCode?: keyof typeof IDENTITY_TYPE | string;
1486
+ identityId?: number;
1487
+ ageId?: number;
1488
+ ageLabel?: keyof typeof PASSENGER_TYPE | string;
1489
+ birthdate?: string;
1490
+ age?: number;
1491
+ category?: string;
1492
+ ticketClass?: string;
1493
+ regencyId?: number;
1494
+ regencyName?: string;
1495
+ phoneNumber?: string;
1496
+ email?: string;
1497
+ passengerType?: string;
1498
+ serviceName?: string;
1499
+ _indices?: {
1500
+ i0: number;
1501
+ i1: number;
1502
+ i2: number;
1503
+ passengerAgeId: number;
1504
+ passengerAgeLabel: string;
1505
+ passengerClassId: number;
1506
+ passengerClassLabel: string;
1507
+ };
960
1508
  }
961
1509
  /**
962
1510
  * Service with passenger count
963
1511
  */
964
1512
  interface PassengerService {
965
- serviceId: number;
966
- serviceName: PassengerServiceCode;
1513
+ serviceId?: number;
1514
+ serviceName: string;
967
1515
  count: number;
968
1516
  passengers: Passenger[];
969
1517
  }
@@ -972,22 +1520,40 @@ interface PassengerService {
972
1520
  */
973
1521
  interface PassengerType {
974
1522
  id: number;
975
- passengerTypeCode: string;
976
- passengerTypeName: string;
1523
+ passengerAgeCode: string;
1524
+ passengerAgeName: string;
1525
+ passengerAgeDescription: string;
1526
+ minAge: number;
1527
+ maxAge: number;
1528
+ isActive: number;
1529
+ sortOrder: number;
1530
+ requiresId: number;
1531
+ maxCapacity: number;
1532
+ minCapacity: number;
1533
+ classes: PassengerClass[];
977
1534
  }
978
1535
  /**
979
1536
  * Selected passenger item structure
980
1537
  */
981
1538
  interface SelectedPassengerItem {
982
1539
  passengerTypeId: number;
983
- passengerTypeCode: string;
984
- passengerTypeName: string;
1540
+ passengerAgeCode: string;
1541
+ passengerAgeName: string;
985
1542
  services: PassengerService[];
986
1543
  }
987
1544
  /**
988
1545
  * Props for ModalTotalPassengers component
989
1546
  */
990
1547
  interface ModalTotalPassengersProps {
1548
+ /**
1549
+ * Language for labels
1550
+ * @default 'id'
1551
+ */
1552
+ language?: Language;
1553
+ /**
1554
+ * Custom labels override
1555
+ */
1556
+ labels?: Partial<ModalTotalPassengersLabels>;
991
1557
  /**
992
1558
  * Whether the modal is open
993
1559
  */
@@ -998,26 +1564,20 @@ interface ModalTotalPassengersProps {
998
1564
  onClose: () => void;
999
1565
  /**
1000
1566
  * Modal title
1001
- * @default "Pilih Jumlah Penumpang"
1002
1567
  */
1003
1568
  title?: string;
1004
1569
  /**
1005
1570
  * Array of passenger types from API
1006
1571
  */
1007
1572
  passengerTypes: PassengerType[];
1008
- /**
1009
- * Array of service classes
1010
- * @default DEFAULT_SERVICE_CLASSES
1011
- */
1012
- serviceClasses?: ServiceClass[];
1013
1573
  /**
1014
1574
  * Currently selected passengers
1015
1575
  */
1016
- selectedPassengers: SelectedPassengerItem[];
1576
+ selectedPassengers: PassengerType[];
1017
1577
  /**
1018
1578
  * Callback when save button is clicked
1019
1579
  */
1020
- onSave: (passengers: SelectedPassengerItem[]) => void;
1580
+ onSave: (passengers: PassengerType[]) => void;
1021
1581
  /**
1022
1582
  * Loading state
1023
1583
  * @default false
@@ -1030,16 +1590,29 @@ interface ModalTotalPassengersProps {
1030
1590
  maxPassengers?: number;
1031
1591
  /**
1032
1592
  * Message to display in the info bar
1033
- * @default "Anda dapat menambahkan hingga {maxPassengers} penumpang pada golongan kendaraan ini."
1034
1593
  */
1035
1594
  infoMessage?: string;
1595
+ /**
1596
+ * Error state
1597
+ * @default false
1598
+ */
1599
+ isError?: boolean;
1600
+ /**
1601
+ * Reload button for error state
1602
+ */
1603
+ reloadButton?: EmptyContentButton;
1604
+ /**
1605
+ * Image source for empty state
1606
+ */
1607
+ emptyImageSrc?: string;
1036
1608
  }
1609
+
1037
1610
  /**
1038
1611
  * ModalTotalPassengers - A reusable modal component for selecting passenger counts
1039
1612
  *
1040
1613
  * This component provides a passenger selection modal with features like:
1041
1614
  * - Accordion for each passenger type
1042
- * - Counter for each service class (Economy, Business, Executive)
1615
+ * - Counter for each service class (dynamic from API)
1043
1616
  * - Automatic default selection (1 adult economy)
1044
1617
  * - Validation and save functionality
1045
1618
  *
@@ -1057,25 +1630,218 @@ interface ModalTotalPassengersProps {
1057
1630
  */
1058
1631
  declare const ModalTotalPassengers: React$1.FC<ModalTotalPassengersProps>;
1059
1632
 
1633
+ declare const API_ENDPOINTS: {
1634
+ readonly PORTS: {
1635
+ readonly ORIGIN: "/v1/surrounding/catalog/ports/list/origin";
1636
+ readonly DESTINATION: "/v1/surrounding/catalog/ports/list/destination";
1637
+ };
1638
+ readonly SERVICES: {
1639
+ readonly LIST: "/v1/surrounding/catalog/service-types";
1640
+ };
1641
+ readonly PASSENGERS: {
1642
+ readonly LIST: "/v1/surrounding/catalog/passenger-types";
1643
+ };
1644
+ readonly AUTH: {
1645
+ readonly LOGIN: "/v1/surrounding/auth/login";
1646
+ readonly REGISTER: "/auth/register";
1647
+ readonly LOGOUT: "/auth/logout";
1648
+ readonly REFRESH: "/auth/refresh";
1649
+ readonly PROFILE: "/auth/profile";
1650
+ readonly UPDATE_PROFILE: "/auth/profile";
1651
+ readonly CHANGE_PASSWORD: "/auth/change-password";
1652
+ readonly FORGOT_PASSWORD: "/auth/forgot-password";
1653
+ readonly RESET_PASSWORD: "/auth/reset-password";
1654
+ readonly VERIFY_EMAIL: "/auth/verify-email";
1655
+ };
1656
+ readonly USERS: {
1657
+ readonly LIST: "/users";
1658
+ readonly CREATE: "/users";
1659
+ readonly DETAIL: (id: string) => string;
1660
+ readonly UPDATE: (id: string) => string;
1661
+ readonly DELETE: (id: string) => string;
1662
+ readonly AVATAR: (id: string) => string;
1663
+ };
1664
+ readonly FILES: {
1665
+ readonly UPLOAD: "/files/upload";
1666
+ readonly DOWNLOAD: (id: string) => string;
1667
+ readonly DELETE: (id: string) => string;
1668
+ readonly LIST: "/files";
1669
+ };
1670
+ readonly DASHBOARD: {
1671
+ readonly STATS: "/dashboard/stats";
1672
+ readonly CHART_DATA: "/dashboard/chart-data";
1673
+ readonly RECENT_ACTIVITIES: "/dashboard/recent-activities";
1674
+ };
1675
+ readonly NOTIFICATIONS: {
1676
+ readonly LIST: "/notifications";
1677
+ readonly MARK_READ: (id: string) => string;
1678
+ readonly MARK_ALL_READ: "/notifications/read-all";
1679
+ readonly DELETE: (id: string) => string;
1680
+ readonly SETTINGS: "/notifications/settings";
1681
+ };
1682
+ readonly SETTINGS: {
1683
+ readonly GENERAL: "/settings/general";
1684
+ readonly SECURITY: "/settings/security";
1685
+ readonly PREFERENCES: "/settings/preferences";
1686
+ };
1687
+ };
1688
+ declare const API_CONFIG: {
1689
+ readonly TIMEOUT: 30000;
1690
+ readonly RETRY_ATTEMPTS: 3;
1691
+ readonly RETRY_DELAY: 1000;
1692
+ readonly CACHE_TIME: number;
1693
+ readonly STALE_TIME: number;
1694
+ };
1695
+ declare const API_ERROR_MESSAGES: {
1696
+ readonly NETWORK_ERROR: "Network error occurred. Please check your connection.";
1697
+ readonly TIMEOUT_ERROR: "Request timeout. Please try again.";
1698
+ readonly UNAUTHORIZED: "You are not authorized to perform this action.";
1699
+ readonly FORBIDDEN: "Access denied.";
1700
+ readonly NOT_FOUND: "Resource not found.";
1701
+ readonly SERVER_ERROR: "Internal server error. Please try again later.";
1702
+ readonly VALIDATION_ERROR: "Please check your input and try again.";
1703
+ readonly TOKEN_EXPIRED: "Your session has expired. Please login again.";
1704
+ readonly RATE_LIMIT: "Too many requests. Please try again later.";
1705
+ };
1706
+ declare const HTTP_STATUS: {
1707
+ readonly OK: 200;
1708
+ readonly CREATED: 201;
1709
+ readonly NO_CONTENT: 204;
1710
+ readonly BAD_REQUEST: 400;
1711
+ readonly UNAUTHORIZED: 401;
1712
+ readonly FORBIDDEN: 403;
1713
+ readonly NOT_FOUND: 404;
1714
+ readonly CONFLICT: 409;
1715
+ readonly UNPROCESSABLE_ENTITY: 422;
1716
+ readonly TOO_MANY_REQUESTS: 429;
1717
+ readonly INTERNAL_SERVER_ERROR: 500;
1718
+ readonly BAD_GATEWAY: 502;
1719
+ readonly SERVICE_UNAVAILABLE: 503;
1720
+ };
1721
+ declare const PASSENGER_TYPE: {
1722
+ readonly ADULT: 1;
1723
+ readonly CHILD: 2;
1724
+ readonly INFANT: 3;
1725
+ readonly ELDERLY: 5;
1726
+ };
1727
+ type PASSENGER_TYPE_TYPE = typeof PASSENGER_TYPE[keyof typeof PASSENGER_TYPE];
1728
+ declare const IDENTITY_TYPE: {
1729
+ readonly KTP: 1;
1730
+ readonly SIM: 2;
1731
+ readonly PSP: 3;
1732
+ readonly TGL: 4;
1733
+ };
1734
+ type IDENTITY_TYPE_TYPE = typeof IDENTITY_TYPE[keyof typeof IDENTITY_TYPE];
1735
+ declare const LOAD_TYPE: {
1736
+ readonly PEDESTRIAN: 1;
1737
+ readonly MOTORBIKE: 2;
1738
+ readonly PASSENGER_VEHICLE: 3;
1739
+ readonly GOODS_VEHICLE: 4;
1740
+ readonly LOOSE_LOAD_WITH_VEHICLE: 5;
1741
+ readonly LOOSE_LOAD_WITHOUT_VEHICLE: 6;
1742
+ };
1743
+ type LOAD_TYPE_TYPE = typeof LOAD_TYPE[keyof typeof LOAD_TYPE];
1744
+ declare const GENDER: {
1745
+ readonly MALE: "M";
1746
+ readonly FEMALE: "F";
1747
+ };
1748
+ type GENDER_TYPE = typeof GENDER[keyof typeof GENDER];
1749
+ declare const MY_TICKET_TAB: {
1750
+ readonly WAITING: 1;
1751
+ readonly ACTIVE: 2;
1752
+ readonly COMPLETED: 3;
1753
+ readonly FAILED: 4;
1754
+ readonly RETURNED: 5;
1755
+ };
1756
+ type MY_TICKET_TAB_TYPE = typeof MY_TICKET_TAB[keyof typeof MY_TICKET_TAB];
1757
+ declare const MY_TICKET_STATUS: {
1758
+ readonly DRAFT: 1;
1759
+ readonly NOT_YET_PAID: 2;
1760
+ readonly PAID: 3;
1761
+ readonly CHECKIN: 4;
1762
+ readonly BOARDING: 5;
1763
+ readonly NEED_ACTION: 6;
1764
+ readonly COMPLETED: 7;
1765
+ readonly EXPIRED_CHECKIN: 8;
1766
+ readonly EXPIRED_PAYMENT: 9;
1767
+ readonly EXPIRED_BOARDING: 10;
1768
+ readonly REFUND: 11;
1769
+ };
1770
+ type MY_TICKET_STATUS_TYPE = typeof MY_TICKET_STATUS[keyof typeof MY_TICKET_STATUS];
1771
+ declare const MANIFEST_ENTITY: {
1772
+ readonly COMPANY: "company";
1773
+ readonly INDIVIDUAL: "individual";
1774
+ };
1775
+ type MANIFEST_ENTITY_TYPE = typeof MANIFEST_ENTITY[keyof typeof MANIFEST_ENTITY];
1776
+ declare const HARDCODED_ID: {
1777
+ readonly FAQ_ID_PEMESANAN_TIKET: 1;
1778
+ readonly COMPANY_ID_LAINNYA: "999999";
1779
+ readonly LOAD_TYPE_ID_LAINNYA: 87;
1780
+ };
1781
+ interface LoadType {
1782
+ id: number;
1783
+ name: string;
1784
+ price: number;
1785
+ currency: string;
1786
+ formattedPrice: string;
1787
+ unit?: {
1788
+ id: string;
1789
+ name: string;
1790
+ };
1791
+ }
1792
+ interface IdentityType {
1793
+ id: number;
1794
+ code: string;
1795
+ name: string;
1796
+ rule: string;
1797
+ }
1798
+
1799
+ interface TypeOfServiceChild {
1800
+ id: number;
1801
+ loadType: LOAD_TYPE_TYPE;
1802
+ group: number;
1803
+ title: string;
1804
+ info: string;
1805
+ image: string;
1806
+ capacity: number | null;
1807
+ }
1060
1808
  /**
1061
1809
  * Service type item structure
1062
1810
  */
1063
1811
  interface TypeOfService {
1064
1812
  id: number;
1065
- image: string;
1813
+ loadType: LOAD_TYPE_TYPE;
1814
+ group: number;
1066
1815
  title: string;
1067
1816
  info: string;
1068
- price: number;
1069
- type: string;
1070
- parentId?: number;
1071
- parentTitle?: string;
1072
- child: TypeOfService[];
1073
- typeOfPassanger: string;
1817
+ image: string;
1818
+ children: TypeOfServiceChild[];
1819
+ capacity?: number | null;
1820
+ }
1821
+ /**
1822
+ * Labels for ModalTypeOfService component
1823
+ */
1824
+ interface ModalTypeOfServiceLabels {
1825
+ title: string;
1826
+ cancelButton: string;
1827
+ saveButton: string;
1828
+ vehiclesAlt: string;
1829
+ closeAriaLabel: string;
1830
+ emptyContent: string;
1074
1831
  }
1075
1832
  /**
1076
1833
  * Props for ModalTypeOfService component
1077
1834
  */
1078
1835
  interface ModalTypeOfServiceProps {
1836
+ /**
1837
+ * Language for labels
1838
+ * @default 'id'
1839
+ */
1840
+ language?: Language;
1841
+ /**
1842
+ * Custom labels override
1843
+ */
1844
+ labels?: Partial<ModalTypeOfServiceLabels>;
1079
1845
  /**
1080
1846
  * Whether the modal is open
1081
1847
  */
@@ -1086,7 +1852,6 @@ interface ModalTypeOfServiceProps {
1086
1852
  onClose: () => void;
1087
1853
  /**
1088
1854
  * Modal title
1089
- * @default "Pilih Tipe Layanan"
1090
1855
  */
1091
1856
  title?: string;
1092
1857
  /**
@@ -1111,7 +1876,26 @@ interface ModalTypeOfServiceProps {
1111
1876
  width: number;
1112
1877
  height: number;
1113
1878
  }) => ReactNode;
1879
+ /**
1880
+ * Loading state for service types data
1881
+ * @default false
1882
+ */
1883
+ isLoading?: boolean;
1884
+ /**
1885
+ * Error state for service types data
1886
+ * @default false
1887
+ */
1888
+ isError?: boolean;
1889
+ /**
1890
+ * Reload button for error state
1891
+ */
1892
+ reloadButton?: EmptyContentButton;
1893
+ /**
1894
+ * Image source for empty state
1895
+ */
1896
+ emptyImageSrc?: string;
1114
1897
  }
1898
+
1115
1899
  /**
1116
1900
  * ModalTypeOfService - A reusable modal component for selecting service types
1117
1901
  *
@@ -1153,4 +1937,1990 @@ declare const DEFAULT_VEHICLE_ICONS: {
1153
1937
  readonly looseLoad: "/assets/images/icons/loose-load.webp";
1154
1938
  };
1155
1939
 
1156
- export { BackgroundTicketCard, BackgroundTicketCardVertical, CardBanner, type CardBannerProps, CardPromo, type CardPromoProps, CardServiceMenu, type CardServiceMenuProps, CardTicket, type CardTicketButton, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, DEFAULT_COUNTRY_CODES, DEFAULT_SERVICE_CLASSES, DEFAULT_VEHICLE_ICONS, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, type ModalPresetKey, ModalSearchHarbor, type ModalSearchHarborProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type Passenger, type PassengerService, type PassengerServiceCode, type PassengerType, type RadioOption, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, type TabType, type TypeOfService, getModalPreset };
1940
+ interface SortOption {
1941
+ label: string;
1942
+ value: string;
1943
+ sortBy: string;
1944
+ sortDir: string;
1945
+ }
1946
+ interface FilterCount {
1947
+ typeService?: number;
1948
+ timeDeparture?: number;
1949
+ timeArrival?: number;
1950
+ priceRange?: number;
1951
+ durationRange?: number;
1952
+ }
1953
+ interface SortMenuLabels {
1954
+ filterButtonText: string;
1955
+ sortButtonText: string;
1956
+ clearFiltersText: string;
1957
+ recommendation: string;
1958
+ highestPrice: string;
1959
+ lowestPrice: string;
1960
+ earliestDeparture: string;
1961
+ latestDeparture: string;
1962
+ resetSortAriaLabel: string;
1963
+ }
1964
+ interface SortMenuProps {
1965
+ /**
1966
+ * Language for labels (Indonesian or English)
1967
+ * @default 'id'
1968
+ */
1969
+ language?: Language;
1970
+ /**
1971
+ * Custom labels override (optional)
1972
+ */
1973
+ labels?: Partial<SortMenuLabels>;
1974
+ /**
1975
+ * Current sort value
1976
+ */
1977
+ value: string;
1978
+ /**
1979
+ * Callback when sort value changes — receives full SortOption object
1980
+ */
1981
+ onChange: (option: SortOption) => void;
1982
+ /**
1983
+ * Total active filter categories
1984
+ * @default 0
1985
+ */
1986
+ totalActiveFilters?: number;
1987
+ /**
1988
+ * Callback when filter button is clicked
1989
+ */
1990
+ onFilterClick?: () => void;
1991
+ /**
1992
+ * Callback when clear filters button is clicked
1993
+ */
1994
+ onClearFilters?: () => void;
1995
+ /**
1996
+ * Custom sort options
1997
+ * @default Default ferry sort options
1998
+ */
1999
+ sortOptions?: SortOption[];
2000
+ /**
2001
+ * Filter button text
2002
+ * @default "Filter"
2003
+ * @deprecated Use labels
2004
+ */
2005
+ filterButtonText?: string;
2006
+ /**
2007
+ * Sort button text
2008
+ * @default "Urutkan Berdasarkan"
2009
+ * @deprecated Use labels
2010
+ */
2011
+ sortButtonText?: string;
2012
+ /**
2013
+ * Clear filters button text template
2014
+ * @default "{count} Filter Dipilih"
2015
+ * @deprecated Use labels
2016
+ */
2017
+ clearFiltersText?: string;
2018
+ }
2019
+
2020
+ declare const SortMenu: React$1.FC<SortMenuProps>;
2021
+
2022
+ /**
2023
+ * @deprecated Use getSortOptions and find the label from there
2024
+ */
2025
+ declare const DEFAULT_SORT_OPTIONS: SortOption[];
2026
+ /**
2027
+ * @deprecated Use labels directly
2028
+ */
2029
+ declare const getSortLabel: (value: string) => string;
2030
+
2031
+ interface ModalFilterTicketProps {
2032
+ /**
2033
+ * Language for labels (Indonesian or English)
2034
+ * @default 'id'
2035
+ */
2036
+ language?: Language;
2037
+ /**
2038
+ * Whether the modal is open
2039
+ */
2040
+ open: boolean;
2041
+ /**
2042
+ * Callback when modal open state changes
2043
+ */
2044
+ onOpenChange: (open: boolean) => void;
2045
+ /**
2046
+ * Selected service types as objects with id and label
2047
+ */
2048
+ selectedServiceTypes: Array<{
2049
+ id: number;
2050
+ label: string;
2051
+ }>;
2052
+ /**
2053
+ * Callback when service types change
2054
+ */
2055
+ onServiceTypesChange: (serviceTypes: Array<{
2056
+ id: number;
2057
+ label: string;
2058
+ }>) => void;
2059
+ /**
2060
+ * Selected departure time slots
2061
+ */
2062
+ departureTime: string[];
2063
+ /**
2064
+ * Callback when departure time changes
2065
+ */
2066
+ onDepartureTimeChange: (time: string[]) => void;
2067
+ /**
2068
+ * Selected arrival time slots
2069
+ */
2070
+ arrivalTime: string[];
2071
+ /**
2072
+ * Callback when arrival time changes
2073
+ */
2074
+ onArrivalTimeChange: (time: string[]) => void;
2075
+ /**
2076
+ * Price range [min, max]
2077
+ */
2078
+ priceRange: [number, number];
2079
+ /**
2080
+ * Callback when price range changes
2081
+ */
2082
+ onPriceRangeChange: (range: [number, number]) => void;
2083
+ /**
2084
+ * Duration range [min, max] in minutes
2085
+ */
2086
+ durationRange: [number, number];
2087
+ /**
2088
+ * Callback when duration range changes
2089
+ */
2090
+ onDurationRangeChange: (range: [number, number]) => void;
2091
+ /**
2092
+ * Callback when reset button is clicked
2093
+ */
2094
+ onReset: () => void;
2095
+ /**
2096
+ * Callback when apply button is clicked
2097
+ */
2098
+ onApply: () => void;
2099
+ /**
2100
+ * Optional custom labels
2101
+ */
2102
+ labels?: Partial<ModalFilterTicketLabels>;
2103
+ /**
2104
+ * Service types list (from API data)
2105
+ */
2106
+ serviceTypes?: Array<{
2107
+ value: number;
2108
+ label: string;
2109
+ }>;
2110
+ /**
2111
+ * Time slots list (from API/Redux data)
2112
+ */
2113
+ timeSlots?: Array<{
2114
+ value: string;
2115
+ label: string;
2116
+ }>;
2117
+ /**
2118
+ * Min price for range slider
2119
+ * @default 0
2120
+ */
2121
+ minPrice?: number;
2122
+ /**
2123
+ * Max price for range slider
2124
+ * @default 0
2125
+ */
2126
+ maxPrice?: number;
2127
+ /**
2128
+ * Min duration for range slider (minutes)
2129
+ * @default 0
2130
+ */
2131
+ minDuration?: number;
2132
+ /**
2133
+ * Max duration for range slider (minutes)
2134
+ * @default 0
2135
+ */
2136
+ maxDuration?: number;
2137
+ /**
2138
+ * Step value for duration range slider
2139
+ * @default 1
2140
+ */
2141
+ durationStep?: number;
2142
+ /**
2143
+ * Whether the filter data is still loading (shows skeleton)
2144
+ * @default false
2145
+ */
2146
+ isLoading?: boolean;
2147
+ }
2148
+ interface ModalFilterTicketLabels {
2149
+ title: string;
2150
+ serviceTypeLabel: string;
2151
+ departureTimeLabel: string;
2152
+ arrivalTimeLabel: string;
2153
+ priceLabel: string;
2154
+ priceRangeText: (min: number, max: number) => string;
2155
+ durationLabel: string;
2156
+ durationRangeText: (min: number, max: number) => string;
2157
+ resetButton: string;
2158
+ applyButton: string;
2159
+ hourUnit: string;
2160
+ minuteUnit: string;
2161
+ currencySymbol: string;
2162
+ closeAriaLabel: string;
2163
+ }
2164
+
2165
+ declare const ModalFilterTicket: React$1.FC<ModalFilterTicketProps>;
2166
+
2167
+ declare const DEFAULT_LABELS$1: Record<Language, ModalFilterTicketLabels>;
2168
+ declare const DEFAULT_SERVICE_TYPES: {
2169
+ value: string;
2170
+ label: string;
2171
+ }[];
2172
+ declare const DEFAULT_TIME_SLOTS: {
2173
+ value: string;
2174
+ label: string;
2175
+ }[];
2176
+ declare const DEFAULT_PRICE_RANGE: {
2177
+ min: number;
2178
+ max: number;
2179
+ };
2180
+ declare const DEFAULT_DURATION_RANGE: {
2181
+ min: number;
2182
+ max: number;
2183
+ };
2184
+
2185
+ interface DateItem {
2186
+ /**
2187
+ * Formatted date label (e.g., "Kam, 06 Nov 2025")
2188
+ */
2189
+ label: string;
2190
+ /**
2191
+ * Price for this date
2192
+ */
2193
+ price: string;
2194
+ /**
2195
+ * Optional raw date value
2196
+ */
2197
+ value?: Date | string;
2198
+ }
2199
+ interface DateFilterProps {
2200
+ /**
2201
+ * Array of date items to display
2202
+ */
2203
+ dates: DateItem[];
2204
+ /**
2205
+ * Currently selected date label
2206
+ */
2207
+ selectedDate: string;
2208
+ /**
2209
+ * Language for localization
2210
+ * @default 'id'
2211
+ */
2212
+ language?: Language;
2213
+ /**
2214
+ * Callback when a date is clicked
2215
+ */
2216
+ onDateClick: (dateLabel: string) => void;
2217
+ /**
2218
+ * Callback when calendar button is clicked
2219
+ */
2220
+ onCalendarClick: () => void;
2221
+ /**
2222
+ * Show navigation arrows
2223
+ * @default true
2224
+ */
2225
+ showNavigation?: boolean;
2226
+ /**
2227
+ * Show calendar button
2228
+ * @default true
2229
+ */
2230
+ showCalendarButton?: boolean;
2231
+ /**
2232
+ * Scroll amount in pixels for navigation
2233
+ * @default 150
2234
+ */
2235
+ scrollAmount?: number;
2236
+ /**
2237
+ * Optional custom labels
2238
+ */
2239
+ labels?: Partial<DateFilterLabels>;
2240
+ isLoading?: boolean;
2241
+ }
2242
+ interface DateFilterLabels {
2243
+ prevButtonAriaLabel: string;
2244
+ nextButtonAriaLabel: string;
2245
+ calendarButtonAriaLabel: string;
2246
+ }
2247
+
2248
+ declare const DateFilter: React$1.FC<DateFilterProps>;
2249
+
2250
+ declare const DEFAULT_LABELS: Record<Language, DateFilterLabels>;
2251
+ declare const DEFAULT_SCROLL_AMOUNT = 150;
2252
+
2253
+ /**
2254
+ * Labels for ModalSearchTicket component
2255
+ */
2256
+ interface ModalSearchTicketLabels {
2257
+ title: string;
2258
+ fromLabel: string;
2259
+ fromPlaceholder: string;
2260
+ fromRequired: string;
2261
+ toLabel: string;
2262
+ toPlaceholder: string;
2263
+ toRequired: string;
2264
+ departureDateLabel: string;
2265
+ departureDatePlaceholder: string;
2266
+ departureDateRequired: string;
2267
+ roundTripLabel: string;
2268
+ returnDateLabel: string;
2269
+ returnDatePlaceholder: string;
2270
+ returnDateRequired: string;
2271
+ serviceClassLabel: string;
2272
+ serviceClassPlaceholder: string;
2273
+ typeOfServiceLabel: string;
2274
+ typeOfServicePlaceholder: string;
2275
+ passengerLabel: string;
2276
+ passengerPlaceholder: string;
2277
+ searchButton: string;
2278
+ closeAriaLabel: string;
2279
+ }
2280
+ /**
2281
+ * Form data structure for search ticket modal
2282
+ */
2283
+ interface SearchTicketFormData {
2284
+ /**
2285
+ * Origin harbor name
2286
+ */
2287
+ from: string;
2288
+ /**
2289
+ * Destination harbor name
2290
+ */
2291
+ to: string;
2292
+ /**
2293
+ * Departure date
2294
+ */
2295
+ startDate: string;
2296
+ /**
2297
+ * Whether this is a round trip
2298
+ * @default false
2299
+ */
2300
+ roundTrip: boolean;
2301
+ /**
2302
+ * Return date (required if roundTrip is true)
2303
+ */
2304
+ endDate: string;
2305
+ /**
2306
+ * Selected service class display text
2307
+ */
2308
+ serviceClass: string;
2309
+ /**
2310
+ * Selected type of service display text
2311
+ */
2312
+ typeOfService: string;
2313
+ /**
2314
+ * Passenger count display text
2315
+ */
2316
+ passenger: string;
2317
+ }
2318
+ /**
2319
+ * Props for ModalSearchTicket component
2320
+ */
2321
+ interface ModalSearchTicketProps extends Partial<DialogProps> {
2322
+ /**
2323
+ * Language for labels
2324
+ * @default 'id'
2325
+ */
2326
+ language?: Language;
2327
+ /**
2328
+ * Custom labels override
2329
+ */
2330
+ labels?: Partial<ModalSearchTicketLabels>;
2331
+ /**
2332
+ * Whether the modal is open
2333
+ */
2334
+ open: boolean;
2335
+ /**
2336
+ * Callback when modal should close
2337
+ */
2338
+ onClose: () => void;
2339
+ /**
2340
+ * Default values for the form fields
2341
+ */
2342
+ defaultValues?: Partial<SearchTicketFormData>;
2343
+ /**
2344
+ * Callback when origin harbor field is clicked
2345
+ */
2346
+ onSelectOrigin?: () => void;
2347
+ /**
2348
+ * Callback when destination harbor field is clicked
2349
+ */
2350
+ onSelectDestination?: () => void;
2351
+ /**
2352
+ * Callback when origin harbor value changes
2353
+ * Typically used to clear destination when origin changes
2354
+ */
2355
+ onFromChange?: () => void;
2356
+ /**
2357
+ * Callback when departure date field is clicked
2358
+ */
2359
+ onSelectDepartureDate?: () => void;
2360
+ /**
2361
+ * Callback when return date field is clicked
2362
+ */
2363
+ onSelectReturnDate?: () => void;
2364
+ /**
2365
+ * Callback when service class field is clicked
2366
+ */
2367
+ onSelectServiceClass?: () => void;
2368
+ /**
2369
+ * Callback when type of service field is clicked
2370
+ */
2371
+ onSelectTypeOfService?: () => void;
2372
+ /**
2373
+ * Callback when passenger field is clicked
2374
+ */
2375
+ onSelectPassenger?: () => void;
2376
+ /**
2377
+ * Callback when switch harbor button is clicked
2378
+ * @deprecated Use onSwitchClick instead
2379
+ */
2380
+ onSwitchHarbor?: () => void;
2381
+ /**
2382
+ * Callback when switch harbor button is clicked
2383
+ */
2384
+ onSwitchClick?: () => void;
2385
+ /**
2386
+ * Callback when round trip toggle changes
2387
+ */
2388
+ onRoundTripChange?: (value: boolean) => void;
2389
+ /**
2390
+ * Callback when form is submitted
2391
+ */
2392
+ onSubmit?: (data: SearchTicketFormData) => void;
2393
+ /**
2394
+ * Disabled states for each field
2395
+ */
2396
+ toDisabled?: boolean;
2397
+ endDateDisabled?: boolean;
2398
+ serviceClassDisabled?: boolean;
2399
+ typeOfServiceDisabled?: boolean;
2400
+ roundTripDisabled?: boolean;
2401
+ /**
2402
+ * Whether the submit button should be disabled
2403
+ * @default false
2404
+ */
2405
+ isSubmitDisabled?: boolean;
2406
+ /**
2407
+ * Whether the switch harbor button should be disabled
2408
+ * @default false
2409
+ */
2410
+ switchDisabled?: boolean;
2411
+ /**
2412
+ * Whether the switch harbor button should be rotating
2413
+ * @default false
2414
+ */
2415
+ isRotating?: boolean;
2416
+ /**
2417
+ * Whether to show the passenger field
2418
+ * @default false
2419
+ */
2420
+ showPassengerField?: boolean;
2421
+ /**
2422
+ * Whether to show the round trip toggle
2423
+ * @default true
2424
+ */
2425
+ showRoundTrip?: boolean;
2426
+ }
2427
+
2428
+ /**
2429
+ * ModalSearchTicket - A reusable modal component for searching ferry tickets
2430
+ *
2431
+ * This component provides a comprehensive form interface for searching ferry tickets with features like:
2432
+ * - Origin and destination harbor selection
2433
+ * - Departure and return date selection
2434
+ * - Round trip toggle
2435
+ * - Service class selection
2436
+ * - Type of service selection
2437
+ * - Passenger count selection
2438
+ * - Harbor switching functionality
2439
+ *
2440
+ * @example
2441
+ * ```tsx
2442
+ * <ModalSearchTicket
2443
+ * open={isOpen}
2444
+ * onClose={() => setIsOpen(false)}
2445
+ * defaultValues={{
2446
+ * from: 'Merak',
2447
+ * to: 'Bakauheni',
2448
+ * startDate: '12 Januari 2026',
2449
+ * roundTrip: false,
2450
+ * endDate: '',
2451
+ * serviceClass: '2 Jenis Layanan',
2452
+ * typeOfService: 'Pejalan Kaki',
2453
+ * passenger: '2 Penumpang',
2454
+ * }}
2455
+ * onSelectOrigin={() => openOriginModal()}
2456
+ * onSelectDestination={() => openDestinationModal()}
2457
+ * onSelectDepartureDate={() => openDateModal()}
2458
+ * onSelectReturnDate={() => openReturnDateModal()}
2459
+ * onSelectServiceClass={() => openServiceClassModal()}
2460
+ * onSelectTypeOfService={() => openTypeOfServiceModal()}
2461
+ * onSelectPassenger={() => openPassengerModal()}
2462
+ * onSwitchHarbor={() => switchHarbors()}
2463
+ * onSubmit={(data) => handleSearch(data)}
2464
+ * isSubmitDisabled={!isFormValid}
2465
+ * />
2466
+ * ```
2467
+ */
2468
+ declare const ModalSearchTicket: React$1.FC<ModalSearchTicketProps>;
2469
+
2470
+ interface StepperStep {
2471
+ id: string;
2472
+ label: string;
2473
+ number: number;
2474
+ }
2475
+ interface StepperProps {
2476
+ /**
2477
+ * Array of steps to display
2478
+ */
2479
+ steps: StepperStep[];
2480
+ /**
2481
+ * Current active step (can be step id or step number)
2482
+ */
2483
+ currentStep: string | number;
2484
+ /**
2485
+ * Additional CSS class name
2486
+ */
2487
+ className?: string;
2488
+ /**
2489
+ * Custom colors for stepper elements
2490
+ */
2491
+ colors?: {
2492
+ active?: string;
2493
+ completed?: string;
2494
+ inactive?: string;
2495
+ activeBackground?: string;
2496
+ completedBackground?: string;
2497
+ inactiveBackground?: string;
2498
+ label?: string;
2499
+ connectorDefault?: string;
2500
+ connectorCompleted?: string;
2501
+ connectorActive?: string;
2502
+ };
2503
+ /**
2504
+ * Custom dimensions for stepper elements
2505
+ */
2506
+ dimensions?: {
2507
+ height?: string;
2508
+ mobileHeight?: string;
2509
+ circleSize?: string;
2510
+ mobileCircleSize?: string;
2511
+ ferryIconWidth?: string;
2512
+ ferryIconHeight?: string;
2513
+ mobileFerryIconWidth?: string;
2514
+ mobileFerryIconHeight?: string;
2515
+ };
2516
+ /**
2517
+ * Language for labels
2518
+ * @default 'id'
2519
+ */
2520
+ language?: 'id' | 'en';
2521
+ /**
2522
+ * Custom labels override
2523
+ */
2524
+ labels?: Partial<StepperLabels>;
2525
+ }
2526
+ interface StepperLabels {
2527
+ stepperBackgroundAlt: string;
2528
+ ferryIconAlt: string;
2529
+ }
2530
+ type StepStatus = 'completed' | 'active' | 'inactive';
2531
+
2532
+ declare const Stepper: React$1.FC<StepperProps>;
2533
+
2534
+ interface Orderer {
2535
+ name?: string;
2536
+ phoneNumber?: string;
2537
+ email?: string;
2538
+ }
2539
+ interface CardOrdererInfoLabels {
2540
+ title: string;
2541
+ ordererName: string;
2542
+ phoneNumber: string;
2543
+ email: string;
2544
+ }
2545
+ interface CardOrdererInfoProps {
2546
+ /**
2547
+ * Language for labels (Indonesian or English)
2548
+ * @default 'id'
2549
+ */
2550
+ language?: Language;
2551
+ /**
2552
+ * Orderer information
2553
+ */
2554
+ orderer?: Orderer;
2555
+ /**
2556
+ * Custom labels override (optional)
2557
+ * If not provided, default labels based on language will be used
2558
+ */
2559
+ labels?: Partial<CardOrdererInfoLabels>;
2560
+ /**
2561
+ * Additional CSS class name
2562
+ */
2563
+ className?: string;
2564
+ }
2565
+
2566
+ declare const CardOrdererInfo: React$1.FC<CardOrdererInfoProps>;
2567
+
2568
+ interface ModalListPassengerLabels {
2569
+ title: string;
2570
+ searchPlaceholder: string;
2571
+ addPassengerButton: string;
2572
+ cancelButton: string;
2573
+ editPassengerAriaLabel: string;
2574
+ categories: {
2575
+ adult: string;
2576
+ child: string;
2577
+ infant: string;
2578
+ elderly: string;
2579
+ };
2580
+ }
2581
+ interface ModalListPassengerProps {
2582
+ /**
2583
+ * Whether the modal is open
2584
+ */
2585
+ open: boolean;
2586
+ /**
2587
+ * Callback when modal should close
2588
+ */
2589
+ onClose: () => void;
2590
+ /**
2591
+ * Modal title
2592
+ * @default "Detail Penumpang"
2593
+ */
2594
+ title?: string;
2595
+ /**
2596
+ * List of available passengers to display
2597
+ */
2598
+ passengers: Passenger[];
2599
+ passengerAgeId: number;
2600
+ /**
2601
+ * Current search query value
2602
+ */
2603
+ searchQuery: string;
2604
+ /**
2605
+ * Callback when search query changes
2606
+ */
2607
+ onSearchChange: (query: string) => void;
2608
+ /**
2609
+ * Callback when a passenger is selected
2610
+ */
2611
+ onSelectPassenger: (passenger: Passenger) => void;
2612
+ /**
2613
+ * Callback when edit button is clicked for a passenger
2614
+ */
2615
+ onEditPassenger: (passenger: Passenger) => void;
2616
+ /**
2617
+ * Callback when "Tambah Penumpang" button is clicked
2618
+ */
2619
+ onAddPassenger: () => void;
2620
+ /**
2621
+ * Whether "Sama Dengan Pemesan" is checked
2622
+ */
2623
+ /**
2624
+ * Callback when "Sama Dengan Pemesan" switch changes
2625
+ */
2626
+ /**
2627
+ * Language for labels
2628
+ * @default 'id'
2629
+ */
2630
+ language?: Language;
2631
+ /**
2632
+ * Custom labels override
2633
+ */
2634
+ labels?: Partial<ModalListPassengerLabels>;
2635
+ }
2636
+
2637
+ /**
2638
+ * ModalListPassenger - A reusable modal component for selecting passengers from a list
2639
+ *
2640
+ * This component provides a modal interface for selecting passengers with features like:
2641
+ * - Search functionality
2642
+ * - "Sama Dengan Pemesan" toggle
2643
+ * - Edit passenger option
2644
+ * - Add new passenger option
2645
+ *
2646
+ * @example
2647
+ * ```tsx
2648
+ * <ModalListPassenger
2649
+ * open={isOpen}
2650
+ * onClose={() => setIsOpen(false)}
2651
+ * passengers={passengerList}
2652
+ * searchQuery={search}
2653
+ * onSearchChange={setSearch}
2654
+ * onSelectPassenger={handleSelect}
2655
+ * onEditPassenger={handleEdit}
2656
+ * onAddPassenger={handleAdd}
2657
+ * />
2658
+ * ```
2659
+ */
2660
+ declare const ModalListPassenger: React$1.FC<ModalListPassengerProps>;
2661
+
2662
+ interface ScannedData {
2663
+ title?: string;
2664
+ name?: string;
2665
+ idNumber?: string;
2666
+ city?: string;
2667
+ age?: number;
2668
+ }
2669
+ interface ModalPassengerFormLabels {
2670
+ title: string;
2671
+ titleLabel: string;
2672
+ titlePlaceholder: string;
2673
+ nameLabel: string;
2674
+ namePlaceholder: string;
2675
+ idTypeLabel: string;
2676
+ idTypePlaceholder: string;
2677
+ idNumberLabel: string;
2678
+ idNumberPlaceholder: string;
2679
+ age: string;
2680
+ agePlaceholder: string;
2681
+ yearLabel: string;
2682
+ monthLabel: string;
2683
+ dateLabel: string;
2684
+ datePlaceholder: string;
2685
+ cityLabel: string;
2686
+ cityPlaceholder: string;
2687
+ ticketClassLabel: string;
2688
+ saveButton: string;
2689
+ cancelButton: string;
2690
+ idTypeOtherLabel: string;
2691
+ idTypeOtherPlaceholder: string;
2692
+ countryLabel: string;
2693
+ countryPlaceholder: string;
2694
+ autofill: string;
2695
+ phoneNumberLabel: string;
2696
+ phoneNumberPlaceholder: string;
2697
+ emailLabel: string;
2698
+ emailPlaceholder: string;
2699
+ selectIdTypeTitle: string;
2700
+ scanIdentityTitle: string;
2701
+ scanInstructions1: string;
2702
+ scanInstructions2: string;
2703
+ readingData: string;
2704
+ nameRead: string;
2705
+ idNumberRead: string;
2706
+ cityRead: string;
2707
+ scanUnreadable: string;
2708
+ photoNotClear: string;
2709
+ retakeAdvice: string;
2710
+ retakeButton: string;
2711
+ manualInputButton: string;
2712
+ cancelScanButton: string;
2713
+ savePhotoButton: string;
2714
+ cameraPermissionError: string;
2715
+ errors: {
2716
+ requiredTitle: string;
2717
+ requiredName: string;
2718
+ minLengthName: string;
2719
+ requiredIdType: string;
2720
+ requiredIdNumber: string;
2721
+ lengthIdNumber: string;
2722
+ requiredAge: string;
2723
+ minAge: string;
2724
+ maxAge: string;
2725
+ requiredDate: string;
2726
+ birthDateFuture: string;
2727
+ requiredCity: string;
2728
+ requiredCountry: string;
2729
+ requiredPhoneNumber: string;
2730
+ minLengthPhoneNumber: string;
2731
+ invalidEmail: string;
2732
+ invalidName: string;
2733
+ invalidIdNumber: string;
2734
+ };
2735
+ }
2736
+ interface PassengerFormData {
2737
+ /**
2738
+ * Passenger ID (for edit mode)
2739
+ */
2740
+ id?: number;
2741
+ /**
2742
+ * title id
2743
+ */
2744
+ titleId?: string;
2745
+ /**
2746
+ * Full name
2747
+ */
2748
+ fullName?: string;
2749
+ /**
2750
+ * Birth date
2751
+ */
2752
+ birthdate?: string;
2753
+ /**
2754
+ * Age (display string, auto-calculated from birthdate)
2755
+ */
2756
+ ageLabel?: string;
2757
+ /**
2758
+ * Age (auto-calculated display value, e.g. "25 tahun 3 bulan")
2759
+ */
2760
+ age?: string;
2761
+ /**
2762
+ * identityTypeId
2763
+ */
2764
+ identityTypeId?: string;
2765
+ /**
2766
+ * Country Id - for passport holders
2767
+ */
2768
+ countryId?: string;
2769
+ /**
2770
+ * identityId
2771
+ */
2772
+ identityId?: string;
2773
+ /**
2774
+ * Regency ID
2775
+ */
2776
+ regencyId?: string;
2777
+ /**
2778
+ * Email
2779
+ */
2780
+ email?: string;
2781
+ /**
2782
+ * Phone Number
2783
+ */
2784
+ phoneNumber?: string;
2785
+ /**
2786
+ * Is Account Owner
2787
+ */
2788
+ isAccountOwner?: boolean;
2789
+ /**
2790
+ * Ticket class
2791
+ */
2792
+ passengerClassId?: string;
2793
+ }
2794
+ interface ModalPassengerFormProps {
2795
+ /**
2796
+ * Whether the modal is open
2797
+ */
2798
+ open: boolean;
2799
+ /**
2800
+ * Callback when modal should close
2801
+ */
2802
+ onClose: () => void;
2803
+ /**
2804
+ * Callback when form is changed
2805
+ */
2806
+ onChange: (data: PassengerFormData) => void;
2807
+ /**
2808
+ * Modal title
2809
+ * @default "Detail Penumpang"
2810
+ */
2811
+ title?: string;
2812
+ /**
2813
+ * Callback when form is submitted
2814
+ */
2815
+ onSubmit: (data: PassengerFormData) => void;
2816
+ /**
2817
+ * Default values for the form
2818
+ */
2819
+ defaultValues?: PassengerFormData;
2820
+ /**
2821
+ * Options for title select field
2822
+ */
2823
+ titleOptions: SelectOption[];
2824
+ /**
2825
+ * Options for identity type select field
2826
+ */
2827
+ idTypes: IdentityType[];
2828
+ /**
2829
+ * Options for country select field
2830
+ */
2831
+ countryOptions: SelectOption[];
2832
+ /**
2833
+ * Options for city select field
2834
+ */
2835
+ cityOptions: SelectOption[];
2836
+ /**
2837
+ * Options for ticket class radio field
2838
+ */
2839
+ ticketClassOptions: RadioOption[];
2840
+ /**
2841
+ * Language for labels
2842
+ * @default 'id'
2843
+ */
2844
+ language?: Language;
2845
+ /**
2846
+ * Custom labels override
2847
+ */
2848
+ labels?: Partial<ModalPassengerFormLabels>;
2849
+ /**
2850
+ * Callback when scan identity completes successfully
2851
+ * Receives the scanned data for external processing
2852
+ */
2853
+ onScanComplete?: (data: ScannedData) => void;
2854
+ /**
2855
+ * Whether the form is currently submitting
2856
+ */
2857
+ isLoading?: boolean;
2858
+ }
2859
+
2860
+ declare const ModalPassengerForm: React$1.FC<ModalPassengerFormProps>;
2861
+
2862
+ interface CardPassengerListLabels {
2863
+ defaultTitle: string;
2864
+ passengerPrefix: string;
2865
+ }
2866
+ interface CardPassengerListProps {
2867
+ /**
2868
+ * Language for labels (Indonesian or English)
2869
+ * @default 'id'
2870
+ */
2871
+ language?: Language;
2872
+ /**
2873
+ * Card title
2874
+ * @default "Data Penumpang"
2875
+ */
2876
+ title?: string;
2877
+ /**
2878
+ * List of passengers to display
2879
+ */
2880
+ passengers: Passenger[];
2881
+ /**
2882
+ * Callback when a passenger is clicked
2883
+ */
2884
+ onPassengerClick: (passenger: Passenger) => void;
2885
+ /**
2886
+ * Custom labels override (optional)
2887
+ * If not provided, default labels based on language will be used
2888
+ */
2889
+ labels?: Partial<CardPassengerListLabels>;
2890
+ /**
2891
+ * Additional CSS class name
2892
+ */
2893
+ className?: string;
2894
+ }
2895
+
2896
+ /**
2897
+ * CardPassengerList - A reusable card component for displaying passenger list
2898
+ *
2899
+ * This component provides a card interface for showing passengers with features like:
2900
+ * - Header with title and divider line
2901
+ * - List of passengers with service class badges
2902
+ * - Clickable passenger items
2903
+ * - Badge with overlapping icon design
2904
+ *
2905
+ * @example
2906
+ * ```tsx
2907
+ * <CardPassengerList
2908
+ * title="Data Penumpang"
2909
+ * passengers={passengerList}
2910
+ * onPassengerClick={handleClick}
2911
+ * />
2912
+ * ```
2913
+ */
2914
+ declare const CardPassengerList: React$1.FC<CardPassengerListProps>;
2915
+
2916
+ interface CardVehicleDetailLabels {
2917
+ title: string;
2918
+ vehicleNumberLabel: string;
2919
+ vehicleNumberPlaceholder: string;
2920
+ hasLoadLabel: string;
2921
+ yesLabel: string;
2922
+ noLabel: string;
2923
+ vehicleNumberFormatError: string;
2924
+ }
2925
+ interface CardVehicleDetailProps {
2926
+ /**
2927
+ * Title of the vehicle service type
2928
+ */
2929
+ serviceTitle: string;
2930
+ /**
2931
+ * Image URL for the vehicle service
2932
+ */
2933
+ serviceImage: string;
2934
+ /**
2935
+ * React Hook Form control
2936
+ */
2937
+ control: Control<any>;
2938
+ /**
2939
+ * Disable edit vehicle detail
2940
+ */
2941
+ disabled: boolean;
2942
+ /**
2943
+ * Name of the form field for vehicle number
2944
+ * @default "vehicleNumber"
2945
+ */
2946
+ vehicleNumberName?: string;
2947
+ /**
2948
+ * Whether to show the "Has Load" radio option
2949
+ * @default false
2950
+ */
2951
+ showLoadOption?: boolean;
2952
+ /**
2953
+ * Current value of "Has Load" option
2954
+ */
2955
+ hasLoad?: 'true' | 'false';
2956
+ /**
2957
+ * Has Load Change Handler
2958
+ */
2959
+ onHasLoadChange?: (value: 'true' | 'false') => void;
2960
+ /**
2961
+ * Language for labels
2962
+ * @default 'id'
2963
+ */
2964
+ language?: Language;
2965
+ /**
2966
+ * Custom labels override
2967
+ */
2968
+ labels?: Partial<CardVehicleDetailLabels>;
2969
+ }
2970
+
2971
+ declare const CardVehicleDetail: React$1.FC<CardVehicleDetailProps>;
2972
+
2973
+ interface CargoItem {
2974
+ id: number;
2975
+ commodity: string;
2976
+ cargoType: string;
2977
+ quantity: number | string;
2978
+ industryType: string;
2979
+ cargoCategory: string;
2980
+ }
2981
+ interface VehicleOwner {
2982
+ id: number;
2983
+ cargoOwnerEntityType: MANIFEST_ENTITY_TYPE;
2984
+ cargoOwnerEntity: string;
2985
+ cargoOwnerEntityOther: string;
2986
+ logisticsEntityType: MANIFEST_ENTITY_TYPE;
2987
+ logisticsEntity: string;
2988
+ logisticsEntityOther: string;
2989
+ cargoReceiverEntityType: MANIFEST_ENTITY_TYPE;
2990
+ cargoReceiverEntity: string;
2991
+ cargoReceiverEntityOther: string;
2992
+ cargoWeight: string;
2993
+ estimatedWeight: string;
2994
+ originCity: string;
2995
+ destinationCity: string;
2996
+ cargoItems: CargoItem[];
2997
+ }
2998
+ interface CardVehicleOwnerFormProps {
2999
+ /**
3000
+ * List of owners to display
3001
+ */
3002
+ owners: VehicleOwner[];
3003
+ /**
3004
+ * Whether the vehicle has load/cargo
3005
+ */
3006
+ hasLoad: boolean;
3007
+ /**
3008
+ * React Hook Form control
3009
+ */
3010
+ control: Control<any>;
3011
+ /**
3012
+ * Disable edit
3013
+ */
3014
+ disabled: boolean;
3015
+ /**
3016
+ * React Hook Form watch function
3017
+ */
3018
+ watch: UseFormWatch<any>;
3019
+ /**
3020
+ * React Hook Form setValue function
3021
+ */
3022
+ setValue: UseFormSetValue<any>;
3023
+ /**
3024
+ * React Hook Form getValues function
3025
+ */
3026
+ getValues: UseFormGetValues<any>;
3027
+ /**
3028
+ * Callback to add a new owner
3029
+ */
3030
+ onAddOwner: () => void;
3031
+ /**
3032
+ * Callback to delete an owner
3033
+ */
3034
+ onDeleteOwner: (id: number) => void;
3035
+ /**
3036
+ * Callback to update an owner's data
3037
+ */
3038
+ onUpdateOwner: (id: number, data: Partial<VehicleOwner>) => void;
3039
+ /**
3040
+ * Callback to add a cargo item to an owner
3041
+ */
3042
+ onAddCargo: (ownerId: number) => void;
3043
+ /**
3044
+ * Callback to delete a cargo item
3045
+ */
3046
+ onDeleteCargo: (ownerId: number, cargoId: number) => void;
3047
+ /**
3048
+ * Callback to update cargo quantity
3049
+ */
3050
+ onUpdateCargoQuantity: (ownerId: number, cargoId: number, quantity: number) => void;
3051
+ /**
3052
+ * Options for company owner select inputs
3053
+ */
3054
+ companyOwnerOptions?: SelectOption[];
3055
+ /**
3056
+ * Options for company logistics select inputs
3057
+ */
3058
+ companyLogisticsOptions?: SelectOption[];
3059
+ /**
3060
+ * Options for company receiver select inputs
3061
+ */
3062
+ companyReceiverOptions?: SelectOption[];
3063
+ /**
3064
+ * Options for city select inputs
3065
+ */
3066
+ cityOriginOptions?: SelectOption[];
3067
+ /**
3068
+ * Options for city select inputs
3069
+ */
3070
+ cityDestinationOptions?: SelectOption[];
3071
+ /**
3072
+ * Options for commodity select inputs
3073
+ */
3074
+ commodityOptions?: SelectOption[];
3075
+ /**
3076
+ * Options for load type select inputs (raw, used as fallback)
3077
+ */
3078
+ loadTypeOptions?: (LoadType & {
3079
+ commodityId?: number;
3080
+ })[];
3081
+ loadTypes?: (LoadType & {
3082
+ commodityId?: number;
3083
+ })[];
3084
+ /**
3085
+ * Map of commodityId -> SelectOption[] fetched from backend per cargo commodity.
3086
+ * When provided, each cargo's cargoType dropdown will use the matching entry.
3087
+ */
3088
+ loadTypeOptionsByCommodityId?: Record<string, SelectOption[]>;
3089
+ /**
3090
+ * Options for industry select inputs
3091
+ */
3092
+ industryOptions?: SelectOption[];
3093
+ /**
3094
+ * Options for load category select inputs
3095
+ */
3096
+ loadCategoryOptions?: SelectOption[];
3097
+ /**
3098
+ * Language for labels
3099
+ * @default 'id'
3100
+ */
3101
+ language?: 'id' | 'en';
3102
+ /**
3103
+ * Custom labels override
3104
+ */
3105
+ labels?: Partial<CardVehicleOwnerFormLabels>;
3106
+ }
3107
+ interface CardVehicleOwnerFormLabels {
3108
+ title: string;
3109
+ addOwnerButton: string;
3110
+ ownerInfoTitle: string;
3111
+ entityTypeCompany: string;
3112
+ entityTypeIndividual: string;
3113
+ selectCompanyPlaceholder: string;
3114
+ inputSenderNamePlaceholder: string;
3115
+ estimatedWeightLabel: string;
3116
+ inputNumberPlaceholder: string;
3117
+ originCityLabel: string;
3118
+ destinationCityLabel: string;
3119
+ selectPlaceholder: string;
3120
+ cargoOwnerTitle: string;
3121
+ cargoOwnerCompanyPlaceholder: string;
3122
+ cargoOwnerIndividualPlaceholder: string;
3123
+ otherCompanyHelperText: string;
3124
+ logisticsCompanyTitle: string;
3125
+ logisticsCompanyPlaceholder: string;
3126
+ logisticsIndividualPlaceholder: string;
3127
+ cargoReceiverTitle: string;
3128
+ cargoReceiverCompanyPlaceholder: string;
3129
+ cargoReceiverIndividualPlaceholder: string;
3130
+ totalWeightLabel: string;
3131
+ commentLabel: string;
3132
+ cargoListTitle: string;
3133
+ cargoItemTitle: string;
3134
+ commodityLabel: string;
3135
+ commodityHelperTextPrefix: string;
3136
+ hereLinkText: string;
3137
+ cargoTypeLabel: string;
3138
+ cargoTypeHelperText: string;
3139
+ cargoQuantityLabel: string;
3140
+ priceLabel: string;
3141
+ industryTypeLabel: string;
3142
+ industryTypeHelperText: string;
3143
+ cargoCategoryLabel: string;
3144
+ cargoCategoryHelperTextPrefix: string;
3145
+ deleteCargoButton: string;
3146
+ addCargoButton: string;
3147
+ cargoTypeOptions: {
3148
+ karung: string;
3149
+ kg: string;
3150
+ ton: string;
3151
+ unit: string;
3152
+ };
3153
+ pricePlaceholder: string;
3154
+ currencySymbol: string;
3155
+ deleteOwnerAriaLabel: string;
3156
+ decrementQuantityAriaLabel: string;
3157
+ incrementQuantityAriaLabel: string;
3158
+ }
3159
+
3160
+ declare const CardVehicleOwnerForm: React$1.FC<CardVehicleOwnerFormProps>;
3161
+
3162
+ type ReservationStep = 'manifest' | 'addon' | 'meals' | 'review' | 'payment' | 'eticket' | string;
3163
+ type PaymentStep = 'method' | 'pay' | string;
3164
+ interface CardBookingTicketLabels {
3165
+ bookingDetails: string;
3166
+ routeTitle: string;
3167
+ estimationPrefix: string;
3168
+ totalPriceLabel: string;
3169
+ nextButton: string;
3170
+ cancelButton: string;
3171
+ previousButton: string;
3172
+ viewBookingButton: string;
3173
+ changePaymentButton: string;
3174
+ timezoneLabel: string;
3175
+ currencySymbol: string;
3176
+ cancelDialogTitle: string;
3177
+ cancelDialogBody: string;
3178
+ cancelDialogConfirm: string;
3179
+ cancelDialogDismiss: string;
3180
+ }
3181
+ interface CardBookingTicketProps {
3182
+ /**
3183
+ * Language for labels
3184
+ * @default 'id'
3185
+ */
3186
+ language?: Language;
3187
+ /**
3188
+ * Custom labels override
3189
+ */
3190
+ labels?: Partial<CardBookingTicketLabels>;
3191
+ /**
3192
+ * Provider Logo
3193
+ */
3194
+ providerLogo?: string;
3195
+ /**
3196
+ * Ship Name (e.g. KMP PORTLINK)
3197
+ */
3198
+ shipName?: string;
3199
+ /**
3200
+ * Service Title (e.g. Kendaraan Roda Dua • Mobil Penumpang)
3201
+ */
3202
+ serviceTitle?: string;
3203
+ /**
3204
+ * Ship Type (e.g. Executive, Reguler)
3205
+ */
3206
+ shipType?: string;
3207
+ /**
3208
+ * Badge color for ship type
3209
+ */
3210
+ shipTypeColor?: string;
3211
+ /**
3212
+ * Departure Day (e.g. Kamis, 25 Sep)
3213
+ */
3214
+ departureDay?: string;
3215
+ /**
3216
+ * Departure Time (e.g. 18:15)
3217
+ */
3218
+ departureTime?: string;
3219
+ /**
3220
+ * Departure Location (e.g. Merak, Banten)
3221
+ */
3222
+ departureLocation?: string;
3223
+ /**
3224
+ * Arrival Day (e.g. Jumat, 26 Sep)
3225
+ */
3226
+ arrivalDay?: string;
3227
+ /**
3228
+ * Arrival Time (e.g. 19:25)
3229
+ */
3230
+ arrivalTime?: string;
3231
+ /**
3232
+ * Arrival Location (e.g. Bakauheni, Lampung)
3233
+ */
3234
+ arrivalLocation?: string;
3235
+ /**
3236
+ * Duration string (e.g. 1 jam 10 menit)
3237
+ */
3238
+ duration?: number;
3239
+ /**
3240
+ * Disable Next button
3241
+ */
3242
+ disableNextButton?: boolean;
3243
+ /**
3244
+ * Total price formatted string (e.g. 50.000)
3245
+ */
3246
+ totalPrice: string;
3247
+ /**
3248
+ * Current Reservation Step
3249
+ */
3250
+ reservationStep: ReservationStep;
3251
+ /**
3252
+ * Current Payment Step
3253
+ */
3254
+ paymentStep: PaymentStep;
3255
+ /**
3256
+ * Callback for price detail click
3257
+ */
3258
+ onPriceDetailClick: () => void;
3259
+ onCancel: () => void;
3260
+ /**
3261
+ * Callback for Next button (Lanjutkan / Lihat Pemesanan)
3262
+ */
3263
+ onNext: () => void;
3264
+ /**
3265
+ * Callback for Previous button (Sebelumnya / Ubah Metode Pembayaran)
3266
+ */
3267
+ onPrevious: () => void;
3268
+ /**
3269
+ * Whether to show or hide the card (though usually handled by parent)
3270
+ */
3271
+ className?: string;
3272
+ }
3273
+
3274
+ declare const CardBookingTicket: React$1.FC<CardBookingTicketProps>;
3275
+
3276
+ interface FAQItem {
3277
+ id: number;
3278
+ question: string;
3279
+ answer: string;
3280
+ }
3281
+ interface CardFAQLabels {
3282
+ title: string;
3283
+ }
3284
+ interface CardFAQProps {
3285
+ /**
3286
+ * Language for labels
3287
+ * @default 'id'
3288
+ */
3289
+ language?: Language;
3290
+ /**
3291
+ * Custom labels override
3292
+ */
3293
+ labels?: Partial<CardFAQLabels>;
3294
+ /**
3295
+ * List of FAQ items
3296
+ * If not provided, default items will be shown
3297
+ */
3298
+ items?: FAQItem[];
3299
+ /**
3300
+ * Optional class name for the container
3301
+ */
3302
+ className?: string;
3303
+ }
3304
+
3305
+ declare const CardFAQ: React$1.FC<CardFAQProps>;
3306
+
3307
+ interface AddonFooterData {
3308
+ priceLabel: string;
3309
+ price: number;
3310
+ priceUnit?: string;
3311
+ actionLabel?: string;
3312
+ onActionClick?: () => void;
3313
+ actionType: 'detail-link' | 'primary-button';
3314
+ }
3315
+ interface AssuranceItem {
3316
+ label: string;
3317
+ priceDetails: string;
3318
+ totalPrice: number;
3319
+ }
3320
+ interface AssuranceData {
3321
+ totalPassenger: number;
3322
+ items: AssuranceItem[];
3323
+ totalPrice: number;
3324
+ }
3325
+ interface MealItem$1 {
3326
+ id: number;
3327
+ name: string;
3328
+ image: string;
3329
+ description: string;
3330
+ price: number;
3331
+ quantity: number;
3332
+ }
3333
+ interface MealData {
3334
+ items: MealItem$1[];
3335
+ onUpdateQuantity: (id: number, delta: number) => void;
3336
+ onDelete: (id: number) => void;
3337
+ }
3338
+ interface CardAddonLabels {
3339
+ viewDetail: string;
3340
+ totalPrice: string;
3341
+ passengerInsurance: string;
3342
+ removeOrder: string;
3343
+ currencySymbol: string;
3344
+ }
3345
+ interface CardAddonProps {
3346
+ /**
3347
+ * Language for labels
3348
+ * @default 'id'
3349
+ */
3350
+ language?: Language;
3351
+ /**
3352
+ * Custom labels override
3353
+ */
3354
+ labels?: Partial<CardAddonLabels>;
3355
+ /**
3356
+ * Main title of the card header
3357
+ */
3358
+ title: string;
3359
+ /**
3360
+ * Title of the content item
3361
+ */
3362
+ itemTitle: string;
3363
+ /**
3364
+ * Subtitle of the content item
3365
+ */
3366
+ itemSubtitle: string;
3367
+ /**
3368
+ * URL of the icon image
3369
+ */
3370
+ iconUrl?: string;
3371
+ /**
3372
+ * Description text displayed below the item content
3373
+ */
3374
+ description?: string;
3375
+ /**
3376
+ * Action element displayed on the right side of the item content (e.g. Switch)
3377
+ */
3378
+ rightAction?: React$1.ReactNode;
3379
+ /**
3380
+ * Data driven footer configuration
3381
+ */
3382
+ footerData?: AddonFooterData;
3383
+ /**
3384
+ * Data for Assurance breakdown view
3385
+ */
3386
+ assuranceData?: AssuranceData;
3387
+ /**
3388
+ * Data for Meal list view
3389
+ */
3390
+ mealData?: MealData;
3391
+ /**
3392
+ * Optional custom children (fallback)
3393
+ */
3394
+ children?: React$1.ReactNode;
3395
+ /**
3396
+ * Optional class name
3397
+ */
3398
+ className?: string;
3399
+ }
3400
+
3401
+ declare const CardAddon: React$1.FC<CardAddonProps>;
3402
+
3403
+ interface CardMealCatalogLabels {
3404
+ addButton: string;
3405
+ currencySymbol: string;
3406
+ decrementAriaLabel: string;
3407
+ incrementAriaLabel: string;
3408
+ searchPlaceholder: string;
3409
+ }
3410
+ interface MealItem {
3411
+ id: number;
3412
+ name: string;
3413
+ description?: string;
3414
+ price: number;
3415
+ image: string;
3416
+ quantity: number;
3417
+ [key: string]: any;
3418
+ }
3419
+ interface MealCategory {
3420
+ category: string;
3421
+ list: MealItem[];
3422
+ }
3423
+ interface CardMealCatalogProps {
3424
+ /**
3425
+ * Language for labels
3426
+ * @default 'id'
3427
+ */
3428
+ language?: Language;
3429
+ /**
3430
+ * Custom labels override
3431
+ */
3432
+ labels?: Partial<CardMealCatalogLabels>;
3433
+ /**
3434
+ * Configuration for the top banner
3435
+ */
3436
+ banner: {
3437
+ imageUrl: string;
3438
+ title: string;
3439
+ subtitle: string;
3440
+ };
3441
+ /**
3442
+ * Text displayed in the disclaimer box
3443
+ */
3444
+ disclaimerText: string;
3445
+ /**
3446
+ * List of meal categories and their items
3447
+ */
3448
+ categories: MealCategory[];
3449
+ /**
3450
+ * Callback when "Tambah" button is clicked
3451
+ */
3452
+ onAdd: (item: MealItem) => void;
3453
+ /**
3454
+ * Callback when quantity is updated (+ or -)
3455
+ */
3456
+ onUpdateQuantity: (itemId: number, delta: number) => void;
3457
+ /**
3458
+ * Optional class name
3459
+ */
3460
+ className?: string;
3461
+ /**
3462
+ * Current search value
3463
+ */
3464
+ searchValue?: string;
3465
+ /**
3466
+ * Callback when search value changes
3467
+ */
3468
+ onSearchChange?: (value: string) => void;
3469
+ }
3470
+
3471
+ declare const CardMealCatalog: React$1.FC<CardMealCatalogProps>;
3472
+
3473
+ interface ReviewItem {
3474
+ label: React$1.ReactNode;
3475
+ value: React$1.ReactNode;
3476
+ /**
3477
+ * Optional class name for the row container
3478
+ */
3479
+ className?: string;
3480
+ /**
3481
+ * Optional class name for the label
3482
+ */
3483
+ labelClassName?: string;
3484
+ /**
3485
+ * Optional class name for the value
3486
+ */
3487
+ valueClassName?: string;
3488
+ }
3489
+ interface CardReviewLabels {
3490
+ defaultTitle: string;
3491
+ }
3492
+ interface CardReviewProps {
3493
+ /**
3494
+ * Language for labels
3495
+ * @default 'id'
3496
+ */
3497
+ language?: Language;
3498
+ /**
3499
+ * Custom labels override
3500
+ */
3501
+ labels?: Partial<CardReviewLabels>;
3502
+ /**
3503
+ * Title of the section (e.g. "Detail Pemesan")
3504
+ */
3505
+ title: string;
3506
+ /**
3507
+ * Optional items to display as list rows
3508
+ */
3509
+ items?: ReviewItem[];
3510
+ /**
3511
+ * Custom children content (will be rendered after items if both exist)
3512
+ */
3513
+ children?: React$1.ReactNode;
3514
+ /**
3515
+ * Optional class name for the card
3516
+ */
3517
+ className?: string;
3518
+ /**
3519
+ * Optional action in the header (e.g. Ubah button) - though not present in current designs, good for extensibility
3520
+ */
3521
+ headerAction?: React$1.ReactNode;
3522
+ }
3523
+
3524
+ declare const CardReview: React$1.FC<CardReviewProps>;
3525
+
3526
+ interface ReviewPassengerItem {
3527
+ id: string | number;
3528
+ name: string;
3529
+ identityNumber: string;
3530
+ ageLabel: string;
3531
+ ageValue: string;
3532
+ ticketClass: string;
3533
+ serviceClass?: string;
3534
+ }
3535
+ interface CardReviewPassengerLabels {
3536
+ title: string;
3537
+ idNumber: string;
3538
+ }
3539
+ interface CardReviewPassengerProps {
3540
+ /**
3541
+ * Language for labels
3542
+ * @default 'id'
3543
+ */
3544
+ language?: Language;
3545
+ /**
3546
+ * Custom labels override
3547
+ */
3548
+ labels?: Partial<CardReviewPassengerLabels>;
3549
+ /**
3550
+ * Title of the card section, defaults to "Penumpang"
3551
+ */
3552
+ title?: string;
3553
+ /**
3554
+ * List of passengers to display
3555
+ */
3556
+ passengers: ReviewPassengerItem[];
3557
+ /**
3558
+ * Optional class name
3559
+ */
3560
+ className?: string;
3561
+ }
3562
+
3563
+ declare const CardReviewPassenger: React$1.FC<CardReviewPassengerProps>;
3564
+
3565
+ interface PriceItem {
3566
+ name: string;
3567
+ price: number;
3568
+ /**
3569
+ * If true, the value will be displayed with a minus sign or specific style (e.g. discount)
3570
+ */
3571
+ isRedeem?: boolean;
3572
+ /**
3573
+ * Variant for the text color
3574
+ */
3575
+ variant?: 'default' | 'danger' | 'muted';
3576
+ /**
3577
+ * Optional description helper text (e.g. for tax explanation)
3578
+ */
3579
+ description?: string;
3580
+ }
3581
+ interface PriceSection {
3582
+ category?: string;
3583
+ title?: string;
3584
+ detail: PriceItem[];
3585
+ }
3586
+ interface CardPriceDetailsLabels {
3587
+ defaultTitle: string;
3588
+ totalPayment: string;
3589
+ bookingTerms: string[];
3590
+ agreementInfo: string;
3591
+ agreementLinkFerizy: string;
3592
+ agreementCovidInfo: string;
3593
+ agreementCovidLink: string;
3594
+ agreementFinal: string;
3595
+ currencyPrefix: string;
3596
+ }
3597
+ interface CardPriceDetailsProps {
3598
+ /**
3599
+ * Language for labels (Indonesian or English)
3600
+ * @default 'id'
3601
+ */
3602
+ language?: Language;
3603
+ /**
3604
+ * Title of the card, defaults to "Rincian Harga"
3605
+ */
3606
+ title?: string;
3607
+ /**
3608
+ * Sections of price details
3609
+ */
3610
+ sections: PriceSection[];
3611
+ /**
3612
+ * Total payment details
3613
+ */
3614
+ total: number;
3615
+ /**
3616
+ * Custom labels override (optional)
3617
+ * If not provided, default labels based on language will be used
3618
+ */
3619
+ labels?: Partial<CardPriceDetailsLabels>;
3620
+ }
3621
+
3622
+ declare const CardPriceDetails: React$1.FC<CardPriceDetailsProps>;
3623
+
3624
+ interface PaymentOption {
3625
+ label: string;
3626
+ value: string;
3627
+ image: string;
3628
+ disabled?: boolean;
3629
+ }
3630
+ interface PaymentMethodCategory {
3631
+ title: string;
3632
+ value: string;
3633
+ options: PaymentOption[];
3634
+ }
3635
+ interface CardPaymentMethodListLabels {
3636
+ selectAriaLabel: string;
3637
+ }
3638
+ interface CardPaymentMethodListProps {
3639
+ /**
3640
+ * Language for labels
3641
+ * @default 'id'
3642
+ */
3643
+ language?: Language;
3644
+ /**
3645
+ * Custom labels override
3646
+ */
3647
+ labels?: Partial<CardPaymentMethodListLabels>;
3648
+ methods: PaymentMethodCategory[];
3649
+ selectedValue?: string;
3650
+ onSelect: (value: string) => void;
3651
+ }
3652
+
3653
+ declare const CardPaymentMethodList: React$1.FC<CardPaymentMethodListProps>;
3654
+
3655
+ interface PaymentGuideStep {
3656
+ title: string;
3657
+ value: string;
3658
+ steps: string[];
3659
+ }
3660
+ interface CardPaymentGuideLabels {
3661
+ title: string;
3662
+ }
3663
+ interface CardPaymentGuideProps {
3664
+ /**
3665
+ * Language for labels
3666
+ * @default 'id'
3667
+ */
3668
+ language?: Language;
3669
+ /**
3670
+ * Custom labels override
3671
+ */
3672
+ labels?: Partial<CardPaymentGuideLabels>;
3673
+ title?: string;
3674
+ guides: PaymentGuideStep[];
3675
+ className?: string;
3676
+ }
3677
+
3678
+ declare const CardPaymentGuide: React$1.FC<CardPaymentGuideProps>;
3679
+
3680
+ interface BankInfo {
3681
+ name: string;
3682
+ icon: string;
3683
+ }
3684
+ interface CardPaymentInfoLabels {
3685
+ expiryPrefix: string;
3686
+ copyCodeButton: string;
3687
+ totalPayment: string;
3688
+ checkStatusInfo: string;
3689
+ checkStatusButton: string;
3690
+ currencySymbol: string;
3691
+ changePayment: string;
3692
+ }
3693
+ interface CardPaymentInfoProps {
3694
+ /**
3695
+ * Language for labels
3696
+ * @default 'id'
3697
+ */
3698
+ language?: Language;
3699
+ /**
3700
+ * Custom labels override
3701
+ */
3702
+ labels?: Partial<CardPaymentInfoLabels>;
3703
+ expiryDate: string;
3704
+ bank: BankInfo;
3705
+ virtualAccount: string;
3706
+ totalAmount: number;
3707
+ guides: PaymentGuideStep[];
3708
+ onCopyVA?: () => void;
3709
+ onCheckStatus?: () => void;
3710
+ onChangePayment?: () => void;
3711
+ }
3712
+
3713
+ declare const CardPaymentInfo: React$1.FC<CardPaymentInfoProps>;
3714
+
3715
+ interface CardStatusOrderLabels {
3716
+ detailTitle: string;
3717
+ statusLabel: string;
3718
+ bookingCodeLabel: string;
3719
+ scheduleLabel: string;
3720
+ routeLabel: string;
3721
+ userTypeLabel: string;
3722
+ serviceLabel: string;
3723
+ viewTicketButton: string;
3724
+ defaultStatus: string;
3725
+ defaultTitle: string;
3726
+ defaultDescription: string;
3727
+ illustrationAlt: string;
3728
+ }
3729
+ interface CardStatusOrderProps {
3730
+ /**
3731
+ * Language for labels
3732
+ * @default 'id'
3733
+ */
3734
+ language?: Language;
3735
+ /**
3736
+ * Custom labels override
3737
+ */
3738
+ labels?: Partial<CardStatusOrderLabels>;
3739
+ bookingCode: string;
3740
+ departureDate: string;
3741
+ departureTime: string;
3742
+ arrivalDate: string;
3743
+ arrivalTime: string;
3744
+ origin: string;
3745
+ destination: string;
3746
+ duration?: string;
3747
+ vehicleClass: string;
3748
+ serviceType: string;
3749
+ vehicleNumber?: string;
3750
+ shipType?: string;
3751
+ statusLabel?: string;
3752
+ statusIcon?: JSX.Element;
3753
+ statusColor?: 'success' | 'danger' | 'warning' | 'brand' | 'important' | 'informative' | 'severe' | 'subtle';
3754
+ illustrationUrl?: string;
3755
+ title?: string;
3756
+ description?: string;
3757
+ onClickViewTicket?: () => void;
3758
+ isLoading?: boolean;
3759
+ className?: string;
3760
+ }
3761
+
3762
+ declare const CardStatusOrder: React$1.FC<CardStatusOrderProps>;
3763
+
3764
+ interface ModalPriceDetailLabels {
3765
+ title: string;
3766
+ addonHeader: string;
3767
+ subTotalLabel: string;
3768
+ totalTagihanLabel: string;
3769
+ ppnLabel: string;
3770
+ ppnNote: string;
3771
+ grandTotalLabel: string;
3772
+ currencyPrefix: string;
3773
+ currencyCode: string;
3774
+ closeAriaLabel: string;
3775
+ }
3776
+ interface PriceDetailItem {
3777
+ key: string;
3778
+ label: string | React.ReactNode;
3779
+ price: number;
3780
+ badge?: string;
3781
+ list?: PriceDetailItem[];
3782
+ }
3783
+ interface ModalPriceDetailProps {
3784
+ isOpen: boolean;
3785
+ onOpenChange: (open: boolean) => void;
3786
+ detailItems: PriceDetailItem[];
3787
+ addonItems: PriceDetailItem[];
3788
+ subTotal: number;
3789
+ taxAmount: number;
3790
+ grandTotal: number;
3791
+ /**
3792
+ * Language for labels
3793
+ * @default 'id'
3794
+ */
3795
+ language?: Language;
3796
+ /**
3797
+ * Custom labels override
3798
+ */
3799
+ labels?: Partial<ModalPriceDetailLabels>;
3800
+ }
3801
+
3802
+ declare const ModalPriceDetail: React$1.FC<ModalPriceDetailProps>;
3803
+
3804
+ interface FileUploadLabels {
3805
+ placeholder: string;
3806
+ maxSizeWarning: string;
3807
+ sizeLabel: string;
3808
+ preview: string;
3809
+ requiredError: string;
3810
+ downloadTemplateDocument: string;
3811
+ }
3812
+ interface FileUploadProps<T extends FieldValues = FieldValues> {
3813
+ name: Path<T>;
3814
+ control: Control<any>;
3815
+ label: string;
3816
+ required?: boolean;
3817
+ accept?: string;
3818
+ maxSize?: number;
3819
+ placeholder?: string;
3820
+ disabled?: boolean;
3821
+ language?: Language;
3822
+ labels?: Partial<FileUploadLabels>;
3823
+ /**
3824
+ * URL or path for the PDF icon image.
3825
+ * This should be provided by the consumer app.
3826
+ * Example: '/assets/images/icons/pdficon.svg'
3827
+ */
3828
+ pdfIcon?: string;
3829
+ downloadTemplateDocument?: boolean;
3830
+ /**
3831
+ * Optional info label text to display with an info icon next to the label.
3832
+ * When not provided, no info label is displayed.
3833
+ * Example: 'Maximum file size is 10MB'
3834
+ */
3835
+ infoLabel?: string;
3836
+ }
3837
+
3838
+ declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
3839
+
3840
+ interface BadgeConfig {
3841
+ code: string;
3842
+ color: string;
3843
+ icon: string;
3844
+ }
3845
+ /**
3846
+ * Get badge configuration based on ticket class
3847
+ * @param ticketClass - The ticket class (ECONOMY, BUSINESS, EXECUTIVE)
3848
+ * @returns Badge configuration with color and icon path
3849
+ */
3850
+ declare const getBadgeConfig: (ticketClass?: string) => BadgeConfig;
3851
+
3852
+ /**
3853
+ * Menghitung usia (tahun dan bulan) berdasarkan tanggal lahir
3854
+ * @param {string | Date} birthDate - Tanggal lahir
3855
+ * @returns {{ years: number, months: number }} Object berisi years dan months
3856
+ */
3857
+ declare const calculateAge: (birthDate: string | Date) => {
3858
+ years: number;
3859
+ months: number;
3860
+ };
3861
+
3862
+ declare function hexToRgba(hex: string, alpha?: number): string;
3863
+
3864
+ interface ProfileMenuTab {
3865
+ label: string;
3866
+ value: string;
3867
+ icon: string;
3868
+ href?: string;
3869
+ }
3870
+ interface ProfileMenuSection {
3871
+ sectionLabel: string;
3872
+ tabs: ProfileMenuTab[];
3873
+ }
3874
+ interface CardProfileMenuLabels {
3875
+ }
3876
+ interface CardProfileMenuProps {
3877
+ /**
3878
+ * Language for labels (Indonesian or English)
3879
+ * @default 'id'
3880
+ */
3881
+ language?: Language;
3882
+ /**
3883
+ * Custom labels override (optional)
3884
+ */
3885
+ labels?: Partial<CardProfileMenuLabels>;
3886
+ /**
3887
+ * List of menu sections with tabs
3888
+ */
3889
+ sections: ProfileMenuSection[];
3890
+ /**
3891
+ * Currently selected tab value
3892
+ */
3893
+ selectedValue?: string;
3894
+ /**
3895
+ * Callback when a tab is selected
3896
+ */
3897
+ onTabSelect: (value: string) => void;
3898
+ }
3899
+
3900
+ declare const CardProfileMenu: React$1.FC<CardProfileMenuProps>;
3901
+
3902
+ interface ModalPreviewImageProps {
3903
+ /** Whether the modal is open */
3904
+ open: boolean;
3905
+ /** Callback when the modal open state changes */
3906
+ onOpenChange: (open: boolean) => void;
3907
+ /** The image URL to preview */
3908
+ imageUrl: string | null;
3909
+ /** Alt text for the preview image */
3910
+ alt?: string;
3911
+ }
3912
+
3913
+ declare const ModalPreviewImage: React$1.FC<ModalPreviewImageProps>;
3914
+
3915
+ interface ModalListMenuServiceProps {
3916
+ open?: boolean;
3917
+ onClose?: () => void;
3918
+ title?: string;
3919
+ menuItems?: CardServiceMenuItem[];
3920
+ onItemClick?: (item: CardServiceMenuItem) => void;
3921
+ showDescriptions?: boolean;
3922
+ }
3923
+
3924
+ declare const ModalListMenuService: React$1.FC<ModalListMenuServiceProps>;
3925
+
3926
+ export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, type IdentityType, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };