@planetaexo/design-system 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2241,21 +2241,18 @@ function AdventureSection({
2241
2241
  onRemoveTraveller,
2242
2242
  onAddSuggestedTraveller,
2243
2243
  onAddTraveller,
2244
- onUnassignFromAdventure
2244
+ onUnassignFromAdventure,
2245
+ hasSubmitAddTraveller,
2246
+ hasSubmitEditTraveller,
2247
+ hasConfirmRemoveTraveller,
2248
+ onRequestOpenAddModal,
2249
+ onRequestOpenEditModal,
2250
+ onRequestOpenDeleteModal,
2251
+ cannotRemoveLastTravellerLabel
2245
2252
  }) {
2246
2253
  var _a, _b, _c, _d;
2247
2254
  const [detailsOpen, setDetailsOpen] = React22.useState(false);
2248
- const [addModalOpen, setAddModalOpen] = React22.useState(false);
2249
- const [newTraveller, setNewTraveller] = React22.useState({
2250
- firstName: "",
2251
- lastName: "",
2252
- passport: "",
2253
- type: "adult",
2254
- email: "",
2255
- dateOfBirth: "",
2256
- phone: ""
2257
- });
2258
- const setField = (k, v) => setNewTraveller((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
2255
+ const [itineraryOpen, setItineraryOpen] = React22.useState(true);
2259
2256
  const handleCopyUrl = (url) => {
2260
2257
  navigator.clipboard.writeText(url);
2261
2258
  };
@@ -2321,8 +2318,31 @@ function AdventureSection({
2321
2318
  )) })
2322
2319
  ] }),
2323
2320
  (adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-2", children: [
2324
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
2325
- adventure.detailsSlot ? /* @__PURE__ */ jsx(
2321
+ /* @__PURE__ */ jsxs(
2322
+ "button",
2323
+ {
2324
+ type: "button",
2325
+ onClick: () => setItineraryOpen((v) => !v),
2326
+ className: cn(
2327
+ "group flex w-full items-center justify-between gap-2 text-left",
2328
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded"
2329
+ ),
2330
+ "aria-expanded": itineraryOpen,
2331
+ children: [
2332
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest group-hover:text-foreground transition-colors", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
2333
+ /* @__PURE__ */ jsx(
2334
+ ChevronDownIcon,
2335
+ {
2336
+ className: cn(
2337
+ "w-4 h-4 text-muted-foreground shrink-0 transition-transform",
2338
+ itineraryOpen && "rotate-180"
2339
+ )
2340
+ }
2341
+ )
2342
+ ]
2343
+ }
2344
+ ),
2345
+ itineraryOpen && (adventure.detailsSlot ? /* @__PURE__ */ jsx(
2326
2346
  "div",
2327
2347
  {
2328
2348
  className: cn(
@@ -2339,7 +2359,7 @@ function AdventureSection({
2339
2359
  ),
2340
2360
  children: adventure.detailsSlot
2341
2361
  }
2342
- ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
2362
+ ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description }))
2343
2363
  ] }),
2344
2364
  detailsOpen && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-5 bg-muted/10", children: [
2345
2365
  adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -2413,11 +2433,17 @@ function AdventureSection({
2413
2433
  ]
2414
2434
  }
2415
2435
  ),
2416
- /* @__PURE__ */ jsxs(
2436
+ (onAddTraveller || hasSubmitAddTraveller) && /* @__PURE__ */ jsxs(
2417
2437
  "button",
2418
2438
  {
2419
2439
  type: "button",
2420
- onClick: () => onAddTraveller ? onAddTraveller(adventure.id) : setAddModalOpen(true),
2440
+ onClick: () => {
2441
+ if (onAddTraveller) {
2442
+ onAddTraveller(adventure.id);
2443
+ } else {
2444
+ onRequestOpenAddModal == null ? void 0 : onRequestOpenAddModal(adventure.id);
2445
+ }
2446
+ },
2421
2447
  className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-primary hover:border-primary hover:bg-primary/5 transition-colors",
2422
2448
  children: [
2423
2449
  /* @__PURE__ */ jsx(PlusIcon, { className: "w-3 h-3" }),
@@ -2428,94 +2454,132 @@ function AdventureSection({
2428
2454
  )
2429
2455
  ] })
2430
2456
  ] }),
