@burdenoff/microfe-adaptercloud 2026.614.1 → 2026.624.1

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.
Files changed (110) hide show
  1. package/dist/adaptercloud/components/EmptyState.js +3 -3
  2. package/dist/adaptercloud/components/EmptyState.js.map +1 -1
  3. package/dist/adaptercloud/components/InvestmentCard.js +9 -9
  4. package/dist/adaptercloud/components/InvestmentCard.js.map +1 -1
  5. package/dist/adaptercloud/components/MetricsCard.js +5 -5
  6. package/dist/adaptercloud/components/MetricsCard.js.map +1 -1
  7. package/dist/adaptercloud/components/PageLayout.js +3 -3
  8. package/dist/adaptercloud/components/PageLayout.js.map +1 -1
  9. package/dist/adaptercloud/components/RatingDisplay.js +3 -3
  10. package/dist/adaptercloud/components/RatingDisplay.js.map +1 -1
  11. package/dist/adaptercloud/components/StatusBadge.js +2 -2
  12. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  13. package/dist/adaptercloud/pages/HomePage.js +54 -54
  14. package/dist/adaptercloud/pages/HomePage.js.map +1 -1
  15. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +60 -60
  16. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
  17. package/dist/adaptercloud/pages/admin/AdminDashboard.js +77 -77
  18. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
  19. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +43 -43
  20. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
  21. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +85 -85
  22. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
  23. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +34 -34
  24. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
  25. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +40 -40
  26. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
  27. package/dist/adaptercloud/pages/admin/CartManagementPage.js +86 -86
  28. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
  29. package/dist/adaptercloud/pages/admin/UserManagementPage.js +80 -80
  30. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
  31. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +100 -100
  32. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  33. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +29 -29
  34. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  35. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +81 -81
  36. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  37. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +100 -100
  38. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  39. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +67 -67
  40. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  41. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +94 -94
  42. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  43. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +57 -57
  44. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
  45. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +75 -75
  46. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
  47. package/dist/adaptercloud/pages/common/HelpSupportPage.js +102 -102
  48. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
  49. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +35 -35
  50. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
  51. package/dist/adaptercloud/pages/common/SettingsPage.js +109 -109
  52. package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
  53. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +60 -60
  54. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
  55. package/dist/adaptercloud/pages/customer/CartDetailPage.js +71 -71
  56. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
  57. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +54 -54
  58. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
  59. package/dist/adaptercloud/pages/customer/CheckoutPage.js +75 -75
  60. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
  61. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +69 -69
  62. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
  63. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +72 -72
  64. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
  65. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +75 -75
  66. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
  67. package/dist/adaptercloud/pages/customer/FavoritesPage.js +30 -30
  68. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
  69. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +41 -41
  70. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
  71. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +53 -53
  72. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
  73. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +51 -51
  74. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
  75. package/dist/adaptercloud/pages/customer/ReviewsPage.js +33 -33
  76. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
  77. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +33 -33
  78. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
  79. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +108 -108
  80. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
  81. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +76 -76
  82. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  83. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +69 -69
  84. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  85. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +53 -53
  86. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
  87. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +32 -32
  88. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  89. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +55 -55
  90. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
  91. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +138 -138
  92. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
  93. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +65 -65
  94. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
  95. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +74 -74
  96. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
  97. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +49 -49
  98. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
  99. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +92 -92
  100. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
  101. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +55 -55
  102. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
  103. package/dist/adaptercloud/utils/cn.js +2 -2
  104. package/dist/node_modules/{.bun/clsx@2.1.1/node_modules/clsx → clsx}/dist/clsx.js +1 -1
  105. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  106. package/dist/node_modules/{.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge → tailwind-merge}/dist/bundle-mjs.js +212 -170
  107. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  108. package/package.json +1 -1
  109. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +0 -1
  110. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -234,7 +234,7 @@ var M = [
234
234
  urgent: "bg-red-500/20 text-red-600 dark:text-red-400",
235
235
  high: "bg-orange-500/20 text-orange-600 dark:text-orange-400",
236
236
  medium: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
237
- low: "bg-muted text-muted-foreground"
237
+ low: "bg-bg-sunken text-text-secondary"
238
238
  }, F = {
239
239
  urgent: "border-l-red-500",
240
240
  high: "border-l-orange-500",
@@ -371,7 +371,7 @@ function B() {
371
371
  children: [l.length > 0 && /* @__PURE__ */ j("button", {
372
372
  type: "button",
373
373
  onClick: Z,
374
- className: "flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",
374
+ className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
375
375
  children: [/* @__PURE__ */ A(C, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
376
376
  className: "hidden sm:inline",
377
377
  children: "Clear All"
@@ -379,7 +379,7 @@ function B() {
379
379
  }), B > 0 && /* @__PURE__ */ j("button", {
380
380
  type: "button",
381
381
  onClick: J,
382
- className: "flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
382
+ className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
383
383
  children: [/* @__PURE__ */ A(p, { className: "h-4 w-4" }), "Mark All Read"]
384
384
  })]
385
385
  }),
@@ -388,12 +388,12 @@ function B() {
388
388
  className: "grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6",
389
389
  children: [
390
390
  /* @__PURE__ */ j("div", {
391
- className: "rounded-lg border border-border bg-card p-3 text-center",
391
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-3 text-center",
392
392
  children: [/* @__PURE__ */ A("p", {
393
- className: "text-2xl font-bold text-foreground",
393
+ className: "text-2xl font-bold text-text-primary",
394
394
  children: l.length
395
395
  }), /* @__PURE__ */ A("p", {
396
- className: "text-xs text-muted-foreground",
396
+ className: "text-xs text-text-secondary",
397
397
  children: "Total"
398
398
  })]
399
399
  }),
@@ -403,7 +403,7 @@ function B() {
403
403
  className: "text-2xl font-bold text-blue-600 dark:text-blue-400",
404
404
  children: B
405
405
  }), /* @__PURE__ */ A("p", {
406
- className: "text-xs text-muted-foreground",
406
+ className: "text-xs text-text-secondary",
407
407
  children: "Unread"
408
408
  })]
409
409
  }),
@@ -413,7 +413,7 @@ function B() {
413
413
  className: "text-2xl font-bold text-red-600 dark:text-red-400",
414
414
  children: V
415
415
  }), /* @__PURE__ */ A("p", {
416
- className: "text-xs text-muted-foreground",
416
+ className: "text-xs text-text-secondary",
417
417
  children: "Urgent"
418
418
  })]
419
419
  }),
@@ -423,7 +423,7 @@ function B() {
423
423
  className: "text-2xl font-bold text-green-600 dark:text-green-400",
424
424
  children: H
425
425
  }), /* @__PURE__ */ A("p", {
426
- className: "text-xs text-muted-foreground",
426
+ className: "text-xs text-text-secondary",
427
427
  children: "Today"
428
428
  })]
429
429
  }),
@@ -433,7 +433,7 @@ function B() {
433
433
  className: "text-2xl font-bold text-yellow-600 dark:text-yellow-400",
434
434
  children: U
435
435
  }), /* @__PURE__ */ A("p", {
436
- className: "text-xs text-muted-foreground",
436
+ className: "text-xs text-text-secondary",
437
437
  children: "This Week"
438
438
  })]
439
439
  })
