@planetaexo/design-system 0.7.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.d.cts CHANGED
@@ -311,6 +311,17 @@ interface BookingDetailsProps {
311
311
  contact: BookingContact;
312
312
  agentName?: string;
313
313
  agentContactUrl?: string;
314
+ /** Texto exibido no lugar do nome do agente quando `agentName` é falsy.
315
+ * Quando omitido, usa default "No agent assigned". O card do Agente é
316
+ * sempre renderizado (mesmo sem `agentName`), com esse placeholder. */
317
+ agentNameFallback?: string;
318
+ /** Label do card do Agente. Default: "Your Agent". */
319
+ agentLabel?: string;
320
+ /** Label do botão/link de contato com o agente. Default: "Contact". */
321
+ agentContactLabel?: string;
322
+ /** Tooltip/title exibido nos botões de remove/unassign desabilitados
323
+ * quando a aventura tem apenas 1 viajante. Default: "Cannot remove last traveller". */
324
+ cannotRemoveLastTravellerLabel?: string;
314
325
  adventures: BookingAdventure[];
315
326
  summaryLineItems?: BookingSummaryLineItem[];
316
327
  subtotal?: string;
@@ -354,7 +365,7 @@ interface BookingDetailsProps {
354
365
  signOutLabel?: string;
355
366
  className?: string;
356
367
  }
357
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
368
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
358
369
 
359
370
  interface BookingConfirmationLabels {
360
371
  ctaButton?: string;
package/dist/index.d.ts CHANGED
@@ -311,6 +311,17 @@ interface BookingDetailsProps {
311
311
  contact: BookingContact;
312
312
  agentName?: string;
313
313
  agentContactUrl?: string;
314
+ /** Texto exibido no lugar do nome do agente quando `agentName` é falsy.
315
+ * Quando omitido, usa default "No agent assigned". O card do Agente é
316
+ * sempre renderizado (mesmo sem `agentName`), com esse placeholder. */
317
+ agentNameFallback?: string;
318
+ /** Label do card do Agente. Default: "Your Agent". */
319
+ agentLabel?: string;
320
+ /** Label do botão/link de contato com o agente. Default: "Contact". */
321
+ agentContactLabel?: string;
322
+ /** Tooltip/title exibido nos botões de remove/unassign desabilitados
323
+ * quando a aventura tem apenas 1 viajante. Default: "Cannot remove last traveller". */
324
+ cannotRemoveLastTravellerLabel?: string;
314
325
  adventures: BookingAdventure[];
315
326
  summaryLineItems?: BookingSummaryLineItem[];
316
327
  subtotal?: string;
@@ -354,7 +365,7 @@ interface BookingDetailsProps {
354
365
  signOutLabel?: string;
355
366
  className?: string;
356
367
  }
357
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
368
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
358
369
 
359
370
  interface BookingConfirmationLabels {
360
371
  ctaButton?: string;
package/dist/index.js CHANGED
@@ -2247,10 +2247,12 @@ function AdventureSection({
2247
2247
  hasConfirmRemoveTraveller,
2248
2248
  onRequestOpenAddModal,
2249
2249
  onRequestOpenEditModal,
2250
- onRequestOpenDeleteModal
2250
+ onRequestOpenDeleteModal,
2251
+ cannotRemoveLastTravellerLabel
2251
2252
  }) {
2252
2253
  var _a, _b, _c, _d;
2253
2254
  const [detailsOpen, setDetailsOpen] = React22.useState(false);
2255
+ const [itineraryOpen, setItineraryOpen] = React22.useState(true);
2254
2256
  const handleCopyUrl = (url) => {
2255
2257
  navigator.clipboard.writeText(url);
2256
2258
  };
@@ -2316,8 +2318,31 @@ function AdventureSection({
2316
2318
  )) })
2317
2319
  ] }),