2431
- /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => /* @__PURE__ */ jsxs(
2432
- "div",
2433
- {
2434
- className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
2435
- children: [
2436
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2437
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
2438
- /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
2439
- t.firstName,
2440
- " ",
2441
- t.lastName
2457
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => {
2458
+ const canRemoveTraveller = adventure.travellers.length > 1;
2459
+ const disabledRemoveTitle = canRemoveTraveller ? void 0 : cannotRemoveLastTravellerLabel != null ? cannotRemoveLastTravellerLabel : "Cannot remove last traveller";
2460
+ return /* @__PURE__ */ jsxs(
2461
+ "div",
2462
+ {
2463
+ className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
2464
+ children: [
2465
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2466
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
2467
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
2468
+ t.firstName,
2469
+ " ",
2470
+ t.lastName
2471
+ ] }),
2472
+ t.isChild && /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold font-heading rounded-full px-2 py-0.5 bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400 shrink-0", children: "Child" })
2442
2473
  ] }),
2443
- t.isChild && /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold font-heading rounded-full px-2 py-0.5 bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400 shrink-0", children: "Child" })
2444
- ] }),
2445
- t.formUrl && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2446
- /* @__PURE__ */ jsxs(
2447
- "a",
2448
- {
2449
- href: t.formUrl,
2450
- target: "_blank",
2451
- rel: "noopener noreferrer",
2452
- className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
2453
- children: [
2454
- /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "w-3 h-3" }),
2455
- "Open"
2456
- ]
2457
- }
2458
- ),
2459
- /* @__PURE__ */ jsx(
2460
- "button",
2461
- {
2462
- type: "button",
2463
- onClick: () => handleCopyUrl(t.formUrl),
2464
- className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
2465
- "aria-label": "Copy form URL",
2466
- children: /* @__PURE__ */ jsx(CopyIcon, { className: "w-3 h-3" })
2467
- }
2468
- )
2469
- ] })
2470
- ] }) }),
2471
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
2472
- /* @__PURE__ */ jsx(
2473
- "span",
2474
- {
2475
- className: cn(
2476
- "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
2477
- t.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
2474
+ t.formUrl && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2475
+ /* @__PURE__ */ jsxs(
2476
+ "a",
2477
+ {
2478
+ href: t.formUrl,
2479
+ target: "_blank",
2480
+ rel: "noopener noreferrer",
2481
+ className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
2482
+ children: [
2483
+ /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "w-3 h-3" }),
2484
+ "Open"
2485
+ ]
2486
+ }
2478
2487
  ),
2479
- children: t.status
2480
- }
2481
- ),
2482
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
2483
- onEditTraveller && /* @__PURE__ */ jsx(
2484
- "button",
2485
- {
2486
- type: "button",
2487
- onClick: () => onEditTraveller(adventure.id, t.id),
2488
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",
2489
- "aria-label": `Edit ${t.firstName}`,
2490
- children: /* @__PURE__ */ jsx(PencilIcon, { className: "w-3.5 h-3.5" })
2491
- }
2492
- ),
2493
- onRemoveTraveller && /* @__PURE__ */ jsx(
2494
- "button",
2488
+ /* @__PURE__ */ jsx(
2489
+ "button",
2490
+ {
2491
+ type: "button",
2492
+ onClick: () => handleCopyUrl(t.formUrl),
2493
+ className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
2494
+ "aria-label": "Copy form URL",
2495
+ children: /* @__PURE__ */ jsx(CopyIcon, { className: "w-3 h-3" })
2496
+ }
2497
+ )
2498
+ ] })
2499
+ ] }) }),
2500
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
2501
+ /* @__PURE__ */ jsx(
2502
+ "span",
2495
2503
  {
2496
- type: "button",
2497
- onClick: () => onRemoveTraveller(adventure.id, t.id),
2498
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
2499
- "aria-label": `Delete ${t.firstName}`,
2500
- children: /* @__PURE__ */ jsx(Trash2Icon, { className: "w-3.5 h-3.5" })
2504
+ className: cn(
2505
+ "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
2506
+ t.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
2507
+ ),
2508
+ children: t.status
2501
2509
  }
2502
2510
  ),