@@ -446,12 +446,12 @@ function B() {
446
446
  return /* @__PURE__ */ j("button", {
447
447
  type: "button",
448
448
  onClick: () => v(e.id),
449
- className: t("flex items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1.5 text-sm font-medium transition-colors", g === e.id ? "border-primary bg-primary/10 text-foreground" : "border-border text-muted-foreground hover:text-foreground hover:border-accent-foreground/20"),
449
+ className: t("flex items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1.5 text-sm font-medium transition-colors", g === e.id ? "border-primary bg-action-primary-bg/10 text-text-primary" : "border-border-subtle text-text-secondary hover:text-text-primary hover:border-accent-foreground/20"),
450
450
  children: [
451
451
  /* @__PURE__ */ A(n, { className: "h-3.5 w-3.5" }),
452
452
  e.label,
453
453
  /* @__PURE__ */ A("span", {
454
- className: t("inline-flex h-5 min-w-[20px] items-center justify-center rounded-full px-1 text-xs", g === e.id ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"),
454
+ className: t("inline-flex h-5 min-w-[20px] items-center justify-center rounded-full px-1 text-xs", g === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
455
455
  children: W[e.id]
456
456
  })
457
457
  ]
@@ -463,18 +463,18 @@ function B() {
463
463
  children: [/* @__PURE__ */ j("div", {
464
464
  className: "relative flex-1",
465
465
  children: [
466
- /* @__PURE__ */ A(b, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
466
+ /* @__PURE__ */ A(b, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
467
467
  /* @__PURE__ */ A("input", {
468
468
  type: "text",
469
469
  placeholder: "Search notifications...",
470
470
  value: x,
471
471
  onChange: (e) => S(e.target.value),
472
- className: "w-full rounded-lg border border-border bg-card py-2.5 pl-10 pr-9 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
472
+ className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-10 pr-9 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
473
473
  }),
474
474
  x && /* @__PURE__ */ A("button", {
475
475
  type: "button",
476
476
  onClick: () => S(""),
477
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
477
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
478
478
  children: /* @__PURE__ */ A(O, { className: "h-4 w-4" })
479
479
  })
480
480
  ]
@@ -483,7 +483,7 @@ function B() {
483
483
  children: [/* @__PURE__ */ j("button", {
484
484
  type: "button",
485
485
  onClick: () => D(!E),
486
- className: "flex items-center gap-1.5 rounded-lg border border-border px-3 py-2.5 text-sm font-medium text-foreground hover:bg-accent transition-colors",
486
+ className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
487
487
  children: [/* @__PURE__ */ A(u, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
488
488
  className: "hidden sm:inline",
489
489
  children: "Sort"
@@ -492,7 +492,7 @@ function B() {
492
492
  className: "fixed inset-0 z-10",
493
493
  onClick: () => D(!1)
494
494
  }), /* @__PURE__ */ A("div", {
495
- className: "absolute right-0 top-full mt-1 z-20 w-44 rounded-lg border border-border bg-card shadow-lg py-1",
495
+ className: "absolute right-0 top-full mt-1 z-20 w-44 rounded-lg border border-border-subtle bg-bg-surface shadow-lg py-1",
496
496
  children: [
497
497
  {
498
498
  value: "recent",
@@ -511,7 +511,7 @@ function B() {
511
511
  onClick: () => {
512
512
  T(e.value), D(!1);
513
513
  },
514
- className: t("w-full text-left px-3 py-2 text-sm transition-colors", w === e.value ? "bg-primary/10 text-foreground font-medium" : "text-muted-foreground hover:bg-accent hover:text-foreground"),
514
+ className: t("w-full text-left px-3 py-2 text-sm transition-colors", w === e.value ? "bg-action-primary-bg/10 text-text-primary font-medium" : "text-text-secondary hover:bg-accent hover:text-text-primary"),
515
515
  children: e.label
516
516
  }, e.value))
517
517
  })] })]
@@ -524,12 +524,12 @@ function B() {
524
524
  action: x ? /* @__PURE__ */ A("button", {
525
525
  type: "button",
526
526
  onClick: () => S(""),
527
- className: "rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
527
+ className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
528
528
  children: "Clear Search"
529
529
  }) : g === "all" ? void 0 : /* @__PURE__ */ A("button", {
530
530
  type: "button",
531
531
  onClick: () => v("all"),
532
- className: "rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
532
+ className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
533
533
  children: "View All Notifications"
534
534
  })
535
535
  }) : /* @__PURE__ */ A("div", {
@@ -538,12 +538,12 @@ function B() {
538
538
  className: "flex items-center gap-3 mb-2",
539
539
  children: [
540
540
  /* @__PURE__ */ A("h3", {
541
- className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground",
541
+ className: "text-xs font-semibold uppercase tracking-wider text-text-secondary",
542
542
  children: e.label
543
543
  }),
544
- /* @__PURE__ */ A("div", { className: "flex-1 border-t border-border" }),
544
+ /* @__PURE__ */ A("div", { className: "flex-1 border-t border-border-subtle" }),
545
545
  /* @__PURE__ */ j("span", {
546
- className: "text-xs text-muted-foreground",
546
+ className: "text-xs text-text-secondary",
547
547
  children: [
548
548
  e.items.length,
549
549
  " notification",
@@ -552,7 +552,7 @@ function B() {
552
552
  })
553
553
  ]
554
554
  }), /* @__PURE__ */ A("div", {
555
- className: "rounded-lg border border-border bg-card divide-y divide-border overflow-hidden",
555
+ className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border overflow-hidden",
556
556
  children: e.items.map((e) => {
557
557
  let n = N[e.type] ?? N.system, r = n.icon;
558
558
  return /* @__PURE__ */ j("div", {
@@ -569,10 +569,10 @@ function B() {
569
569
  className: "flex items-center gap-2 flex-wrap",
570
570
  children: [
571
571
  /* @__PURE__ */ A("h4", {
572
- className: t("text-sm text-foreground", e.isRead ? "font-medium" : "font-semibold"),
572
+ className: t("text-sm text-text-primary", e.isRead ? "font-medium" : "font-semibold"),
573
573
  children: e.title
574
574
  }),
575
- !e.isRead && /* @__PURE__ */ A("span", { className: "h-2 w-2 rounded-full bg-primary shrink-0" }),
575
+ !e.isRead && /* @__PURE__ */ A("span", { className: "h-2 w-2 rounded-full bg-action-primary-bg shrink-0" }),
576
576
  /* @__PURE__ */ A("span", {
577
577
  className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", P[e.priority]),
578
578
  children: e.priority
@@ -580,14 +580,14 @@ function B() {
580
580
  ]
581
581
  }),
582
582
  /* @__PURE__ */ A("p", {
583
- className: "mt-1 text-sm text-muted-foreground leading-relaxed",
583
+ className: "mt-1 text-sm text-text-secondary leading-relaxed",
584
584
  children: e.message
585
585
  }),
586
586
  /* @__PURE__ */ j("div", {
587
587
  className: "mt-2 flex items-center gap-3 flex-wrap",
588
588
  children: [
589
589
  /* @__PURE__ */ j("span", {
590
- className: "flex items-center gap-1 text-xs text-muted-foreground",
590
+ className: "flex items-center gap-1 text-xs text-text-secondary",
591
591
  children: [/* @__PURE__ */ A(m, { className: "h-3 w-3" }), i(e.createdAt)]
592
592
  }),
593
593
  /* @__PURE__ */ A("span", {
@@ -595,7 +595,7 @@ function B() {
595
595
  children: n.label
596
596
  }),
597
597
  e.metadata?.orderId && /* @__PURE__ */ j("span", {
598
- className: "text-xs text-muted-foreground",
598
+ className: "text-xs text-text-secondary",
599
599
  children: ["#", e.metadata.orderId]
600
600
  })
601
601
  ]
@@ -606,21 +606,21 @@ function B() {
606
606
  e.actionUrl && /* @__PURE__ */ A("button", {
607
607
  type: "button",
608
608
  onClick: () => X(e),
609
- className: "rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
609
+ className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
610
610
  children: e.actionText ?? "View"
611
611
  }),
612
612
  !e.isRead && /* @__PURE__ */ j("button", {
613
613
  type: "button",
614
614
  onClick: () => q(e.id),
615
615
  title: "Mark as read",
616
- className: "flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent transition-colors",
616
+ className: "flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
617
617
  children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Mark Read"]
618
618
  }),
619
619
  /* @__PURE__ */ j("button", {
620
620
  type: "button",
621
621
  onClick: () => Y(e.id),
622
622
  title: "Delete notification",
623
- className: "flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/10 transition-colors",
623
+ className: "flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors",
624
624
  children: [/* @__PURE__ */ A(C, { className: "h-3 w-3" }), "Delete"]
625
625
  })
626
626
  ]
@@ -629,7 +629,7 @@ function B() {
629
629
  }),
630
630
  /* @__PURE__ */ A("div", {
631
631
  className: "shrink-0 pt-1",
632
- children: e.isRead ? /* @__PURE__ */ A(_, { className: "h-4 w-4 text-muted-foreground/40" }) : /* @__PURE__ */ A(d, { className: "h-4 w-4 text-primary" })
632
+ children: e.isRead ? /* @__PURE__ */ A(_, { className: "h-4 w-4 text-text-secondary/40" }) : /* @__PURE__ */ A(d, { className: "h-4 w-4 text-primary" })
633
633
  })
634
634
  ]
635
635
  }, e.id);
@@ -637,9 +637,9 @@ function B() {
637
637
  })] }, e.label))
638
638
  }),
639
639
  G.length > 0 && /* @__PURE__ */ j("div", {
640
- className: "mt-6 flex items-center justify-between rounded-lg border border-border bg-card px-4 py-3",
640
+ className: "mt-6 flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface px-4 py-3",
641
641
  children: [/* @__PURE__ */ j("p", {
642
- className: "text-sm text-muted-foreground",
642
+ className: "text-sm text-text-secondary",
643
643
  children: [
644
644
  "Showing ",
645
645
  G.length,
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCenterPage.js","names":[],"sources":["../../../../src/adaptercloud/pages/common/NotificationCenterPage.tsx"],"sourcesContent":["/**\n * Notification Center Page\n * @module adaptercloud/pages/common\n *\n * Full-featured notification center with tab filters (All, Orders,\n * Promotions, System, Unread), date grouping (Today, Yesterday, Earlier),\n * mark-as-read / mark-all-as-read, delete notification, search,\n * type/priority badges, action buttons, stats overview, and empty states.\n */\n\nimport { useState, useMemo, useCallback } from 'react';\nimport {\n Bell,\n ShoppingBag,\n TrendingUp,\n Star,\n AlertCircle,\n CheckCircle2,\n CreditCard,\n Users,\n AlertTriangle,\n Megaphone,\n Check,\n CheckCheck,\n Trash2,\n Search,\n X,\n MailOpen,\n Clock,\n Truck,\n UserCheck,\n Inbox,\n RefreshCw,\n SlidersHorizontal,\n ArrowUpDown,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useAdapterCloud } from '../../context/AdapterCloudContext';\nimport { cn } from '../../utils/cn';\nimport { formatRelativeTime } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype NotificationType =\n | 'order_update'\n | 'payment'\n | 'promotion'\n | 'system'\n | 'review'\n | 'staff'\n | 'investment'\n | 'alert'\n | 'delivery'\n | 'account';\n\ntype NotificationPriority = 'low' | 'medium' | 'high' | 'urgent';\n\ntype TabId = 'all' | 'orders' | 'promotions' | 'system' | 'unread';\n\ntype SortOption = 'recent' | 'priority' | 'unread';\n\ninterface Notification {\n id: string;\n type: NotificationType;\n title: string;\n message: string;\n priority: NotificationPriority;\n isRead: boolean;\n createdAt: string;\n actionUrl?: string;\n actionText?: string;\n metadata?: {\n orderId?: string;\n cartId?: string;\n amount?: number;\n };\n}\n\n// ---------------------------------------------------------------------------\n// Mock notifications (14 items, rich variety)\n// ---------------------------------------------------------------------------\n\nconst initialNotifications: Notification[] = [\n {\n id: 'n-001',\n type: 'order_update',\n title: 'Order Delivered Successfully!',\n message:\n 'Your order #ORD-001 from Dosa Express has been delivered. Rate your experience to help others!',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 8 * 60 * 1000).toISOString(),\n actionUrl: '/customer/order/ORD-001',\n actionText: 'Rate Order',\n metadata: { orderId: 'ORD-001', cartId: 'FOOD-001' },\n },\n {\n id: 'n-002',\n type: 'payment',\n title: 'Payment Confirmed',\n message:\n 'Your payment of \\u20B9495 for order #ORD-002 at Quick Cuts Salon has been processed successfully.',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 35 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-002', amount: 495 },\n },\n {\n id: 'n-003',\n type: 'promotion',\n title: '20% Off Beauty Services This Weekend!',\n message:\n \"Glow Beauty Services is offering 20% off on all treatments this weekend only. Don't miss out!\",\n priority: 'low',\n isRead: false,\n createdAt: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/cart/SERV-002',\n actionText: 'Book Now',\n metadata: { cartId: 'SERV-002' },\n },\n {\n id: 'n-004',\n type: 'review',\n title: 'New Review Response',\n message:\n 'Dosa Express replied to your review: \"Thank you so much for your kind words! We hope to serve you again soon.\"',\n priority: 'low',\n isRead: false,\n createdAt: new Date(Date.now() - 4 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/reviews',\n actionText: 'View Reply',\n },\n {\n id: 'n-005',\n type: 'system',\n title: 'App Update Available',\n message:\n 'Version 2.4.0 of AdapterCloud is available with improved performance, new category filters, and bug fixes.',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 7 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/settings',\n actionText: 'Update Now',\n },\n {\n id: 'n-006',\n type: 'order_update',\n title: 'Appointment Confirmed',\n message:\n 'Your appointment at Quick Cuts Salon has been confirmed for tomorrow at 3:00 PM. The stylist Suresh will be serving you.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/order/ORD-002',\n actionText: 'View Details',\n metadata: { orderId: 'ORD-002' },\n },\n {\n id: 'n-007',\n type: 'investment',\n title: 'Monthly Returns Credited',\n message:\n 'You received \\u20B91,250 in monthly returns from your Quick Cuts Salon investment. Total portfolio value: \\u20B92,12,500.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/investor/portfolio',\n actionText: 'View Portfolio',\n metadata: { amount: 1250 },\n },\n {\n id: 'n-008',\n type: 'delivery',\n title: 'Delivery Worker Assigned',\n message:\n 'Ravi Kumar (rated 4.8) has been assigned to deliver your order from Biryani Pot. Estimated arrival: 25 minutes.',\n priority: 'high',\n isRead: true,\n createdAt: new Date(Date.now() - 1.5 * 24 * 60 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-003' },\n },\n {\n id: 'n-009',\n type: 'alert',\n title: 'Unusual Login Attempt Detected',\n message:\n 'We detected a login attempt from a new device in Mumbai. If this was not you, please change your password immediately.',\n priority: 'urgent',\n isRead: true,\n createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/settings',\n actionText: 'Review Activity',\n },\n {\n id: 'n-010',\n type: 'promotion',\n title: 'Flash Sale: Mobile Accessories',\n message:\n 'Gadget Zone Brigade is running a flash sale! Up to 30% off on bluetooth headphones, cases, and chargers.',\n priority: 'low',\n isRead: true,\n createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/cart/RETAIL-003',\n actionText: 'Shop Now',\n metadata: { cartId: 'RETAIL-003' },\n },\n {\n id: 'n-011',\n type: 'system',\n title: 'Scheduled Platform Maintenance',\n message:\n 'Platform maintenance is scheduled for Sunday 2:00 AM - 4:00 AM IST. Some services may be briefly unavailable during this window.',\n priority: 'high',\n isRead: true,\n createdAt: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString(),\n },\n {\n id: 'n-012',\n type: 'account',\n title: 'KYC Verification Complete',\n message:\n 'Your KYC verification has been completed successfully. You now have full access to all platform features including investments.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(),\n },\n {\n id: 'n-013',\n type: 'staff',\n title: 'Staff Schedule Updated',\n message:\n 'Priya Sharma has updated her availability for this week. She will be unavailable on Wednesday and Thursday.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/owner/staff',\n actionText: 'View Schedule',\n },\n {\n id: 'n-014',\n type: 'payment',\n title: 'Refund Processed',\n message:\n 'Your refund of \\u20B9280 for order #ORD-005 has been processed. The amount will reflect in your account within 3-5 business days.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-005', amount: 280 },\n },\n];\n\n// ---------------------------------------------------------------------------\n// Type icon/color configuration\n// ---------------------------------------------------------------------------\n\nconst typeConfig: Record<string, { icon: typeof Bell; color: string; bg: string; label: string }> =\n {\n order_update: {\n icon: ShoppingBag,\n color: 'text-blue-600 dark:text-blue-400',\n bg: 'bg-blue-500/10',\n label: 'Order',\n },\n payment: {\n icon: CreditCard,\n color: 'text-green-600 dark:text-green-400',\n bg: 'bg-green-500/10',\n label: 'Payment',\n },\n promotion: {\n icon: Megaphone,\n color: 'text-orange-600 dark:text-orange-400',\n bg: 'bg-orange-500/10',\n label: 'Promo',\n },\n system: {\n icon: AlertCircle,\n color: 'text-purple-600 dark:text-purple-400',\n bg: 'bg-purple-500/10',\n label: 'System',\n },\n review: {\n icon: Star,\n color: 'text-yellow-600 dark:text-yellow-400',\n bg: 'bg-yellow-500/10',\n label: 'Review',\n },\n staff: {\n icon: Users,\n color: 'text-indigo-600 dark:text-indigo-400',\n bg: 'bg-indigo-500/10',\n label: 'Staff',\n },\n investment: {\n icon: TrendingUp,\n color: 'text-emerald-600 dark:text-emerald-400',\n bg: 'bg-emerald-500/10',\n label: 'Investment',\n },\n alert: {\n icon: AlertTriangle,\n color: 'text-red-600 dark:text-red-400',\n bg: 'bg-red-500/10',\n label: 'Alert',\n },\n delivery: {\n icon: Truck,\n color: 'text-cyan-600 dark:text-cyan-400',\n bg: 'bg-cyan-500/10',\n label: 'Delivery',\n },\n account: {\n icon: UserCheck,\n color: 'text-teal-600 dark:text-teal-400',\n bg: 'bg-teal-500/10',\n label: 'Account',\n },\n };\n\n// ---------------------------------------------------------------------------\n// Priority styling\n// ---------------------------------------------------------------------------\n\nconst priorityStyles: Record<NotificationPriority, string> = {\n urgent: 'bg-red-500/20 text-red-600 dark:text-red-400',\n high: 'bg-orange-500/20 text-orange-600 dark:text-orange-400',\n medium: 'bg-blue-500/20 text-blue-600 dark:text-blue-400',\n low: 'bg-muted text-muted-foreground',\n};\n\nconst priorityBorderColors: Record<NotificationPriority, string> = {\n urgent: 'border-l-red-500',\n high: 'border-l-orange-500',\n medium: 'border-l-blue-500',\n low: 'border-l-border',\n};\n\nconst priorityOrder: Record<NotificationPriority, number> = {\n urgent: 4,\n high: 3,\n medium: 2,\n low: 1,\n};\n\n// ---------------------------------------------------------------------------\n// Tab definitions\n// ---------------------------------------------------------------------------\n\nconst tabs: { id: TabId; label: string; icon: typeof Bell }[] = [\n { id: 'all', label: 'All', icon: Inbox },\n { id: 'orders', label: 'Orders', icon: ShoppingBag },\n { id: 'promotions', label: 'Promotions', icon: Megaphone },\n { id: 'system', label: 'System', icon: AlertCircle },\n { id: 'unread', label: 'Unread', icon: Bell },\n];\n\n// ---------------------------------------------------------------------------\n// Date grouping helpers\n// ---------------------------------------------------------------------------\n\nfunction getDateGroup(dateStr: string): string {\n const date = new Date(dateStr);\n const now = new Date();\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000);\n\n if (date >= today) return 'Today';\n if (date >= yesterday) return 'Yesterday';\n return 'Earlier';\n}\n\nfunction groupByDate(items: Notification[]): { label: string; items: Notification[] }[] {\n const groups: { label: string; items: Notification[] }[] = [];\n const map = new Map<string, Notification[]>();\n const order = ['Today', 'Yesterday', 'Earlier'];\n\n for (const n of items) {\n const group = getDateGroup(n.createdAt);\n if (!map.has(group)) map.set(group, []);\n map.get(group)!.push(n);\n }\n\n for (const label of order) {\n const items = map.get(label);\n if (items && items.length > 0) {\n groups.push({ label, items });\n }\n }\n\n return groups;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function NotificationCenterPage() {\n const { navigateTo } = useAdapterCloud();\n const [notifications, setNotifications] = useState<Notification[]>(initialNotifications);\n const [activeTab, setActiveTab] = useState<TabId>('all');\n const [searchQuery, setSearchQuery] = useState('');\n const [sortBy, setSortBy] = useState<SortOption>('recent');\n const [showSortMenu, setShowSortMenu] = useState(false);\n\n // ---------------------------------------------------------------------------\n // Derived counts\n // ---------------------------------------------------------------------------\n\n const unreadCount = useMemo(() => notifications.filter((n) => !n.isRead).length, [notifications]);\n\n const urgentCount = useMemo(\n () => notifications.filter((n) => n.priority === 'urgent').length,\n [notifications]\n );\n\n const todayCount = useMemo(\n () => notifications.filter((n) => getDateGroup(n.createdAt) === 'Today').length,\n [notifications]\n );\n\n const thisWeekCount = useMemo(() => {\n const weekAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);\n return notifications.filter((n) => new Date(n.createdAt) >= weekAgo).length;\n }, [notifications]);\n\n const tabCounts = useMemo(() => {\n const counts: Record<TabId, number> = {\n all: 0,\n orders: 0,\n promotions: 0,\n system: 0,\n unread: 0,\n };\n for (const n of notifications) {\n counts.all++;\n if (!n.isRead) counts.unread++;\n if (n.type === 'order_update' || n.type === 'delivery') counts.orders++;\n if (n.type === 'promotion') counts.promotions++;\n if (n.type === 'system' || n.type === 'alert' || n.type === 'account') counts.system++;\n }\n return counts;\n }, [notifications]);\n\n // ---------------------------------------------------------------------------\n // Filtered & sorted list\n // ---------------------------------------------------------------------------\n\n const filteredNotifications = useMemo(() => {\n let list = [...notifications];\n\n // Tab filter\n switch (activeTab) {\n case 'orders':\n list = list.filter((n) => n.type === 'order_update' || n.type === 'delivery');\n break;\n case 'promotions':\n list = list.filter((n) => n.type === 'promotion');\n break;\n case 'system':\n list = list.filter(\n (n) => n.type === 'system' || n.type === 'alert' || n.type === 'account'\n );\n break;\n case 'unread':\n list = list.filter((n) => !n.isRead);\n break;\n }\n\n // Search filter\n if (searchQuery) {\n const q = searchQuery.toLowerCase();\n list = list.filter(\n (n) => n.title.toLowerCase().includes(q) || n.message.toLowerCase().includes(q)\n );\n }\n\n // Sort\n switch (sortBy) {\n case 'recent':\n list.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());\n break;\n case 'priority':\n list.sort((a, b) => priorityOrder[b.priority] - priorityOrder[a.priority]);\n break;\n case 'unread':\n list.sort((a, b) => (a.isRead === b.isRead ? 0 : a.isRead ? 1 : -1));\n break;\n }\n\n return list;\n }, [notifications, activeTab, searchQuery, sortBy]);\n\n // Grouped by date\n const grouped = useMemo(() => groupByDate(filteredNotifications), [filteredNotifications]);\n\n // ---------------------------------------------------------------------------\n // Actions\n // ---------------------------------------------------------------------------\n\n const markAsRead = useCallback((id: string) => {\n setNotifications((prev) => prev.map((n) => (n.id === id ? { ...n, isRead: true } : n)));\n }, []);\n\n const markAllAsRead = useCallback(() => {\n setNotifications((prev) => prev.map((n) => ({ ...n, isRead: true })));\n }, []);\n\n const deleteNotification = useCallback((id: string) => {\n setNotifications((prev) => prev.filter((n) => n.id !== id));\n }, []);\n\n const handleAction = useCallback(\n (notif: Notification) => {\n if (!notif.isRead) markAsRead(notif.id);\n if (notif.actionUrl) navigateTo(notif.actionUrl);\n },\n [markAsRead, navigateTo]\n );\n\n const clearAll = useCallback(() => {\n if (window.confirm('Are you sure you want to clear all notifications?')) {\n setNotifications([]);\n }\n }, []);\n\n // ---------------------------------------------------------------------------\n // Render\n // ---------------------------------------------------------------------------\n\n return (\n <PageLayout\n title=\"Notifications\"\n description={\n unreadCount > 0\n ? `${unreadCount} unread notification${unreadCount !== 1 ? 's' : ''}`\n : 'All caught up!'\n }\n actions={\n <div className=\"flex items-center gap-2\">\n {notifications.length > 0 && (\n <button\n type=\"button\"\n onClick={clearAll}\n className=\"flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-accent transition-colors\"\n >\n <Trash2 className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Clear All</span>\n </button>\n )}\n {unreadCount > 0 && (\n <button\n type=\"button\"\n onClick={markAllAsRead}\n className=\"flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors\"\n >\n <CheckCheck className=\"h-4 w-4\" />\n Mark All Read\n </button>\n )}\n </div>\n }\n >\n {/* ---- Stats Overview ---- */}\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6\">\n <div className=\"rounded-lg border border-border bg-card p-3 text-center\">\n <p className=\"text-2xl font-bold text-foreground\">{notifications.length}</p>\n <p className=\"text-xs text-muted-foreground\">Total</p>\n </div>\n <div className=\"rounded-lg border border-blue-500/30 bg-blue-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-blue-600 dark:text-blue-400\">{unreadCount}</p>\n <p className=\"text-xs text-muted-foreground\">Unread</p>\n </div>\n <div className=\"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-red-600 dark:text-red-400\">{urgentCount}</p>\n <p className=\"text-xs text-muted-foreground\">Urgent</p>\n </div>\n <div className=\"rounded-lg border border-green-500/30 bg-green-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-green-600 dark:text-green-400\">{todayCount}</p>\n <p className=\"text-xs text-muted-foreground\">Today</p>\n </div>\n <div className=\"rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-yellow-600 dark:text-yellow-400\">{thisWeekCount}</p>\n <p className=\"text-xs text-muted-foreground\">This Week</p>\n </div>\n </div>\n\n {/* ---- Tabs ---- */}\n <div className=\"flex items-center gap-2 mb-4 overflow-x-auto pb-1\">\n {tabs.map((tab) => {\n const TabIcon = tab.icon;\n return (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => setActiveTab(tab.id)}\n className={cn(\n 'flex items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1.5 text-sm font-medium transition-colors',\n activeTab === tab.id\n ? 'border-primary bg-primary/10 text-foreground'\n : 'border-border text-muted-foreground hover:text-foreground hover:border-accent-foreground/20'\n )}\n >\n <TabIcon className=\"h-3.5 w-3.5\" />\n {tab.label}\n <span\n className={cn(\n 'inline-flex h-5 min-w-[20px] items-center justify-center rounded-full px-1 text-xs',\n activeTab === tab.id\n ? 'bg-primary text-primary-foreground'\n : 'bg-muted text-muted-foreground'\n )}\n >\n {tabCounts[tab.id]}\n </span>\n </button>\n );\n })}\n </div>\n\n {/* ---- Search & Sort ---- */}\n <div className=\"flex items-center gap-3 mb-6\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground\" />\n <input\n type=\"text\"\n placeholder=\"Search notifications...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full rounded-lg border border-border bg-card py-2.5 pl-10 pr-9 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring\"\n />\n {searchQuery && (\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n\n {/* Sort dropdown */}\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={() => setShowSortMenu(!showSortMenu)}\n className=\"flex items-center gap-1.5 rounded-lg border border-border px-3 py-2.5 text-sm font-medium text-foreground hover:bg-accent transition-colors\"\n >\n <ArrowUpDown className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Sort</span>\n </button>\n {showSortMenu && (\n <>\n {/* Backdrop */}\n <div className=\"fixed inset-0 z-10\" onClick={() => setShowSortMenu(false)} />\n <div className=\"absolute right-0 top-full mt-1 z-20 w-44 rounded-lg border border-border bg-card shadow-lg py-1\">\n {(\n [\n { value: 'recent', label: 'Most Recent' },\n { value: 'priority', label: 'By Priority' },\n { value: 'unread', label: 'Unread First' },\n ] as const\n ).map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => {\n setSortBy(opt.value);\n setShowSortMenu(false);\n }}\n className={cn(\n 'w-full text-left px-3 py-2 text-sm transition-colors',\n sortBy === opt.value\n ? 'bg-primary/10 text-foreground font-medium'\n : 'text-muted-foreground hover:bg-accent hover:text-foreground'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n </div>\n\n {/* ---- Notification List ---- */}\n {filteredNotifications.length === 0 ? (\n <EmptyState\n icon={<Bell className=\"h-12 w-12\" />}\n title=\"No notifications\"\n description={\n searchQuery\n ? 'No notifications match your search. Try different keywords.'\n : activeTab === 'unread'\n ? \"You're all caught up! No unread notifications.\"\n : 'No notifications in this category yet.'\n }\n action={\n searchQuery ? (\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors\"\n >\n Clear Search\n </button>\n ) : activeTab !== 'all' ? (\n <button\n type=\"button\"\n onClick={() => setActiveTab('all')}\n className=\"rounded-lg border border-border px-4 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors\"\n >\n View All Notifications\n </button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"space-y-6\">\n {grouped.map((group) => (\n <div key={group.label}>\n {/* Date group header */}\n <div className=\"flex items-center gap-3 mb-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {group.label}\n </h3>\n <div className=\"flex-1 border-t border-border\" />\n <span className=\"text-xs text-muted-foreground\">\n {group.items.length} notification{group.items.length !== 1 ? 's' : ''}\n </span>\n </div>\n\n {/* Notification cards */}\n <div className=\"rounded-lg border border-border bg-card divide-y divide-border overflow-hidden\">\n {group.items.map((notif) => {\n const config = typeConfig[notif.type] ?? typeConfig.system;\n const NotifIcon = config.icon;\n\n return (\n <div\n key={notif.id}\n className={cn(\n 'flex items-start gap-3 px-4 py-4 border-l-4 transition-colors',\n priorityBorderColors[notif.priority],\n !notif.isRead && 'bg-accent/30'\n )}\n >\n {/* Type icon */}\n <div\n className={cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-full',\n config.bg\n )}\n >\n <NotifIcon className={cn('h-5 w-5', config.color)} />\n </div>\n\n {/* Content */}\n <div className=\"flex-1 min-w-0\">\n {/* Title row */}\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h4\n className={cn(\n 'text-sm text-foreground',\n !notif.isRead ? 'font-semibold' : 'font-medium'\n )}\n >\n {notif.title}\n </h4>\n {!notif.isRead && (\n <span className=\"h-2 w-2 rounded-full bg-primary shrink-0\" />\n )}\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium',\n priorityStyles[notif.priority]\n )}\n >\n {notif.priority}\n </span>\n </div>\n\n {/* Message */}\n <p className=\"mt-1 text-sm text-muted-foreground leading-relaxed\">\n {notif.message}\n </p>\n\n {/* Metadata row */}\n <div className=\"mt-2 flex items-center gap-3 flex-wrap\">\n <span className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {formatRelativeTime(notif.createdAt)}\n </span>\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium',\n config.bg,\n config.color\n )}\n >\n {config.label}\n </span>\n {notif.metadata?.orderId && (\n <span className=\"text-xs text-muted-foreground\">\n #{notif.metadata.orderId}\n </span>\n )}\n </div>\n\n {/* Action buttons row */}\n <div className=\"mt-3 flex items-center gap-2 flex-wrap\">\n {notif.actionUrl && (\n <button\n type=\"button\"\n onClick={() => handleAction(notif)}\n className=\"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n {notif.actionText ?? 'View'}\n </button>\n )}\n {!notif.isRead && (\n <button\n type=\"button\"\n onClick={() => markAsRead(notif.id)}\n title=\"Mark as read\"\n className=\"flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent transition-colors\"\n >\n <Check className=\"h-3 w-3\" />\n Mark Read\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => deleteNotification(notif.id)}\n title=\"Delete notification\"\n className=\"flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/10 transition-colors\"\n >\n <Trash2 className=\"h-3 w-3\" />\n Delete\n </button>\n </div>\n </div>\n\n {/* Read/unread indicator */}\n <div className=\"shrink-0 pt-1\">\n {notif.isRead ? (\n <MailOpen className=\"h-4 w-4 text-muted-foreground/40\" />\n ) : (\n <Bell className=\"h-4 w-4 text-primary\" />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* ---- Footer summary ---- */}\n {filteredNotifications.length > 0 && (\n <div className=\"mt-6 flex items-center justify-between rounded-lg border border-border bg-card px-4 py-3\">\n <p className=\"text-sm text-muted-foreground\">\n Showing {filteredNotifications.length} of {notifications.length} notifications\n </p>\n {activeTab !== 'all' && (\n <button\n type=\"button\"\n onClick={() => {\n setActiveTab('all');\n setSearchQuery('');\n }}\n className=\"flex items-center gap-1.5 text-sm font-medium text-primary hover:underline\"\n >\n <RefreshCw className=\"h-3.5 w-3.5\" />\n Show All\n </button>\n )}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;AAqFA,IAAM,IAAuC;CAC3C;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,MAAS,IAAK,EAAC,aAAa;EAC7D,WAAW;EACX,YAAY;EACZ,UAAU;GAAE,SAAS;GAAW,QAAQ;GAAY;EACrD;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,OAAU,IAAK,EAAC,aAAa;EAC9D,UAAU;GAAE,SAAS;GAAW,QAAQ;GAAK;EAC9C;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,OAAc,IAAK,EAAC,aAAa;EAClE,WAAW;EACX,YAAY;EACZ,UAAU,EAAE,QAAQ,YAAY;EACjC;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,QAAc,IAAK,EAAC,aAAa;EAClE,WAAW;EACX,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,MAAS,KAAK,IAAK,EAAC,aAAa;EAClE,WAAW;EACX,YAAY;EACb;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,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qC,CAAA,GAEzD,kBAAC,GAAD,EAAM,WAAU,wBAAyB,CAAA;SAEvC,CAAA;QACF;SA/GC,EAAM,GA+GP;OAER;KACE,CAAA,CACF,EAAA,EAvII,EAAM,MAuIV,CACN;IACE,CAAA;GAIP,EAAsB,SAAS,KAC9B,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAAb;MAA6C;MAClC,EAAsB;MAAO;MAAK,EAAc;MAAO;MAC9D;QACH,MAAc,SACb,kBAAC,UAAD;KACE,MAAK;KACL,eAAe;AAEb,MADA,EAAa,MAAM,EACnB,EAAe,GAAG;;KAEpB,WAAU;eANZ,CAQE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EAAA,WAE9B;OAEP;;GAEG"}
1
+ {"version":3,"file":"NotificationCenterPage.js","names":[],"sources":["../../../../src/adaptercloud/pages/common/NotificationCenterPage.tsx"],"sourcesContent":["/**\n * Notification Center Page\n * @module adaptercloud/pages/common\n *\n * Full-featured notification center with tab filters (All, Orders,\n * Promotions, System, Unread), date grouping (Today, Yesterday, Earlier),\n * mark-as-read / mark-all-as-read, delete notification, search,\n * type/priority badges, action buttons, stats overview, and empty states.\n */\n\nimport { useState, useMemo, useCallback } from 'react';\nimport {\n Bell,\n ShoppingBag,\n TrendingUp,\n Star,\n AlertCircle,\n CheckCircle2,\n CreditCard,\n Users,\n AlertTriangle,\n Megaphone,\n Check,\n CheckCheck,\n Trash2,\n Search,\n X,\n MailOpen,\n Clock,\n Truck,\n UserCheck,\n Inbox,\n RefreshCw,\n SlidersHorizontal,\n ArrowUpDown,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useAdapterCloud } from '../../context/AdapterCloudContext';\nimport { cn } from '../../utils/cn';\nimport { formatRelativeTime } from '../../utils/formatters';\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\ntype NotificationType =\n | 'order_update'\n | 'payment'\n | 'promotion'\n | 'system'\n | 'review'\n | 'staff'\n | 'investment'\n | 'alert'\n | 'delivery'\n | 'account';\n\ntype NotificationPriority = 'low' | 'medium' | 'high' | 'urgent';\n\ntype TabId = 'all' | 'orders' | 'promotions' | 'system' | 'unread';\n\ntype SortOption = 'recent' | 'priority' | 'unread';\n\ninterface Notification {\n id: string;\n type: NotificationType;\n title: string;\n message: string;\n priority: NotificationPriority;\n isRead: boolean;\n createdAt: string;\n actionUrl?: string;\n actionText?: string;\n metadata?: {\n orderId?: string;\n cartId?: string;\n amount?: number;\n };\n}\n\n// ---------------------------------------------------------------------------\n// Mock notifications (14 items, rich variety)\n// ---------------------------------------------------------------------------\n\nconst initialNotifications: Notification[] = [\n {\n id: 'n-001',\n type: 'order_update',\n title: 'Order Delivered Successfully!',\n message:\n 'Your order #ORD-001 from Dosa Express has been delivered. Rate your experience to help others!',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 8 * 60 * 1000).toISOString(),\n actionUrl: '/customer/order/ORD-001',\n actionText: 'Rate Order',\n metadata: { orderId: 'ORD-001', cartId: 'FOOD-001' },\n },\n {\n id: 'n-002',\n type: 'payment',\n title: 'Payment Confirmed',\n message:\n 'Your payment of \\u20B9495 for order #ORD-002 at Quick Cuts Salon has been processed successfully.',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 35 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-002', amount: 495 },\n },\n {\n id: 'n-003',\n type: 'promotion',\n title: '20% Off Beauty Services This Weekend!',\n message:\n \"Glow Beauty Services is offering 20% off on all treatments this weekend only. Don't miss out!\",\n priority: 'low',\n isRead: false,\n createdAt: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/cart/SERV-002',\n actionText: 'Book Now',\n metadata: { cartId: 'SERV-002' },\n },\n {\n id: 'n-004',\n type: 'review',\n title: 'New Review Response',\n message:\n 'Dosa Express replied to your review: \"Thank you so much for your kind words! We hope to serve you again soon.\"',\n priority: 'low',\n isRead: false,\n createdAt: new Date(Date.now() - 4 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/reviews',\n actionText: 'View Reply',\n },\n {\n id: 'n-005',\n type: 'system',\n title: 'App Update Available',\n message:\n 'Version 2.4.0 of AdapterCloud is available with improved performance, new category filters, and bug fixes.',\n priority: 'medium',\n isRead: false,\n createdAt: new Date(Date.now() - 7 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/settings',\n actionText: 'Update Now',\n },\n {\n id: 'n-006',\n type: 'order_update',\n title: 'Appointment Confirmed',\n message:\n 'Your appointment at Quick Cuts Salon has been confirmed for tomorrow at 3:00 PM. The stylist Suresh will be serving you.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/order/ORD-002',\n actionText: 'View Details',\n metadata: { orderId: 'ORD-002' },\n },\n {\n id: 'n-007',\n type: 'investment',\n title: 'Monthly Returns Credited',\n message:\n 'You received \\u20B91,250 in monthly returns from your Quick Cuts Salon investment. Total portfolio value: \\u20B92,12,500.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/investor/portfolio',\n actionText: 'View Portfolio',\n metadata: { amount: 1250 },\n },\n {\n id: 'n-008',\n type: 'delivery',\n title: 'Delivery Worker Assigned',\n message:\n 'Ravi Kumar (rated 4.8) has been assigned to deliver your order from Biryani Pot. Estimated arrival: 25 minutes.',\n priority: 'high',\n isRead: true,\n createdAt: new Date(Date.now() - 1.5 * 24 * 60 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-003' },\n },\n {\n id: 'n-009',\n type: 'alert',\n title: 'Unusual Login Attempt Detected',\n message:\n 'We detected a login attempt from a new device in Mumbai. If this was not you, please change your password immediately.',\n priority: 'urgent',\n isRead: true,\n createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/settings',\n actionText: 'Review Activity',\n },\n {\n id: 'n-010',\n type: 'promotion',\n title: 'Flash Sale: Mobile Accessories',\n message:\n 'Gadget Zone Brigade is running a flash sale! Up to 30% off on bluetooth headphones, cases, and chargers.',\n priority: 'low',\n isRead: true,\n createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/customer/cart/RETAIL-003',\n actionText: 'Shop Now',\n metadata: { cartId: 'RETAIL-003' },\n },\n {\n id: 'n-011',\n type: 'system',\n title: 'Scheduled Platform Maintenance',\n message:\n 'Platform maintenance is scheduled for Sunday 2:00 AM - 4:00 AM IST. Some services may be briefly unavailable during this window.',\n priority: 'high',\n isRead: true,\n createdAt: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString(),\n },\n {\n id: 'n-012',\n type: 'account',\n title: 'KYC Verification Complete',\n message:\n 'Your KYC verification has been completed successfully. You now have full access to all platform features including investments.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(),\n },\n {\n id: 'n-013',\n type: 'staff',\n title: 'Staff Schedule Updated',\n message:\n 'Priya Sharma has updated her availability for this week. She will be unavailable on Wednesday and Thursday.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString(),\n actionUrl: '/owner/staff',\n actionText: 'View Schedule',\n },\n {\n id: 'n-014',\n type: 'payment',\n title: 'Refund Processed',\n message:\n 'Your refund of \\u20B9280 for order #ORD-005 has been processed. The amount will reflect in your account within 3-5 business days.',\n priority: 'medium',\n isRead: true,\n createdAt: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),\n metadata: { orderId: 'ORD-005', amount: 280 },\n },\n];\n\n// ---------------------------------------------------------------------------\n// Type icon/color configuration\n// ---------------------------------------------------------------------------\n\nconst typeConfig: Record<string, { icon: typeof Bell; color: string; bg: string; label: string }> =\n {\n order_update: {\n icon: ShoppingBag,\n color: 'text-blue-600 dark:text-blue-400',\n bg: 'bg-blue-500/10',\n label: 'Order',\n },\n payment: {\n icon: CreditCard,\n color: 'text-green-600 dark:text-green-400',\n bg: 'bg-green-500/10',\n label: 'Payment',\n },\n promotion: {\n icon: Megaphone,\n color: 'text-orange-600 dark:text-orange-400',\n bg: 'bg-orange-500/10',\n label: 'Promo',\n },\n system: {\n icon: AlertCircle,\n color: 'text-purple-600 dark:text-purple-400',\n bg: 'bg-purple-500/10',\n label: 'System',\n },\n review: {\n icon: Star,\n color: 'text-yellow-600 dark:text-yellow-400',\n bg: 'bg-yellow-500/10',\n label: 'Review',\n },\n staff: {\n icon: Users,\n color: 'text-indigo-600 dark:text-indigo-400',\n bg: 'bg-indigo-500/10',\n label: 'Staff',\n },\n investment: {\n icon: TrendingUp,\n color: 'text-emerald-600 dark:text-emerald-400',\n bg: 'bg-emerald-500/10',\n label: 'Investment',\n },\n alert: {\n icon: AlertTriangle,\n color: 'text-red-600 dark:text-red-400',\n bg: 'bg-red-500/10',\n label: 'Alert',\n },\n delivery: {\n icon: Truck,\n color: 'text-cyan-600 dark:text-cyan-400',\n bg: 'bg-cyan-500/10',\n label: 'Delivery',\n },\n account: {\n icon: UserCheck,\n color: 'text-teal-600 dark:text-teal-400',\n bg: 'bg-teal-500/10',\n label: 'Account',\n },\n };\n\n// ---------------------------------------------------------------------------\n// Priority styling\n// ---------------------------------------------------------------------------\n\nconst priorityStyles: Record<NotificationPriority, string> = {\n urgent: 'bg-red-500/20 text-red-600 dark:text-red-400',\n high: 'bg-orange-500/20 text-orange-600 dark:text-orange-400',\n medium: 'bg-blue-500/20 text-blue-600 dark:text-blue-400',\n low: 'bg-bg-sunken text-text-secondary',\n};\n\nconst priorityBorderColors: Record<NotificationPriority, string> = {\n urgent: 'border-l-red-500',\n high: 'border-l-orange-500',\n medium: 'border-l-blue-500',\n low: 'border-l-border',\n};\n\nconst priorityOrder: Record<NotificationPriority, number> = {\n urgent: 4,\n high: 3,\n medium: 2,\n low: 1,\n};\n\n// ---------------------------------------------------------------------------\n// Tab definitions\n// ---------------------------------------------------------------------------\n\nconst tabs: { id: TabId; label: string; icon: typeof Bell }[] = [\n { id: 'all', label: 'All', icon: Inbox },\n { id: 'orders', label: 'Orders', icon: ShoppingBag },\n { id: 'promotions', label: 'Promotions', icon: Megaphone },\n { id: 'system', label: 'System', icon: AlertCircle },\n { id: 'unread', label: 'Unread', icon: Bell },\n];\n\n// ---------------------------------------------------------------------------\n// Date grouping helpers\n// ---------------------------------------------------------------------------\n\nfunction getDateGroup(dateStr: string): string {\n const date = new Date(dateStr);\n const now = new Date();\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000);\n\n if (date >= today) return 'Today';\n if (date >= yesterday) return 'Yesterday';\n return 'Earlier';\n}\n\nfunction groupByDate(items: Notification[]): { label: string; items: Notification[] }[] {\n const groups: { label: string; items: Notification[] }[] = [];\n const map = new Map<string, Notification[]>();\n const order = ['Today', 'Yesterday', 'Earlier'];\n\n for (const n of items) {\n const group = getDateGroup(n.createdAt);\n if (!map.has(group)) map.set(group, []);\n map.get(group)!.push(n);\n }\n\n for (const label of order) {\n const items = map.get(label);\n if (items && items.length > 0) {\n groups.push({ label, items });\n }\n }\n\n return groups;\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function NotificationCenterPage() {\n const { navigateTo } = useAdapterCloud();\n const [notifications, setNotifications] = useState<Notification[]>(initialNotifications);\n const [activeTab, setActiveTab] = useState<TabId>('all');\n const [searchQuery, setSearchQuery] = useState('');\n const [sortBy, setSortBy] = useState<SortOption>('recent');\n const [showSortMenu, setShowSortMenu] = useState(false);\n\n // ---------------------------------------------------------------------------\n // Derived counts\n // ---------------------------------------------------------------------------\n\n const unreadCount = useMemo(() => notifications.filter((n) => !n.isRead).length, [notifications]);\n\n const urgentCount = useMemo(\n () => notifications.filter((n) => n.priority === 'urgent').length,\n [notifications]\n );\n\n const todayCount = useMemo(\n () => notifications.filter((n) => getDateGroup(n.createdAt) === 'Today').length,\n [notifications]\n );\n\n const thisWeekCount = useMemo(() => {\n const weekAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);\n return notifications.filter((n) => new Date(n.createdAt) >= weekAgo).length;\n }, [notifications]);\n\n const tabCounts = useMemo(() => {\n const counts: Record<TabId, number> = {\n all: 0,\n orders: 0,\n promotions: 0,\n system: 0,\n unread: 0,\n };\n for (const n of notifications) {\n counts.all++;\n if (!n.isRead) counts.unread++;\n if (n.type === 'order_update' || n.type === 'delivery') counts.orders++;\n if (n.type === 'promotion') counts.promotions++;\n if (n.type === 'system' || n.type === 'alert' || n.type === 'account') counts.system++;\n }\n return counts;\n }, [notifications]);\n\n // ---------------------------------------------------------------------------\n // Filtered & sorted list\n // ---------------------------------------------------------------------------\n\n const filteredNotifications = useMemo(() => {\n let list = [...notifications];\n\n // Tab filter\n switch (activeTab) {\n case 'orders':\n list = list.filter((n) => n.type === 'order_update' || n.type === 'delivery');\n break;\n case 'promotions':\n list = list.filter((n) => n.type === 'promotion');\n break;\n case 'system':\n list = list.filter(\n (n) => n.type === 'system' || n.type === 'alert' || n.type === 'account'\n );\n break;\n case 'unread':\n list = list.filter((n) => !n.isRead);\n break;\n }\n\n // Search filter\n if (searchQuery) {\n const q = searchQuery.toLowerCase();\n list = list.filter(\n (n) => n.title.toLowerCase().includes(q) || n.message.toLowerCase().includes(q)\n );\n }\n\n // Sort\n switch (sortBy) {\n case 'recent':\n list.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());\n break;\n case 'priority':\n list.sort((a, b) => priorityOrder[b.priority] - priorityOrder[a.priority]);\n break;\n case 'unread':\n list.sort((a, b) => (a.isRead === b.isRead ? 0 : a.isRead ? 1 : -1));\n break;\n }\n\n return list;\n }, [notifications, activeTab, searchQuery, sortBy]);\n\n // Grouped by date\n const grouped = useMemo(() => groupByDate(filteredNotifications), [filteredNotifications]);\n\n // ---------------------------------------------------------------------------\n // Actions\n // ---------------------------------------------------------------------------\n\n const markAsRead = useCallback((id: string) => {\n setNotifications((prev) => prev.map((n) => (n.id === id ? { ...n, isRead: true } : n)));\n }, []);\n\n const markAllAsRead = useCallback(() => {\n setNotifications((prev) => prev.map((n) => ({ ...n, isRead: true })));\n }, []);\n\n const deleteNotification = useCallback((id: string) => {\n setNotifications((prev) => prev.filter((n) => n.id !== id));\n }, []);\n\n const handleAction = useCallback(\n (notif: Notification) => {\n if (!notif.isRead) markAsRead(notif.id);\n if (notif.actionUrl) navigateTo(notif.actionUrl);\n },\n [markAsRead, navigateTo]\n );\n\n const clearAll = useCallback(() => {\n if (window.confirm('Are you sure you want to clear all notifications?')) {\n setNotifications([]);\n }\n }, []);\n\n // ---------------------------------------------------------------------------\n // Render\n // ---------------------------------------------------------------------------\n\n return (\n <PageLayout\n title=\"Notifications\"\n description={\n unreadCount > 0\n ? `${unreadCount} unread notification${unreadCount !== 1 ? 's' : ''}`\n : 'All caught up!'\n }\n actions={\n <div className=\"flex items-center gap-2\">\n {notifications.length > 0 && (\n <button\n type=\"button\"\n onClick={clearAll}\n className=\"flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-accent transition-colors\"\n >\n <Trash2 className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Clear All</span>\n </button>\n )}\n {unreadCount > 0 && (\n <button\n type=\"button\"\n onClick={markAllAsRead}\n className=\"flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <CheckCheck className=\"h-4 w-4\" />\n Mark All Read\n </button>\n )}\n </div>\n }\n >\n {/* ---- Stats Overview ---- */}\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6\">\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-3 text-center\">\n <p className=\"text-2xl font-bold text-text-primary\">{notifications.length}</p>\n <p className=\"text-xs text-text-secondary\">Total</p>\n </div>\n <div className=\"rounded-lg border border-blue-500/30 bg-blue-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-blue-600 dark:text-blue-400\">{unreadCount}</p>\n <p className=\"text-xs text-text-secondary\">Unread</p>\n </div>\n <div className=\"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-red-600 dark:text-red-400\">{urgentCount}</p>\n <p className=\"text-xs text-text-secondary\">Urgent</p>\n </div>\n <div className=\"rounded-lg border border-green-500/30 bg-green-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-green-600 dark:text-green-400\">{todayCount}</p>\n <p className=\"text-xs text-text-secondary\">Today</p>\n </div>\n <div className=\"rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-3 text-center\">\n <p className=\"text-2xl font-bold text-yellow-600 dark:text-yellow-400\">{thisWeekCount}</p>\n <p className=\"text-xs text-text-secondary\">This Week</p>\n </div>\n </div>\n\n {/* ---- Tabs ---- */}\n <div className=\"flex items-center gap-2 mb-4 overflow-x-auto pb-1\">\n {tabs.map((tab) => {\n const TabIcon = tab.icon;\n return (\n <button\n key={tab.id}\n type=\"button\"\n onClick={() => setActiveTab(tab.id)}\n className={cn(\n 'flex items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1.5 text-sm font-medium transition-colors',\n activeTab === tab.id\n ? 'border-primary bg-action-primary-bg/10 text-text-primary'\n : 'border-border-subtle text-text-secondary hover:text-text-primary hover:border-accent-foreground/20'\n )}\n >\n <TabIcon className=\"h-3.5 w-3.5\" />\n {tab.label}\n <span\n className={cn(\n 'inline-flex h-5 min-w-[20px] items-center justify-center rounded-full px-1 text-xs',\n activeTab === tab.id\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'bg-bg-sunken text-text-secondary'\n )}\n >\n {tabCounts[tab.id]}\n </span>\n </button>\n );\n })}\n </div>\n\n {/* ---- Search & Sort ---- */}\n <div className=\"flex items-center gap-3 mb-6\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <input\n type=\"text\"\n placeholder=\"Search notifications...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-10 pr-9 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n {searchQuery && (\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n\n {/* Sort dropdown */}\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={() => setShowSortMenu(!showSortMenu)}\n className=\"flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <ArrowUpDown className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Sort</span>\n </button>\n {showSortMenu && (\n <>\n {/* Backdrop */}\n <div className=\"fixed inset-0 z-10\" onClick={() => setShowSortMenu(false)} />\n <div className=\"absolute right-0 top-full mt-1 z-20 w-44 rounded-lg border border-border-subtle bg-bg-surface shadow-lg py-1\">\n {(\n [\n { value: 'recent', label: 'Most Recent' },\n { value: 'priority', label: 'By Priority' },\n { value: 'unread', label: 'Unread First' },\n ] as const\n ).map((opt) => (\n <button\n key={opt.value}\n type=\"button\"\n onClick={() => {\n setSortBy(opt.value);\n setShowSortMenu(false);\n }}\n className={cn(\n 'w-full text-left px-3 py-2 text-sm transition-colors',\n sortBy === opt.value\n ? 'bg-action-primary-bg/10 text-text-primary font-medium'\n : 'text-text-secondary hover:bg-accent hover:text-text-primary'\n )}\n >\n {opt.label}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n </div>\n\n {/* ---- Notification List ---- */}\n {filteredNotifications.length === 0 ? (\n <EmptyState\n icon={<Bell className=\"h-12 w-12\" />}\n title=\"No notifications\"\n description={\n searchQuery\n ? 'No notifications match your search. Try different keywords.'\n : activeTab === 'unread'\n ? \"You're all caught up! No unread notifications.\"\n : 'No notifications in this category yet.'\n }\n action={\n searchQuery ? (\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n Clear Search\n </button>\n ) : activeTab !== 'all' ? (\n <button\n type=\"button\"\n onClick={() => setActiveTab('all')}\n className=\"rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n View All Notifications\n </button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"space-y-6\">\n {grouped.map((group) => (\n <div key={group.label}>\n {/* Date group header */}\n <div className=\"flex items-center gap-3 mb-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wider text-text-secondary\">\n {group.label}\n </h3>\n <div className=\"flex-1 border-t border-border-subtle\" />\n <span className=\"text-xs text-text-secondary\">\n {group.items.length} notification{group.items.length !== 1 ? 's' : ''}\n </span>\n </div>\n\n {/* Notification cards */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border overflow-hidden\">\n {group.items.map((notif) => {\n const config = typeConfig[notif.type] ?? typeConfig.system;\n const NotifIcon = config.icon;\n\n return (\n <div\n key={notif.id}\n className={cn(\n 'flex items-start gap-3 px-4 py-4 border-l-4 transition-colors',\n priorityBorderColors[notif.priority],\n !notif.isRead && 'bg-accent/30'\n )}\n >\n {/* Type icon */}\n <div\n className={cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-full',\n config.bg\n )}\n >\n <NotifIcon className={cn('h-5 w-5', config.color)} />\n </div>\n\n {/* Content */}\n <div className=\"flex-1 min-w-0\">\n {/* Title row */}\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h4\n className={cn(\n 'text-sm text-text-primary',\n !notif.isRead ? 'font-semibold' : 'font-medium'\n )}\n >\n {notif.title}\n </h4>\n {!notif.isRead && (\n <span className=\"h-2 w-2 rounded-full bg-action-primary-bg shrink-0\" />\n )}\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium',\n priorityStyles[notif.priority]\n )}\n >\n {notif.priority}\n </span>\n </div>\n\n {/* Message */}\n <p className=\"mt-1 text-sm text-text-secondary leading-relaxed\">\n {notif.message}\n </p>\n\n {/* Metadata row */}\n <div className=\"mt-2 flex items-center gap-3 flex-wrap\">\n <span className=\"flex items-center gap-1 text-xs text-text-secondary\">\n <Clock className=\"h-3 w-3\" />\n {formatRelativeTime(notif.createdAt)}\n </span>\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium',\n config.bg,\n config.color\n )}\n >\n {config.label}\n </span>\n {notif.metadata?.orderId && (\n <span className=\"text-xs text-text-secondary\">\n #{notif.metadata.orderId}\n </span>\n )}\n </div>\n\n {/* Action buttons row */}\n <div className=\"mt-3 flex items-center gap-2 flex-wrap\">\n {notif.actionUrl && (\n <button\n type=\"button\"\n onClick={() => handleAction(notif)}\n className=\"rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n {notif.actionText ?? 'View'}\n </button>\n )}\n {!notif.isRead && (\n <button\n type=\"button\"\n onClick={() => markAsRead(notif.id)}\n title=\"Mark as read\"\n className=\"flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n <Check className=\"h-3 w-3\" />\n Mark Read\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => deleteNotification(notif.id)}\n title=\"Delete notification\"\n className=\"flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors\"\n >\n <Trash2 className=\"h-3 w-3\" />\n Delete\n </button>\n </div>\n </div>\n\n {/* Read/unread indicator */}\n <div className=\"shrink-0 pt-1\">\n {notif.isRead ? (\n <MailOpen className=\"h-4 w-4 text-text-secondary/40\" />\n ) : (\n <Bell className=\"h-4 w-4 text-primary\" />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* ---- Footer summary ---- */}\n {filteredNotifications.length > 0 && (\n <div className=\"mt-6 flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface px-4 py-3\">\n <p className=\"text-sm text-text-secondary\">\n Showing {filteredNotifications.length} of {notifications.length} notifications\n </p>\n {activeTab !== 'all' && (\n <button\n type=\"button\"\n onClick={() => {\n setActiveTab('all');\n setSearchQuery('');\n }}\n className=\"flex items-center gap-1.5 text-sm font-medium text-primary hover:underline\"\n >\n <RefreshCw className=\"h-3.5 w-3.5\" />\n Show All\n </button>\n )}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;AAqFA,IAAM,IAAuC;CAC3C;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,MAAS,IAAK,EAAC,aAAa;EAC7D,WAAW;EACX,YAAY;EACZ,UAAU;GAAE,SAAS;GAAW,QAAQ;GAAY;EACrD;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,OAAU,IAAK,EAAC,aAAa;EAC9D,UAAU;GAAE,SAAS;GAAW,QAAQ;GAAK;EAC9C;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,SACE;EACF,UAAU;EACV,QAAQ;EACR,4BAAW,IAAI,KAAK,KAAK,KAAK,GAAG,OAAc,IAAK,EAAC,aAAa;EAClE,WAAW;EACX,YAAY;EACZ,UAAU,EAAE,QAAQ,YAAY;EAC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