2318
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: [
2319
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
2320
- 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(
2321
2346
  "div",
2322
2347
  {
2323
2348
  className: cn(
@@ -2334,7 +2359,7 @@ function AdventureSection({
2334
2359
  ),
2335
2360
  children: adventure.detailsSlot
2336
2361
  }
2337
- ) : /* @__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 }))
2338
2363
  ] }),
2339
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: [
2340
2365
  adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -2429,114 +2454,132 @@ function AdventureSection({
2429
2454
  )
2430
2455
  ] })
2431
2456
  ] }),
2432
- /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => /* @__PURE__ */ jsxs(
2433
- "div",
2434
- {
2435
- className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
2436
- children: [
2437
- /* @__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: [
2438
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
2439
- /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
2440
- t.firstName,
2441
- " ",
2442
- 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" })
2443
2473
  ] }),
2444
- 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" })
2445
- ] }),
2446
- t.formUrl && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2447
- /* @__PURE__ */ jsxs(
2448
- "a",
2449
- {
2450
- href: t.formUrl,
2451
- target: "_blank",
2452
- rel: "noopener noreferrer",
2453
- className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
2454
- children: [
2455
- /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "w-3 h-3" }),
2456
- "Open"
2457
- ]
2458
- }
2459
- ),
2460
- /* @__PURE__ */ jsx(
2461
- "button",
2462
- {
2463
- type: "button",
2464
- onClick: () => handleCopyUrl(t.formUrl),
2465
- className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
2466
- "aria-label": "Copy form URL",
2467
- children: /* @__PURE__ */ jsx(CopyIcon, { className: "w-3 h-3" })
2468
- }
2469
- )
2470
- ] })
2471
- ] }) }),
2472
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
2473
- /* @__PURE__ */ jsx(
2474
- "span",
2475
- {
2476
- className: cn(
2477
- "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
2478
- 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
+ }
2479
2487
  ),
2480
- children: t.status
2481
- }
2482
- ),
2483
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
2484
- (onEditTraveller || hasSubmitEditTraveller) && /* @__PURE__ */ jsx(
2485
- "button",
2486
- {
2487
- type: "button",
2488
- onClick: () => {
2489
- if (onEditTraveller) {
2490
- onEditTraveller(adventure.id, t.id);
2491
- } else {
2492
- onRequestOpenEditModal == null ? void 0 : onRequestOpenEditModal(adventure.id, t);
2493
- }
2494
- },
2495
- 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",
2496
- "aria-label": `Edit ${t.firstName}`,
2497
- children: /* @__PURE__ */ jsx(PencilIcon, { className: "w-3.5 h-3.5" })
2498
- }
2499
- ),
2500
- (onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2501
- "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",
2502
2503
  {
2503
- type: "button",
2504
- onClick: () => {
2505
- if (onRemoveTraveller) {
2506
- onRemoveTraveller(adventure.id, t.id);
2507
- } else {
2508
- onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2509
- }
2510
- },
2511
- 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",
2512
- "aria-label": `Delete ${t.firstName}`,
2513
- 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
2514
2509
  }
2515
2510
  ),
2516
- (onUnassignFromAdventure || onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2517
- "button",
2518
- {
2519
- type: "button",
2520
- onClick: () => {
2521
- if (onUnassignFromAdventure) {
2522
- onUnassignFromAdventure(adventure.id, t.id);
2523
- } else if (onRemoveTraveller) {
2524
- onRemoveTraveller(adventure.id, t.id);
2525
- } else {
2526
- onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2527
- }
2528
- },
2529
- 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",
2530
- "aria-label": `Remove ${t.firstName} from adventure`,
2531
- children: /* @__PURE__ */ jsx(UserMinusIcon, { className: "w-3.5 h-3.5" })
2532
- }
2533
- )
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
+ ] })
2534
2577
  ] })
2535
- ] })
2536
- ]
2537
- },
2538
- t.id
2539
- )) }),
2578
+ ]
2579
+ },
2580
+ t.id
2581
+ );
2582
+ }) }),
2540
2583
  adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
2541
2584
  /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
2542
2585
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxs(
@@ -2994,6 +3037,10 @@ function BookingDetails({
2994
3037
  contact,
2995
3038
  agentName,
2996
3039
  agentContactUrl,
3040
+ agentNameFallback,
3041
+ agentLabel,
3042
+ agentContactLabel,
3043
+ cannotRemoveLastTravellerLabel,
2997
3044
  adventures,
2998
3045
  summaryLineItems,
2999
3046
  subtotal,
@@ -3143,26 +3190,49 @@ function BookingDetails({
3143
3190
  /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
3144
3191
  contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
3145
3192
  ] }),
3146
- agentName && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3147
- /* @__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) }),
3148
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3149
- /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
3150
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
3151
- ] }),
3152
- agentContactUrl && /* @__PURE__ */ jsxs(
3153
- "a",
3154
- {
3155
- href: agentContactUrl,
3156
- target: "_blank",
3157
- rel: "noopener noreferrer",
3158
- 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",
3159
- children: [
3160
- /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3161
- "Contact"
3162
- ]
3163
- }
3164
- )
3165
- ] }),
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
+ })(),
3166
3236
  /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
3167
3237
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3168
3238
  /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
@@ -3199,7 +3269,8 @@ function BookingDetails({
3199
3269
  hasConfirmRemoveTraveller,
3200
3270
  onRequestOpenAddModal: handleRequestOpenAddModal,
3201
3271
  onRequestOpenEditModal: handleRequestOpenEditModal,
3202
- onRequestOpenDeleteModal: handleRequestOpenDeleteModal
3272
+ onRequestOpenDeleteModal: handleRequestOpenDeleteModal,
3273
+ cannotRemoveLastTravellerLabel
3203
3274
  },
3204
3275
  adventure.id
3205
3276
  ))