2503
- (onUnassignFromAdventure || onRemoveTraveller) && /* @__PURE__ */ jsx(
2504
- "button",
2505
- {
2506
- type: "button",
2507
- onClick: () => onUnassignFromAdventure ? onUnassignFromAdventure(adventure.id, t.id) : onRemoveTraveller(adventure.id, t.id),
2508
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-amber-500 hover:bg-amber-500/10 transition-colors",
2509
- "aria-label": `Remove ${t.firstName} from adventure`,
2510
- children: /* @__PURE__ */ jsx(UserMinusIcon, { className: "w-3.5 h-3.5" })
2511
- }
2512
- )
2511
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
2512
+ (onEditTraveller || hasSubmitEditTraveller) && /* @__PURE__ */ jsx(
2513
+ "button",
2514
+ {
2515
+ type: "button",
2516
+ onClick: () => {
2517
+ if (onEditTraveller) {
2518
+ onEditTraveller(adventure.id, t.id);
2519
+ } else {
2520
+ onRequestOpenEditModal == null ? void 0 : onRequestOpenEditModal(adventure.id, t);
2521
+ }
2522
+ },
2523
+ className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",
2524
+ "aria-label": `Edit ${t.firstName}`,
2525
+ children: /* @__PURE__ */ jsx(PencilIcon, { className: "w-3.5 h-3.5" })
2526
+ }
2527
+ ),
2528
+ (onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2529
+ "button",
2530
+ {
2531
+ type: "button",
2532
+ onClick: () => {
2533
+ if (!canRemoveTraveller) return;
2534
+ if (onRemoveTraveller) {
2535
+ onRemoveTraveller(adventure.id, t.id);
2536
+ } else {
2537
+ onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2538
+ }
2539
+ },
2540
+ disabled: !canRemoveTraveller,
2541
+ title: disabledRemoveTitle,
2542
+ "aria-disabled": !canRemoveTraveller,
2543
+ className: cn(
2544
+ "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
2545
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:text-muted-foreground disabled:hover:bg-transparent"
2546
+ ),
2547
+ "aria-label": `Delete ${t.firstName}`,
2548
+ children: /* @__PURE__ */ jsx(Trash2Icon, { className: "w-3.5 h-3.5" })
2549
+ }
2550
+ ),
2551
+ (onUnassignFromAdventure || onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2552
+ "button",
2553
+ {
2554
+ type: "button",
2555
+ onClick: () => {
2556
+ if (!canRemoveTraveller) return;
2557
+ if (onUnassignFromAdventure) {
2558
+ onUnassignFromAdventure(adventure.id, t.id);
2559
+ } else if (onRemoveTraveller) {
2560
+ onRemoveTraveller(adventure.id, t.id);
2561
+ } else {
2562
+ onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2563
+ }
2564
+ },
2565
+ disabled: !canRemoveTraveller,
2566
+ title: disabledRemoveTitle,
2567
+ "aria-disabled": !canRemoveTraveller,
2568
+ className: cn(
2569
+ "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-amber-500 hover:bg-amber-500/10 transition-colors",
2570
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:text-muted-foreground disabled:hover:bg-transparent"
2571
+ ),
2572
+ "aria-label": `Remove ${t.firstName} from adventure`,
2573
+ children: /* @__PURE__ */ jsx(UserMinusIcon, { className: "w-3.5 h-3.5" })
2574
+ }
2575
+ )
2576
+ ] })
2513
2577
  ] })
2514
- ] })
2515
- ]
2516
- },
2517
- t.id
2518
- )) }),
2578
+ ]
2579
+ },
2580
+ t.id
2581
+ );
2582
+ }) }),
2519
2583
  adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
2520
2584
  /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
2521
2585
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxs(
@@ -2561,111 +2625,303 @@ function AdventureSection({
2561
2625
  ] })
2562
2626
  ] });
2563
2627
  })()
2564
- ] }),
2565
- /* @__PURE__ */ jsx(Dialog, { open: addModalOpen, onOpenChange: setAddModalOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-md", children: [
2566
- /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "font-heading text-xl", children: "Add traveller" }) }),
2567
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 pt-2", children: [
2568
- /* @__PURE__ */ jsx(
2569
- FloatingInput,
2570
- {
2571
- label: "First name",
2572
- required: true,
2573
- value: newTraveller.firstName,
2574
- onChange: (e) => setField("firstName", e.target.value)
2575
- }
2576
- ),
2577
- /* @__PURE__ */ jsx(
2578
- FloatingInput,
2579
- {
2580
- label: "Last name",
2581
- required: true,
2582
- value: newTraveller.lastName,
2583
- onChange: (e) => setField("lastName", e.target.value)
2584
- }
2585
- ),
2586
- /* @__PURE__ */ jsx(
2587
- FloatingInput,
2588
- {
2589
- label: "Passport (optional)",
2590
- value: newTraveller.passport,
2591
- onChange: (e) => setField("passport", e.target.value)
2592
- }
2593
- ),
2594
- /* @__PURE__ */ jsxs(
2595
- FloatingSelect,
2596
- {
2597
- label: "Type (adult/child/senior)",
2598
- value: newTraveller.type,
2599
- onChange: (e) => setField("type", e.target.value),
2600
- children: [
2601
- /* @__PURE__ */ jsx("option", { value: "adult", children: "Adult" }),
2602
- /* @__PURE__ */ jsx("option", { value: "child", children: "Child" }),
2603
- /* @__PURE__ */ jsx("option", { value: "senior", children: "Senior" })
2604
- ]
2605
- }
2606
- ),
2607
- /* @__PURE__ */ jsx(
2608
- FloatingInput,
2609
- {
2610
- label: "Email",
2611
- type: "email",
2612
- required: true,
2613
- value: newTraveller.email,
2614
- onChange: (e) => setField("email", e.target.value)
2615
- }
2616
- ),
2617
- /* @__PURE__ */ jsx(
2618
- FloatingInput,
2619
- {
2620
- label: "Date of birth",
2621
- type: "date",
2622
- value: newTraveller.dateOfBirth,
2623
- onChange: (e) => setField("dateOfBirth", e.target.value)
2624
- }
2625
- ),
2626
- /* @__PURE__ */ jsx(
2627
- FloatingInput,
2628
- {
2629
- label: "Phone (optional)",
2630
- type: "tel",
2631
- value: newTraveller.phone,
2632
- onChange: (e) => setField("phone", e.target.value)
2633
- }
2634
- ),
2635
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-3 pt-2", children: [
2628
+ ] })
2629
+ ] });
2630
+ }
2631
+ function TravellerFormFields({ value, onChange, config }) {
2632
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
2633
+ const labels = (_a = config == null ? void 0 : config.labels) != null ? _a : {};
2634
+ const disabledTypes = new Set((_b = config == null ? void 0 : config.disabledPersonTypes) != null ? _b : []);
2635
+ const documentLabel = (config == null ? void 0 : config.requireCpf) ? (_c = labels.documentCpf) != null ? _c : "CPF" : (_d = labels.documentPassport) != null ? _d : "Passport (optional)";
2636
+ const documentPlaceholder = (config == null ? void 0 : config.requireCpf) ? "000.000.000-00" : void 0;
2637
+ const isChild = value.personType === "CHILD";
2638
+ const childEmail = config == null ? void 0 : config.childEmailFromContact;
2639
+ const emailRequired = value.personType === "ADULT" || value.personType === "SENIOR";
2640
+ const emailLabel = `${(_e = labels.email) != null ? _e : "Email"}${emailRequired ? " *" : ""}`;
2641
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2642
+ /* @__PURE__ */ jsx(
2643
+ FloatingInput,
2644
+ {
2645
+ label: (_f = labels.firstName) != null ? _f : "First name *",
2646
+ required: true,
2647
+ value: value.firstName,
2648
+ onChange: (e) => onChange({ firstName: e.target.value })
2649
+ }
2650
+ ),
2651
+ /* @__PURE__ */ jsx(
2652
+ FloatingInput,
2653
+ {
2654
+ label: (_g = labels.lastName) != null ? _g : "Last name *",
2655
+ required: true,
2656
+ value: value.lastName,
2657
+ onChange: (e) => onChange({ lastName: e.target.value })
2658
+ }
2659
+ ),
2660
+ /* @__PURE__ */ jsx(
2661
+ FloatingInput,
2662
+ {
2663
+ label: documentLabel,
2664
+ placeholder: documentPlaceholder,
2665
+ value: (_h = value.documentNumber) != null ? _h : "",
2666
+ onChange: (e) => onChange({ documentNumber: e.target.value })
2667
+ }
2668
+ ),
2669
+ /* @__PURE__ */ jsxs(
2670
+ FloatingSelect,
2671
+ {
2672
+ label: (_i = labels.personTypeLabel) != null ? _i : "Type (adult/child/senior)",
2673
+ value: value.personType,
2674
+ onChange: (e) => onChange({ personType: e.target.value }),
2675
+ children: [
2676
+ /* @__PURE__ */ jsx("option", { value: "ADULT", disabled: disabledTypes.has("ADULT"), children: (_j = labels.personTypeAdult) != null ? _j : "Adult" }),
2677
+ /* @__PURE__ */ jsx("option", { value: "CHILD", disabled: disabledTypes.has("CHILD"), children: (_k = labels.personTypeChild) != null ? _k : "Child" }),
2678
+ /* @__PURE__ */ jsx("option", { value: "SENIOR", disabled: disabledTypes.has("SENIOR"), children: (_l = labels.personTypeSenior) != null ? _l : "Senior" })
2679
+ ]
2680
+ }
2681
+ ),
2682
+ isChild && childEmail ? /* @__PURE__ */ jsx(
2683
+ FloatingInput,
2684
+ {
2685
+ label: (_m = labels.email) != null ? _m : "Email",
2686
+ type: "email",
2687
+ value: childEmail,
2688
+ readOnly: true,
2689
+ disabled: true
2690
+ }
2691
+ ) : /* @__PURE__ */ jsx(
2692
+ FloatingInput,
2693
+ {
2694
+ label: emailLabel,
2695
+ type: "email",
2696
+ value: (_n = value.email) != null ? _n : "",
2697
+ onChange: (e) => onChange({ email: e.target.value }),
2698
+ required: emailRequired
2699
+ }
2700
+ ),
2701
+ /* @__PURE__ */ jsx(
2702
+ FloatingInput,
2703
+ {
2704
+ label: (_o = labels.birthDate) != null ? _o : "Date of birth",
2705
+ type: "date",
2706
+ value: (_p = value.birthDate) != null ? _p : "",
2707
+ onChange: (e) => onChange({ birthDate: e.target.value })
2708
+ }
2709
+ ),
2710
+ /* @__PURE__ */ jsx(
2711
+ FloatingInput,
2712
+ {
2713
+ label: (_q = labels.phone) != null ? _q : "Phone (optional)",
2714
+ type: "tel",
2715
+ value: (_r = value.phone) != null ? _r : "",
2716
+ onChange: (e) => onChange({ phone: e.target.value }),
2717
+ placeholder: "+5511987654321"
2718
+ }
2719
+ )
2720
+ ] });
2721
+ }
2722
+ function createInitialAddFormData(config) {
2723
+ var _a;
2724
+ const disabled = new Set((_a = config == null ? void 0 : config.disabledPersonTypes) != null ? _a : []);
2725
+ const personType = !disabled.has("ADULT") ? "ADULT" : !disabled.has("CHILD") ? "CHILD" : "SENIOR";
2726
+ return {
2727
+ firstName: "",
2728
+ lastName: "",
2729
+ email: "",
2730
+ documentNumber: "",
2731
+ phone: "",
2732
+ birthDate: "",
2733
+ personType
2734
+ };
2735
+ }
2736
+ function AddTravellerDialog({
2737
+ open,
2738
+ adventureId,
2739
+ onClose,
2740
+ onSubmit,
2741
+ config,
2742
+ saving,
2743
+ errorMessage
2744
+ }) {
2745
+ var _a, _b, _c, _d, _e;
2746
+ const [form, setForm] = React22.useState(() => createInitialAddFormData(config));
2747
+ React22.useEffect(() => {
2748
+ if (open) {
2749
+ setForm(createInitialAddFormData(config));
2750
+ }
2751
+ }, [open, config]);
2752
+ const childEmailFromContact = config == null ? void 0 : config.childEmailFromContact;
2753
+ const labels = (_a = config == null ? void 0 : config.labels) != null ? _a : {};
2754
+ const handleSubmit = async (e) => {
2755
+ var _a2, _b2, _c2;
2756
+ e.preventDefault();
2757
+ if (!adventureId) return;
2758
+ const data = __spreadProps(__spreadValues({}, form), {
2759
+ firstName: form.firstName.trim(),
2760
+ lastName: form.lastName.trim(),
2761
+ email: form.personType === "CHILD" && childEmailFromContact ? childEmailFromContact : ((_a2 = form.email) == null ? void 0 : _a2.trim()) || void 0,
2762
+ documentNumber: ((_b2 = form.documentNumber) == null ? void 0 : _b2.trim()) || void 0,
2763
+ phone: ((_c2 = form.phone) == null ? void 0 : _c2.trim()) || void 0,
2764
+ birthDate: form.birthDate || void 0
2765
+ });
2766
+ await onSubmit(adventureId, data);
2767
+ };
2768
+ return /* @__PURE__ */ jsx(
2769
+ Dialog,
2770
+ {
2771
+ open,
2772
+ onOpenChange: (o) => {
2773
+ if (!o) onClose();
2774
+ },
2775
+ children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-lg", children: [
2776
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "font-heading text-xl", children: (_b = labels.modalAddTitle) != null ? _b : "Add traveller" }) }),
2777
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-3", children: [
2636
2778
  /* @__PURE__ */ jsx(
2637
- "button",
2779
+ TravellerFormFields,
2638
2780
  {
2639
- type: "button",
2640
- onClick: () => setAddModalOpen(false),
2641
- className: "text-sm font-ui text-muted-foreground hover:text-foreground transition-colors",
2642
- children: "Cancel"
2781
+ value: form,
2782
+ onChange: (patch) => setForm((prev) => __spreadValues(__spreadValues({}, prev), patch)),
2783
+ config
2643
2784
  }
2644
2785
  ),
2786
+ errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-sans", children: errorMessage }),
2787
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
2788
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onClose, children: (_c = labels.cancel) != null ? _c : "Cancel" }),
2789
+ /* @__PURE__ */ jsx(Button, { type: "submit", size: "sm", disabled: saving, children: saving ? (_d = labels.saving) != null ? _d : "Saving..." : (_e = labels.add) != null ? _e : "Add" })
2790
+ ] })
2791
+ ] })
2792
+ ] })
2793
+ }
2794
+ );
2795
+ }
2796
+ function EditTravellerDialog({
2797
+ open,
2798
+ adventureId,
2799
+ traveller,
2800
+ onClose,
2801
+ onSubmit,
2802
+ config,
2803
+ saving,
2804
+ errorMessage
2805
+ }) {
2806
+ var _a, _b, _c, _d, _e;
2807
+ const [form, setForm] = React22.useState(() => ({
2808
+ firstName: "",
2809
+ lastName: "",
2810
+ email: "",
2811
+ documentNumber: "",
2812
+ phone: "",
2813
+ birthDate: "",
2814
+ personType: "ADULT"
2815
+ }));
2816
+ React22.useEffect(() => {
2817
+ var _a2, _b2, _c2, _d2, _e2, _f;
2818
+ if (open && traveller) {
2819
+ setForm({
2820
+ firstName: (_a2 = traveller.firstName) != null ? _a2 : "",
2821
+ lastName: (_b2 = traveller.lastName) != null ? _b2 : "",
2822
+ email: (_c2 = traveller.email) != null ? _c2 : "",
2823
+ documentNumber: (_d2 = traveller.documentNumber) != null ? _d2 : "",
2824
+ phone: (_e2 = traveller.phone) != null ? _e2 : "",
2825
+ birthDate: traveller.birthDate ? traveller.birthDate.slice(0, 10) : "",
2826
+ personType: (_f = traveller.personType) != null ? _f : traveller.isChild ? "CHILD" : "ADULT"
2827
+ });
2828
+ }
2829
+ }, [open, traveller]);
2830
+ const childEmailFromContact = config == null ? void 0 : config.childEmailFromContact;
2831
+ const labels = (_a = config == null ? void 0 : config.labels) != null ? _a : {};
2832
+ const handleSubmit = async (e) => {
2833
+ var _a2, _b2, _c2;
2834
+ e.preventDefault();
2835
+ if (!adventureId || !traveller) return;
2836
+ const data = __spreadProps(__spreadValues({}, form), {
2837
+ firstName: form.firstName.trim(),
2838
+ lastName: form.lastName.trim(),
2839
+ email: form.personType === "CHILD" && childEmailFromContact ? childEmailFromContact : ((_a2 = form.email) == null ? void 0 : _a2.trim()) || void 0,
2840
+ documentNumber: ((_b2 = form.documentNumber) == null ? void 0 : _b2.trim()) || void 0,
2841
+ phone: ((_c2 = form.phone) == null ? void 0 : _c2.trim()) || void 0,
2842
+ birthDate: form.birthDate || void 0
2843
+ });
2844
+ await onSubmit(adventureId, traveller.id, data);
2845
+ };
2846
+ return /* @__PURE__ */ jsx(
2847
+ Dialog,
2848
+ {
2849
+ open,
2850
+ onOpenChange: (o) => {
2851
+ if (!o) onClose();
2852
+ },
2853
+ children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-lg", children: [
2854
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "font-heading text-xl", children: (_b = labels.modalEditTitle) != null ? _b : "Edit traveller" }) }),
2855
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-3", children: [
2645
2856
  /* @__PURE__ */ jsx(
2646
- "button",
2857
+ TravellerFormFields,
2858
+ {
2859
+ value: form,
2860
+ onChange: (patch) => setForm((prev) => __spreadValues(__spreadValues({}, prev), patch)),
2861
+ config
2862
+ }
2863
+ ),
2864
+ errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-sans", children: errorMessage }),
2865
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
2866
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onClose, children: (_c = labels.cancel) != null ? _c : "Cancel" }),
2867
+ /* @__PURE__ */ jsx(Button, { type: "submit", size: "sm", disabled: saving, children: saving ? (_d = labels.saving) != null ? _d : "Saving..." : (_e = labels.save) != null ? _e : "Save" })
2868
+ ] })
2869
+ ] })
2870
+ ] })
2871
+ }
2872
+ );
2873
+ }
2874
+ function DeleteTravellerDialog({
2875
+ open,
2876
+ adventureId,
2877
+ traveller,
2878
+ onClose,
2879
+ onConfirm,
2880
+ config,
2881
+ saving,
2882
+ errorMessage
2883
+ }) {
2884
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
2885
+ const labels = (_a = config == null ? void 0 : config.labels) != null ? _a : {};
2886
+ const name = traveller ? `${(_b = traveller.firstName) != null ? _b : ""} ${(_c = traveller.lastName) != null ? _c : ""}`.trim() : "";
2887
+ const description = ((_d = labels.modalDeleteConfirm) != null ? _d : 'Delete traveller "{name}"?').replace(
2888
+ "{name}",
2889
+ name
2890
+ );
2891
+ return /* @__PURE__ */ jsx(
2892
+ Dialog,
2893
+ {
2894
+ open,
2895
+ onOpenChange: (o) => {
2896
+ if (!o) onClose();
2897
+ },
2898
+ children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-sm", children: [
2899
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
2900
+ /* @__PURE__ */ jsx(DialogTitle, { children: (_e = labels.modalDeleteTitle) != null ? _e : "Delete traveller?" }),
2901
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
2902
+ ] }),
2903
+ errorMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-sans", children: errorMessage }),
2904
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
2905
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: onClose, children: (_f = labels.cancel) != null ? _f : "Cancel" }),
2906
+ /* @__PURE__ */ jsx(
2907
+ Button,
2647
2908
  {
2648
2909
  type: "button",
2910
+ variant: "destructive",
2911
+ size: "sm",
2912
+ disabled: saving,
2649
2913
  onClick: () => {
2650
- setAddModalOpen(false);
2651
- setNewTraveller({
2652
- firstName: "",
2653
- lastName: "",
2654
- passport: "",
2655
- type: "adult",
2656
- email: "",
2657
- dateOfBirth: "",
2658
- phone: ""
2659
- });
2914
+ if (adventureId && traveller) {
2915
+ void onConfirm(adventureId, traveller.id);
2916
+ }
2660
2917
  },
2661
- className: "rounded-full bg-primary px-6 py-2.5 text-sm font-bold text-primary-foreground font-heading hover:bg-primary/90 transition-colors",
2662
- children: "Add"
2918
+ children: saving ? (_h = (_g = labels.deleting) != null ? _g : labels.saving) != null ? _h : "Deleting..." : (_i = labels.delete) != null ? _i : "Delete"
2663
2919
  }
2664
2920
  )
2665
2921
  ] })
2666
2922
  ] })
2667
- ] }) })
2668
- ] });
2923
+ }
2924
+ );
2669
2925
  }
2670
2926
  function OrderSummary({
2671
2927
  adventures,
@@ -2781,6 +3037,10 @@ function BookingDetails({
2781
3037
  contact,
2782
3038
  agentName,
2783
3039
  agentContactUrl,
3040
+ agentNameFallback,
3041
+ agentLabel,
3042
+ agentContactLabel,
3043
+ cannotRemoveLastTravellerLabel,
2784
3044
  adventures,
2785
3045
  summaryLineItems,
2786
3046
  subtotal,
@@ -2792,6 +3052,14 @@ function BookingDetails({
2792
3052
  onAddSuggestedTraveller,
2793
3053
  onAddTraveller,
2794
3054
  onUnassignFromAdventure,
3055
+ onSubmitAddTraveller,
3056
+ onSubmitEditTraveller,
3057
+ onConfirmRemoveTraveller,
3058
+ travellerFormConfig,
3059
+ addTravellerSaving,
3060
+ editTravellerSaving,
3061
+ removeTravellerSaving,
3062
+ travellerFormError,
2795
3063
  onPayBalance,
2796
3064
  onCancelRequest,
2797
3065
  logoSrc,
@@ -2802,6 +3070,72 @@ function BookingDetails({
2802
3070
  }) {
2803
3071
  var _a, _b, _c;
2804
3072
  const people = totalPeople(adventures);
3073
+ const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3074
+ const hasSubmitEditTraveller = !!onSubmitEditTraveller;
3075
+ const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
3076
+ const [addModalState, setAddModalState] = React22.useState({
3077
+ open: false,
3078
+ adventureId: null
3079
+ });
3080
+ const [editModalState, setEditModalState] = React22.useState({ open: false, adventureId: null, traveller: null });
3081
+ const [deleteModalState, setDeleteModalState] = React22.useState({ open: false, adventureId: null, traveller: null });
3082
+ const handleRequestOpenAddModal = React22.useCallback((adventureId) => {
3083
+ setAddModalState({ open: true, adventureId });
3084
+ }, []);
3085
+ const handleRequestOpenEditModal = React22.useCallback(
3086
+ (adventureId, traveller) => {
3087
+ setEditModalState({ open: true, adventureId, traveller });
3088
+ },
3089
+ []
3090
+ );
3091
+ const handleRequestOpenDeleteModal = React22.useCallback(
3092
+ (adventureId, traveller) => {
3093
+ setDeleteModalState({ open: true, adventureId, traveller });
3094
+ },
3095
+ []
3096
+ );
3097
+ const closeAddModal = React22.useCallback(() => {
3098
+ setAddModalState({ open: false, adventureId: null });
3099
+ }, []);
3100
+ const closeEditModal = React22.useCallback(() => {
3101
+ setEditModalState({ open: false, adventureId: null, traveller: null });
3102
+ }, []);
3103
+ const closeDeleteModal = React22.useCallback(() => {
3104
+ setDeleteModalState({ open: false, adventureId: null, traveller: null });
3105
+ }, []);
3106
+ const handleAddSubmit = React22.useCallback(
3107
+ async (adventureId, data) => {
3108
+ if (!onSubmitAddTraveller) return;
3109
+ try {
3110
+ await onSubmitAddTraveller(adventureId, data);
3111
+ closeAddModal();
3112
+ } catch (e) {
3113
+ }
3114
+ },
3115
+ [onSubmitAddTraveller, closeAddModal]
3116
+ );
3117
+ const handleEditSubmit = React22.useCallback(
3118
+ async (adventureId, travellerId, data) => {
3119
+ if (!onSubmitEditTraveller) return;
3120
+ try {
3121
+ await onSubmitEditTraveller(adventureId, travellerId, data);
3122
+ closeEditModal();
3123
+ } catch (e) {
3124
+ }
3125
+ },
3126
+ [onSubmitEditTraveller, closeEditModal]
3127
+ );
3128
+ const handleDeleteConfirm = React22.useCallback(
3129
+ async (adventureId, travellerId) => {
3130
+ if (!onConfirmRemoveTraveller) return;
3131
+ try {
3132
+ await onConfirmRemoveTraveller(adventureId, travellerId);
3133
+ closeDeleteModal();
3134
+ } catch (e) {
3135
+ }
3136
+ },
3137
+ [onConfirmRemoveTraveller, closeDeleteModal]
3138
+ );
2805
3139
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2806
3140
  (logoSrc || onSignOut) && /* @__PURE__ */ jsx("header", { className: "w-full border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-30", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-5xl mx-auto px-4 sm:px-6 lg:px-0 h-14 flex items-center justify-between gap-4", children: [
2807
3141
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
@@ -2856,26 +3190,49 @@ function BookingDetails({
2856
3190
  /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
2857
3191
  contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
2858
3192
  ] }),
2859
- agentName && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
2860
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary font-heading font-bold text-sm uppercase", children: agentName.charAt(0) }),
2861
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
2862
- /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
2863
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
2864
- ] }),
2865
- agentContactUrl && /* @__PURE__ */ jsxs(
2866
- "a",
2867
- {
2868
- href: agentContactUrl,
2869
- target: "_blank",
2870
- rel: "noopener noreferrer",
2871
- className: "ml-auto shrink-0 flex items-center gap-1.5 rounded-full bg-primary/10 px-3.5 py-1.5 text-xs font-semibold text-primary font-ui transition-colors hover:bg-primary/20",
2872
- children: [
2873
- /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
2874
- "Contact"
2875
- ]
2876
- }
2877
- )
2878
- ] }),
3193
+ (() => {
3194
+ const hasAgent = !!agentName;
3195
+ const displayName = hasAgent ? agentName : agentNameFallback != null ? agentNameFallback : "No agent assigned";
3196
+ const initial = hasAgent ? agentName.charAt(0) : "?";
3197
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3198
+ /* @__PURE__ */ jsx(
3199
+ "div",
3200
+ {
3201
+ className: cn(
3202
+ "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
3203
+ hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
3204
+ ),
3205
+ children: initial
3206
+ }
3207
+ ),
3208
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3209
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: agentLabel != null ? agentLabel : "Your Agent" }),
3210
+ /* @__PURE__ */ jsx(
3211
+ "p",
3212
+ {
3213
+ className: cn(
3214
+ "text-sm font-sans truncate",
3215
+ hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
3216
+ ),
3217
+ children: displayName
3218
+ }
3219
+ )
3220
+ ] }),
3221
+ hasAgent && agentContactUrl && /* @__PURE__ */ jsxs(
3222
+ "a",
3223
+ {
3224
+ href: agentContactUrl,
3225
+ target: "_blank",
3226
+ rel: "noopener noreferrer",
3227
+ className: "ml-auto shrink-0 flex items-center gap-1.5 rounded-full bg-primary/10 px-3.5 py-1.5 text-xs font-semibold text-primary font-ui transition-colors hover:bg-primary/20",
3228
+ children: [
3229
+ /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3230
+ agentContactLabel != null ? agentContactLabel : "Contact"
3231
+ ]
3232
+ }
3233
+ )
3234
+ ] });
3235
+ })(),
2879
3236
  /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
2880
3237
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2881
3238
  /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
@@ -2906,7 +3263,14 @@ function BookingDetails({
2906
3263
  onRemoveTraveller,
2907
3264
  onAddSuggestedTraveller,
2908
3265
  onAddTraveller,
2909
- onUnassignFromAdventure
3266
+ onUnassignFromAdventure,
3267
+ hasSubmitAddTraveller,
3268
+ hasSubmitEditTraveller,
3269
+ hasConfirmRemoveTraveller,
3270
+ onRequestOpenAddModal: handleRequestOpenAddModal,
3271
+ onRequestOpenEditModal: handleRequestOpenEditModal,
3272
+ onRequestOpenDeleteModal: handleRequestOpenDeleteModal,
3273
+ cannotRemoveLastTravellerLabel
2910
3274
  },
2911
3275
  adventure.id
2912
3276
  ))
@@ -2982,6 +3346,44 @@ function BookingDetails({
2982
3346
  ] })
2983
3347
  ]
2984
3348
  }
3349
+ ),
3350
+ hasSubmitAddTraveller && /* @__PURE__ */ jsx(
3351
+ AddTravellerDialog,
3352
+ {
3353
+ open: addModalState.open,
3354
+ adventureId: addModalState.adventureId,
3355
+ onClose: closeAddModal,
3356
+ onSubmit: handleAddSubmit,
3357
+ config: travellerFormConfig,
3358
+ saving: addTravellerSaving,
3359
+ errorMessage: addModalState.open ? travellerFormError : null
3360
+ }
3361
+ ),
3362
+ hasSubmitEditTraveller && /* @__PURE__ */ jsx(
3363
+ EditTravellerDialog,
3364
+ {
3365
+ open: editModalState.open,
3366
+ adventureId: editModalState.adventureId,
3367
+ traveller: editModalState.traveller,
3368
+ onClose: closeEditModal,
3369
+ onSubmit: handleEditSubmit,
3370
+ config: travellerFormConfig,
3371
+ saving: editTravellerSaving,
3372
+ errorMessage: editModalState.open ? travellerFormError : null
3373
+ }
3374
+ ),
3375
+ hasConfirmRemoveTraveller && /* @__PURE__ */ jsx(
3376
+ DeleteTravellerDialog,
3377
+ {
3378
+ open: deleteModalState.open,
3379
+ adventureId: deleteModalState.adventureId,
3380
+ traveller: deleteModalState.traveller,
3381
+ onClose: closeDeleteModal,
3382
+ onConfirm: handleDeleteConfirm,
3383
+ config: travellerFormConfig,
3384
+ saving: removeTravellerSaving,
3385
+ errorMessage: deleteModalState.open ? travellerFormError : null
3386
+ }
2985
3387
  )
2986
3388
  ] });
2987
3389
  }