@burdenoff/microfe-adaptercloud 2026.614.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.
- package/README.md +12 -0
- package/dist/adaptercloud/AdapterCloudRoot.js +177 -0
- package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -0
- package/dist/adaptercloud/AdapterCloudRoutes.js +215 -0
- package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -0
- package/dist/adaptercloud/components/EmptyState.js +28 -0
- package/dist/adaptercloud/components/EmptyState.js.map +1 -0
- package/dist/adaptercloud/components/InvestmentCard.js +96 -0
- package/dist/adaptercloud/components/InvestmentCard.js.map +1 -0
- package/dist/adaptercloud/components/MetricsCard.js +46 -0
- package/dist/adaptercloud/components/MetricsCard.js.map +1 -0
- package/dist/adaptercloud/components/PageLayout.js +26 -0
- package/dist/adaptercloud/components/PageLayout.js.map +1 -0
- package/dist/adaptercloud/components/RatingDisplay.js +35 -0
- package/dist/adaptercloud/components/RatingDisplay.js.map +1 -0
- package/dist/adaptercloud/components/StatusBadge.js +45 -0
- package/dist/adaptercloud/components/StatusBadge.js.map +1 -0
- package/dist/adaptercloud/context/AdapterCloudContext.js +93 -0
- package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -0
- package/dist/adaptercloud/context/index.js +1 -0
- package/dist/adaptercloud/hooks/useAdapterCloudApi.js +223 -0
- package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -0
- package/dist/adaptercloud/index.js +7 -0
- package/dist/adaptercloud/mocks/data.js +1517 -0
- package/dist/adaptercloud/mocks/data.js.map +1 -0
- package/dist/adaptercloud/mocks/users.js +34 -0
- package/dist/adaptercloud/mocks/users.js.map +1 -0
- package/dist/adaptercloud/pages/HomePage.js +921 -0
- package/dist/adaptercloud/pages/HomePage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +645 -0
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +639 -0
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +421 -0
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +660 -0
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +259 -0
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +649 -0
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +869 -0
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -0
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +893 -0
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +834 -0
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +700 -0
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +760 -0
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +886 -0
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +631 -0
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +913 -0
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +881 -0
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -0
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +833 -0
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -0
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +1325 -0
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -0
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +665 -0
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -0
- package/dist/adaptercloud/pages/common/SettingsPage.js +964 -0
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +593 -0
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +620 -0
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +547 -0
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +532 -0
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +496 -0
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +621 -0
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +623 -0
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +477 -0
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +438 -0
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +388 -0
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +488 -0
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +606 -0
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -0
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +443 -0
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +849 -0
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +939 -0
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +681 -0
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +419 -0
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +399 -0
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +569 -0
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -0
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +1065 -0
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -0
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +496 -0
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -0
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +634 -0
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -0
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +675 -0
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -0
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +687 -0
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -0
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +578 -0
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -0
- package/dist/adaptercloud/store/adaptercloudStore.js +38 -0
- package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -0
- package/dist/adaptercloud/store/index.js +1 -0
- package/dist/adaptercloud/utils/cn.js +10 -0
- package/dist/adaptercloud/utils/cn.js.map +1 -0
- package/dist/adaptercloud/utils/formatters.js +51 -0
- package/dist/adaptercloud/utils/formatters.js.map +1 -0
- package/dist/adaptercloud/utils/navigation.js +9 -0
- package/dist/adaptercloud/utils/navigation.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
+
import { formatRelativeTime as i } from "../../utils/formatters.js";
|
|
6
|
+
import { useCallback as a, useMemo as o, useState as s } from "react";
|
|
7
|
+
import { AlertCircle as c, AlertTriangle as l, ArrowUpDown as u, Bell as d, Check as f, CheckCheck as p, Clock as m, CreditCard as h, Inbox as g, MailOpen as _, Megaphone as v, RefreshCw as y, Search as b, ShoppingBag as x, Star as S, Trash2 as C, TrendingUp as w, Truck as T, UserCheck as E, Users as D, X as O } from "lucide-react";
|
|
8
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
9
|
+
//#region src/adaptercloud/pages/common/NotificationCenterPage.tsx
|
|
10
|
+
var M = [
|
|
11
|
+
{
|
|
12
|
+
id: "n-001",
|
|
13
|
+
type: "order_update",
|
|
14
|
+
title: "Order Delivered Successfully!",
|
|
15
|
+
message: "Your order #ORD-001 from Dosa Express has been delivered. Rate your experience to help others!",
|
|
16
|
+
priority: "medium",
|
|
17
|
+
isRead: !1,
|
|
18
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 480 * 1e3)).toISOString(),
|
|
19
|
+
actionUrl: "/customer/order/ORD-001",
|
|
20
|
+
actionText: "Rate Order",
|
|
21
|
+
metadata: {
|
|
22
|
+
orderId: "ORD-001",
|
|
23
|
+
cartId: "FOOD-001"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "n-002",
|
|
28
|
+
type: "payment",
|
|
29
|
+
title: "Payment Confirmed",
|
|
30
|
+
message: "Your payment of ₹495 for order #ORD-002 at Quick Cuts Salon has been processed successfully.",
|
|
31
|
+
priority: "medium",
|
|
32
|
+
isRead: !1,
|
|
33
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 2100 * 1e3)).toISOString(),
|
|
34
|
+
metadata: {
|
|
35
|
+
orderId: "ORD-002",
|
|
36
|
+
amount: 495
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "n-003",
|
|
41
|
+
type: "promotion",
|
|
42
|
+
title: "20% Off Beauty Services This Weekend!",
|
|
43
|
+
message: "Glow Beauty Services is offering 20% off on all treatments this weekend only. Don't miss out!",
|
|
44
|
+
priority: "low",
|
|
45
|
+
isRead: !1,
|
|
46
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 7200 * 1e3)).toISOString(),
|
|
47
|
+
actionUrl: "/customer/cart/SERV-002",
|
|
48
|
+
actionText: "Book Now",
|
|
49
|
+
metadata: { cartId: "SERV-002" }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "n-004",
|
|
53
|
+
type: "review",
|
|
54
|
+
title: "New Review Response",
|
|
55
|
+
message: "Dosa Express replied to your review: \"Thank you so much for your kind words! We hope to serve you again soon.\"",
|
|
56
|
+
priority: "low",
|
|
57
|
+
isRead: !1,
|
|
58
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 14400 * 1e3)).toISOString(),
|
|
59
|
+
actionUrl: "/customer/reviews",
|
|
60
|
+
actionText: "View Reply"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "n-005",
|
|
64
|
+
type: "system",
|
|
65
|
+
title: "App Update Available",
|
|
66
|
+
message: "Version 2.4.0 of AdapterCloud is available with improved performance, new category filters, and bug fixes.",
|
|
67
|
+
priority: "medium",
|
|
68
|
+
isRead: !1,
|
|
69
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 420 * 60 * 1e3)).toISOString(),
|
|
70
|
+
actionUrl: "/settings",
|
|
71
|
+
actionText: "Update Now"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "n-006",
|
|
75
|
+
type: "order_update",
|
|
76
|
+
title: "Appointment Confirmed",
|
|
77
|
+
message: "Your appointment at Quick Cuts Salon has been confirmed for tomorrow at 3:00 PM. The stylist Suresh will be serving you.",
|
|
78
|
+
priority: "medium",
|
|
79
|
+
isRead: !0,
|
|
80
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString(),
|
|
81
|
+
actionUrl: "/customer/order/ORD-002",
|
|
82
|
+
actionText: "View Details",
|
|
83
|
+
metadata: { orderId: "ORD-002" }
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "n-007",
|
|
87
|
+
type: "investment",
|
|
88
|
+
title: "Monthly Returns Credited",
|
|
89
|
+
message: "You received ₹1,250 in monthly returns from your Quick Cuts Salon investment. Total portfolio value: ₹2,12,500.",
|
|
90
|
+
priority: "medium",
|
|
91
|
+
isRead: !0,
|
|
92
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString(),
|
|
93
|
+
actionUrl: "/investor/portfolio",
|
|
94
|
+
actionText: "View Portfolio",
|
|
95
|
+
metadata: { amount: 1250 }
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "n-008",
|
|
99
|
+
type: "delivery",
|
|
100
|
+
title: "Delivery Worker Assigned",
|
|
101
|
+
message: "Ravi Kumar (rated 4.8) has been assigned to deliver your order from Biryani Pot. Estimated arrival: 25 minutes.",
|
|
102
|
+
priority: "high",
|
|
103
|
+
isRead: !0,
|
|
104
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 1.5 * 24 * 60 * 60 * 1e3)).toISOString(),
|
|
105
|
+
metadata: { orderId: "ORD-003" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "n-009",
|
|
109
|
+
type: "alert",
|
|
110
|
+
title: "Unusual Login Attempt Detected",
|
|
111
|
+
message: "We detected a login attempt from a new device in Mumbai. If this was not you, please change your password immediately.",
|
|
112
|
+
priority: "urgent",
|
|
113
|
+
isRead: !0,
|
|
114
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 2880 * 60 * 1e3)).toISOString(),
|
|
115
|
+
actionUrl: "/settings",
|
|
116
|
+
actionText: "Review Activity"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "n-010",
|
|
120
|
+
type: "promotion",
|
|
121
|
+
title: "Flash Sale: Mobile Accessories",
|
|
122
|
+
message: "Gadget Zone Brigade is running a flash sale! Up to 30% off on bluetooth headphones, cases, and chargers.",
|
|
123
|
+
priority: "low",
|
|
124
|
+
isRead: !0,
|
|
125
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 4320 * 60 * 1e3)).toISOString(),
|
|
126
|
+
actionUrl: "/customer/cart/RETAIL-003",
|
|
127
|
+
actionText: "Shop Now",
|
|
128
|
+
metadata: { cartId: "RETAIL-003" }
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "n-011",
|
|
132
|
+
type: "system",
|
|
133
|
+
title: "Scheduled Platform Maintenance",
|
|
134
|
+
message: "Platform maintenance is scheduled for Sunday 2:00 AM - 4:00 AM IST. Some services may be briefly unavailable during this window.",
|
|
135
|
+
priority: "high",
|
|
136
|
+
isRead: !0,
|
|
137
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 5760 * 60 * 1e3)).toISOString()
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "n-012",
|
|
141
|
+
type: "account",
|
|
142
|
+
title: "KYC Verification Complete",
|
|
143
|
+
message: "Your KYC verification has been completed successfully. You now have full access to all platform features including investments.",
|
|
144
|
+
priority: "medium",
|
|
145
|
+
isRead: !0,
|
|
146
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 7200 * 60 * 1e3)).toISOString()
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "n-013",
|
|
150
|
+
type: "staff",
|
|
151
|
+
title: "Staff Schedule Updated",
|
|
152
|
+
message: "Priya Sharma has updated her availability for this week. She will be unavailable on Wednesday and Thursday.",
|
|
153
|
+
priority: "medium",
|
|
154
|
+
isRead: !0,
|
|
155
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 8640 * 60 * 1e3)).toISOString(),
|
|
156
|
+
actionUrl: "/owner/staff",
|
|
157
|
+
actionText: "View Schedule"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "n-014",
|
|
161
|
+
type: "payment",
|
|
162
|
+
title: "Refund Processed",
|
|
163
|
+
message: "Your refund of ₹280 for order #ORD-005 has been processed. The amount will reflect in your account within 3-5 business days.",
|
|
164
|
+
priority: "medium",
|
|
165
|
+
isRead: !0,
|
|
166
|
+
createdAt: (/* @__PURE__ */ new Date(Date.now() - 10080 * 60 * 1e3)).toISOString(),
|
|
167
|
+
metadata: {
|
|
168
|
+
orderId: "ORD-005",
|
|
169
|
+
amount: 280
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
], N = {
|
|
173
|
+
order_update: {
|
|
174
|
+
icon: x,
|
|
175
|
+
color: "text-blue-600 dark:text-blue-400",
|
|
176
|
+
bg: "bg-blue-500/10",
|
|
177
|
+
label: "Order"
|
|
178
|
+
},
|
|
179
|
+
payment: {
|
|
180
|
+
icon: h,
|
|
181
|
+
color: "text-green-600 dark:text-green-400",
|
|
182
|
+
bg: "bg-green-500/10",
|
|
183
|
+
label: "Payment"
|
|
184
|
+
},
|
|
185
|
+
promotion: {
|
|
186
|
+
icon: v,
|
|
187
|
+
color: "text-orange-600 dark:text-orange-400",
|
|
188
|
+
bg: "bg-orange-500/10",
|
|
189
|
+
label: "Promo"
|
|
190
|
+
},
|
|
191
|
+
system: {
|
|
192
|
+
icon: c,
|
|
193
|
+
color: "text-purple-600 dark:text-purple-400",
|
|
194
|
+
bg: "bg-purple-500/10",
|
|
195
|
+
label: "System"
|
|
196
|
+
},
|
|
197
|
+
review: {
|
|
198
|
+
icon: S,
|
|
199
|
+
color: "text-yellow-600 dark:text-yellow-400",
|
|
200
|
+
bg: "bg-yellow-500/10",
|
|
201
|
+
label: "Review"
|
|
202
|
+
},
|
|
203
|
+
staff: {
|
|
204
|
+
icon: D,
|
|
205
|
+
color: "text-indigo-600 dark:text-indigo-400",
|
|
206
|
+
bg: "bg-indigo-500/10",
|
|
207
|
+
label: "Staff"
|
|
208
|
+
},
|
|
209
|
+
investment: {
|
|
210
|
+
icon: w,
|
|
211
|
+
color: "text-emerald-600 dark:text-emerald-400",
|
|
212
|
+
bg: "bg-emerald-500/10",
|
|
213
|
+
label: "Investment"
|
|
214
|
+
},
|
|
215
|
+
alert: {
|
|
216
|
+
icon: l,
|
|
217
|
+
color: "text-red-600 dark:text-red-400",
|
|
218
|
+
bg: "bg-red-500/10",
|
|
219
|
+
label: "Alert"
|
|
220
|
+
},
|
|
221
|
+
delivery: {
|
|
222
|
+
icon: T,
|
|
223
|
+
color: "text-cyan-600 dark:text-cyan-400",
|
|
224
|
+
bg: "bg-cyan-500/10",
|
|
225
|
+
label: "Delivery"
|
|
226
|
+
},
|
|
227
|
+
account: {
|
|
228
|
+
icon: E,
|
|
229
|
+
color: "text-teal-600 dark:text-teal-400",
|
|
230
|
+
bg: "bg-teal-500/10",
|
|
231
|
+
label: "Account"
|
|
232
|
+
}
|
|
233
|
+
}, P = {
|
|
234
|
+
urgent: "bg-red-500/20 text-red-600 dark:text-red-400",
|
|
235
|
+
high: "bg-orange-500/20 text-orange-600 dark:text-orange-400",
|
|
236
|
+
medium: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
|
|
237
|
+
low: "bg-muted text-muted-foreground"
|
|
238
|
+
}, F = {
|
|
239
|
+
urgent: "border-l-red-500",
|
|
240
|
+
high: "border-l-orange-500",
|
|
241
|
+
medium: "border-l-blue-500",
|
|
242
|
+
low: "border-l-border"
|
|
243
|
+
}, I = {
|
|
244
|
+
urgent: 4,
|
|
245
|
+
high: 3,
|
|
246
|
+
medium: 2,
|
|
247
|
+
low: 1
|
|
248
|
+
}, L = [
|
|
249
|
+
{
|
|
250
|
+
id: "all",
|
|
251
|
+
label: "All",
|
|
252
|
+
icon: g
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "orders",
|
|
256
|
+
label: "Orders",
|
|
257
|
+
icon: x
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: "promotions",
|
|
261
|
+
label: "Promotions",
|
|
262
|
+
icon: v
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "system",
|
|
266
|
+
label: "System",
|
|
267
|
+
icon: c
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "unread",
|
|
271
|
+
label: "Unread",
|
|
272
|
+
icon: d
|
|
273
|
+
}
|
|
274
|
+
];
|
|
275
|
+
function R(e) {
|
|
276
|
+
let t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = /* @__PURE__ */ new Date(r.getTime() - 1440 * 60 * 1e3);
|
|
277
|
+
return t >= r ? "Today" : t >= i ? "Yesterday" : "Earlier";
|
|
278
|
+
}
|
|
279
|
+
function z(e) {
|
|
280
|
+
let t = [], n = /* @__PURE__ */ new Map(), r = [
|
|
281
|
+
"Today",
|
|
282
|
+
"Yesterday",
|
|
283
|
+
"Earlier"
|
|
284
|
+
];
|
|
285
|
+
for (let t of e) {
|
|
286
|
+
let e = R(t.createdAt);
|
|
287
|
+
n.has(e) || n.set(e, []), n.get(e).push(t);
|
|
288
|
+
}
|
|
289
|
+
for (let e of r) {
|
|
290
|
+
let r = n.get(e);
|
|
291
|
+
r && r.length > 0 && t.push({
|
|
292
|
+
label: e,
|
|
293
|
+
items: r
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
return t;
|
|
297
|
+
}
|
|
298
|
+
function B() {
|
|
299
|
+
let { navigateTo: c } = e(), [l, h] = s(M), [g, v] = s("all"), [x, S] = s(""), [w, T] = s("recent"), [E, D] = s(!1), B = o(() => l.filter((e) => !e.isRead).length, [l]), V = o(() => l.filter((e) => e.priority === "urgent").length, [l]), H = o(() => l.filter((e) => R(e.createdAt) === "Today").length, [l]), U = o(() => {
|
|
300
|
+
let e = /* @__PURE__ */ new Date(Date.now() - 10080 * 60 * 1e3);
|
|
301
|
+
return l.filter((t) => new Date(t.createdAt) >= e).length;
|
|
302
|
+
}, [l]), W = o(() => {
|
|
303
|
+
let e = {
|
|
304
|
+
all: 0,
|
|
305
|
+
orders: 0,
|
|
306
|
+
promotions: 0,
|
|
307
|
+
system: 0,
|
|
308
|
+
unread: 0
|
|
309
|
+
};
|
|
310
|
+
for (let t of l) e.all++, t.isRead || e.unread++, (t.type === "order_update" || t.type === "delivery") && e.orders++, t.type === "promotion" && e.promotions++, (t.type === "system" || t.type === "alert" || t.type === "account") && e.system++;
|
|
311
|
+
return e;
|
|
312
|
+
}, [l]), G = o(() => {
|
|
313
|
+
let e = [...l];
|
|
314
|
+
switch (g) {
|
|
315
|
+
case "orders":
|
|
316
|
+
e = e.filter((e) => e.type === "order_update" || e.type === "delivery");
|
|
317
|
+
break;
|
|
318
|
+
case "promotions":
|
|
319
|
+
e = e.filter((e) => e.type === "promotion");
|
|
320
|
+
break;
|
|
321
|
+
case "system":
|
|
322
|
+
e = e.filter((e) => e.type === "system" || e.type === "alert" || e.type === "account");
|
|
323
|
+
break;
|
|
324
|
+
case "unread":
|
|
325
|
+
e = e.filter((e) => !e.isRead);
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
if (x) {
|
|
329
|
+
let t = x.toLowerCase();
|
|
330
|
+
e = e.filter((e) => e.title.toLowerCase().includes(t) || e.message.toLowerCase().includes(t));
|
|
331
|
+
}
|
|
332
|
+
switch (w) {
|
|
333
|
+
case "recent":
|
|
334
|
+
e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
|
|
335
|
+
break;
|
|
336
|
+
case "priority":
|
|
337
|
+
e.sort((e, t) => I[t.priority] - I[e.priority]);
|
|
338
|
+
break;
|
|
339
|
+
case "unread":
|
|
340
|
+
e.sort((e, t) => e.isRead === t.isRead ? 0 : e.isRead ? 1 : -1);
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
return e;
|
|
344
|
+
}, [
|
|
345
|
+
l,
|
|
346
|
+
g,
|
|
347
|
+
x,
|
|
348
|
+
w
|
|
349
|
+
]), K = o(() => z(G), [G]), q = a((e) => {
|
|
350
|
+
h((t) => t.map((t) => t.id === e ? {
|
|
351
|
+
...t,
|
|
352
|
+
isRead: !0
|
|
353
|
+
} : t));
|
|
354
|
+
}, []), J = a(() => {
|
|
355
|
+
h((e) => e.map((e) => ({
|
|
356
|
+
...e,
|
|
357
|
+
isRead: !0
|
|
358
|
+
})));
|
|
359
|
+
}, []), Y = a((e) => {
|
|
360
|
+
h((t) => t.filter((t) => t.id !== e));
|
|
361
|
+
}, []), X = a((e) => {
|
|
362
|
+
e.isRead || q(e.id), e.actionUrl && c(e.actionUrl);
|
|
363
|
+
}, [q, c]), Z = a(() => {
|
|
364
|
+
window.confirm("Are you sure you want to clear all notifications?") && h([]);
|
|
365
|
+
}, []);
|
|
366
|
+
return /* @__PURE__ */ j(n, {
|
|
367
|
+
title: "Notifications",
|
|
368
|
+
description: B > 0 ? `${B} unread notification${B === 1 ? "" : "s"}` : "All caught up!",
|
|
369
|
+
actions: /* @__PURE__ */ j("div", {
|
|
370
|
+
className: "flex items-center gap-2",
|
|
371
|
+
children: [l.length > 0 && /* @__PURE__ */ j("button", {
|
|
372
|
+
type: "button",
|
|
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",
|
|
375
|
+
children: [/* @__PURE__ */ A(C, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
|
|
376
|
+
className: "hidden sm:inline",
|
|
377
|
+
children: "Clear All"
|
|
378
|
+
})]
|
|
379
|
+
}), B > 0 && /* @__PURE__ */ j("button", {
|
|
380
|
+
type: "button",
|
|
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",
|
|
383
|
+
children: [/* @__PURE__ */ A(p, { className: "h-4 w-4" }), "Mark All Read"]
|
|
384
|
+
})]
|
|
385
|
+
}),
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ j("div", {
|
|
388
|
+
className: "grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6",
|
|
389
|
+
children: [
|
|
390
|
+
/* @__PURE__ */ j("div", {
|
|
391
|
+
className: "rounded-lg border border-border bg-card p-3 text-center",
|
|
392
|
+
children: [/* @__PURE__ */ A("p", {
|
|
393
|
+
className: "text-2xl font-bold text-foreground",
|
|
394
|
+
children: l.length
|
|
395
|
+
}), /* @__PURE__ */ A("p", {
|
|
396
|
+
className: "text-xs text-muted-foreground",
|
|
397
|
+
children: "Total"
|
|
398
|
+
})]
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ j("div", {
|
|
401
|
+
className: "rounded-lg border border-blue-500/30 bg-blue-500/5 p-3 text-center",
|
|
402
|
+
children: [/* @__PURE__ */ A("p", {
|
|
403
|
+
className: "text-2xl font-bold text-blue-600 dark:text-blue-400",
|
|
404
|
+
children: B
|
|
405
|
+
}), /* @__PURE__ */ A("p", {
|
|
406
|
+
className: "text-xs text-muted-foreground",
|
|
407
|
+
children: "Unread"
|
|
408
|
+
})]
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ j("div", {
|
|
411
|
+
className: "rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-center",
|
|
412
|
+
children: [/* @__PURE__ */ A("p", {
|
|
413
|
+
className: "text-2xl font-bold text-red-600 dark:text-red-400",
|
|
414
|
+
children: V
|
|
415
|
+
}), /* @__PURE__ */ A("p", {
|
|
416
|
+
className: "text-xs text-muted-foreground",
|
|
417
|
+
children: "Urgent"
|
|
418
|
+
})]
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ j("div", {
|
|
421
|
+
className: "rounded-lg border border-green-500/30 bg-green-500/5 p-3 text-center",
|
|
422
|
+
children: [/* @__PURE__ */ A("p", {
|
|
423
|
+
className: "text-2xl font-bold text-green-600 dark:text-green-400",
|
|
424
|
+
children: H
|
|
425
|
+
}), /* @__PURE__ */ A("p", {
|
|
426
|
+
className: "text-xs text-muted-foreground",
|
|
427
|
+
children: "Today"
|
|
428
|
+
})]
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ j("div", {
|
|
431
|
+
className: "rounded-lg border border-yellow-500/30 bg-yellow-500/5 p-3 text-center",
|
|
432
|
+
children: [/* @__PURE__ */ A("p", {
|
|
433
|
+
className: "text-2xl font-bold text-yellow-600 dark:text-yellow-400",
|
|
434
|
+
children: U
|
|
435
|
+
}), /* @__PURE__ */ A("p", {
|
|
436
|
+
className: "text-xs text-muted-foreground",
|
|
437
|
+
children: "This Week"
|
|
438
|
+
})]
|
|
439
|
+
})
|
|
440
|
+
]
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ A("div", {
|
|
443
|
+
className: "flex items-center gap-2 mb-4 overflow-x-auto pb-1",
|
|
444
|
+
children: L.map((e) => {
|
|
445
|
+
let n = e.icon;
|
|
446
|
+
return /* @__PURE__ */ j("button", {
|
|
447
|
+
type: "button",
|
|
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"),
|
|
450
|
+
children: [
|
|
451
|
+
/* @__PURE__ */ A(n, { className: "h-3.5 w-3.5" }),
|
|
452
|
+
e.label,
|
|
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"),
|
|
455
|
+
children: W[e.id]
|
|
456
|
+
})
|
|
457
|
+
]
|
|
458
|
+
}, e.id);
|
|
459
|
+
})
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ j("div", {
|
|
462
|
+
className: "flex items-center gap-3 mb-6",
|
|
463
|
+
children: [/* @__PURE__ */ j("div", {
|
|
464
|
+
className: "relative flex-1",
|
|
465
|
+
children: [
|
|
466
|
+
/* @__PURE__ */ A(b, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
467
|
+
/* @__PURE__ */ A("input", {
|
|
468
|
+
type: "text",
|
|
469
|
+
placeholder: "Search notifications...",
|
|
470
|
+
value: x,
|
|
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"
|
|
473
|
+
}),
|
|
474
|
+
x && /* @__PURE__ */ A("button", {
|
|
475
|
+
type: "button",
|
|
476
|
+
onClick: () => S(""),
|
|
477
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
|
|
478
|
+
children: /* @__PURE__ */ A(O, { className: "h-4 w-4" })
|
|
479
|
+
})
|
|
480
|
+
]
|
|
481
|
+
}), /* @__PURE__ */ j("div", {
|
|
482
|
+
className: "relative",
|
|
483
|
+
children: [/* @__PURE__ */ j("button", {
|
|
484
|
+
type: "button",
|
|
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",
|
|
487
|
+
children: [/* @__PURE__ */ A(u, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
|
|
488
|
+
className: "hidden sm:inline",
|
|
489
|
+
children: "Sort"
|
|
490
|
+
})]
|
|
491
|
+
}), E && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("div", {
|
|
492
|
+
className: "fixed inset-0 z-10",
|
|
493
|
+
onClick: () => D(!1)
|
|
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",
|
|
496
|
+
children: [
|
|
497
|
+
{
|
|
498
|
+
value: "recent",
|
|
499
|
+
label: "Most Recent"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
value: "priority",
|
|
503
|
+
label: "By Priority"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
value: "unread",
|
|
507
|
+
label: "Unread First"
|
|
508
|
+
}
|
|
509
|
+
].map((e) => /* @__PURE__ */ A("button", {
|
|
510
|
+
type: "button",
|
|
511
|
+
onClick: () => {
|
|
512
|
+
T(e.value), D(!1);
|
|
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"),
|
|
515
|
+
children: e.label
|
|
516
|
+
}, e.value))
|
|
517
|
+
})] })]
|
|
518
|
+
})]
|
|
519
|
+
}),
|
|
520
|
+
G.length === 0 ? /* @__PURE__ */ A(r, {
|
|
521
|
+
icon: /* @__PURE__ */ A(d, { className: "h-12 w-12" }),
|
|
522
|
+
title: "No notifications",
|
|
523
|
+
description: x ? "No notifications match your search. Try different keywords." : g === "unread" ? "You're all caught up! No unread notifications." : "No notifications in this category yet.",
|
|
524
|
+
action: x ? /* @__PURE__ */ A("button", {
|
|
525
|
+
type: "button",
|
|
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",
|
|
528
|
+
children: "Clear Search"
|
|
529
|
+
}) : g === "all" ? void 0 : /* @__PURE__ */ A("button", {
|
|
530
|
+
type: "button",
|
|
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",
|
|
533
|
+
children: "View All Notifications"
|
|
534
|
+
})
|
|
535
|
+
}) : /* @__PURE__ */ A("div", {
|
|
536
|
+
className: "space-y-6",
|
|
537
|
+
children: K.map((e) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
|
|
538
|
+
className: "flex items-center gap-3 mb-2",
|
|
539
|
+
children: [
|
|
540
|
+
/* @__PURE__ */ A("h3", {
|
|
541
|
+
className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground",
|
|
542
|
+
children: e.label
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ A("div", { className: "flex-1 border-t border-border" }),
|
|
545
|
+
/* @__PURE__ */ j("span", {
|
|
546
|
+
className: "text-xs text-muted-foreground",
|
|
547
|
+
children: [
|
|
548
|
+
e.items.length,
|
|
549
|
+
" notification",
|
|
550
|
+
e.items.length === 1 ? "" : "s"
|
|
551
|
+
]
|
|
552
|
+
})
|
|
553
|
+
]
|
|
554
|
+
}), /* @__PURE__ */ A("div", {
|
|
555
|
+
className: "rounded-lg border border-border bg-card divide-y divide-border overflow-hidden",
|
|
556
|
+
children: e.items.map((e) => {
|
|
557
|
+
let n = N[e.type] ?? N.system, r = n.icon;
|
|
558
|
+
return /* @__PURE__ */ j("div", {
|
|
559
|
+
className: t("flex items-start gap-3 px-4 py-4 border-l-4 transition-colors", F[e.priority], !e.isRead && "bg-accent/30"),
|
|
560
|
+
children: [
|
|
561
|
+
/* @__PURE__ */ A("div", {
|
|
562
|
+
className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-full", n.bg),
|
|
563
|
+
children: /* @__PURE__ */ A(r, { className: t("h-5 w-5", n.color) })
|
|
564
|
+
}),
|
|
565
|
+
/* @__PURE__ */ j("div", {
|
|
566
|
+
className: "flex-1 min-w-0",
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ j("div", {
|
|
569
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
570
|
+
children: [
|
|
571
|
+
/* @__PURE__ */ A("h4", {
|
|
572
|
+
className: t("text-sm text-foreground", e.isRead ? "font-medium" : "font-semibold"),
|
|
573
|
+
children: e.title
|
|
574
|
+
}),
|
|
575
|
+
!e.isRead && /* @__PURE__ */ A("span", { className: "h-2 w-2 rounded-full bg-primary shrink-0" }),
|
|
576
|
+
/* @__PURE__ */ A("span", {
|
|
577
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", P[e.priority]),
|
|
578
|
+
children: e.priority
|
|
579
|
+
})
|
|
580
|
+
]
|
|
581
|
+
}),
|
|
582
|
+
/* @__PURE__ */ A("p", {
|
|
583
|
+
className: "mt-1 text-sm text-muted-foreground leading-relaxed",
|
|
584
|
+
children: e.message
|
|
585
|
+
}),
|
|
586
|
+
/* @__PURE__ */ j("div", {
|
|
587
|
+
className: "mt-2 flex items-center gap-3 flex-wrap",
|
|
588
|
+
children: [
|
|
589
|
+
/* @__PURE__ */ j("span", {
|
|
590
|
+
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
591
|
+
children: [/* @__PURE__ */ A(m, { className: "h-3 w-3" }), i(e.createdAt)]
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ A("span", {
|
|
594
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", n.bg, n.color),
|
|
595
|
+
children: n.label
|
|
596
|
+
}),
|
|
597
|
+
e.metadata?.orderId && /* @__PURE__ */ j("span", {
|
|
598
|
+
className: "text-xs text-muted-foreground",
|
|
599
|
+
children: ["#", e.metadata.orderId]
|
|
600
|
+
})
|
|
601
|
+
]
|
|
602
|
+
}),
|
|
603
|
+
/* @__PURE__ */ j("div", {
|
|
604
|
+
className: "mt-3 flex items-center gap-2 flex-wrap",
|
|
605
|
+
children: [
|
|
606
|
+
e.actionUrl && /* @__PURE__ */ A("button", {
|
|
607
|
+
type: "button",
|
|
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",
|
|
610
|
+
children: e.actionText ?? "View"
|
|
611
|
+
}),
|
|
612
|
+
!e.isRead && /* @__PURE__ */ j("button", {
|
|
613
|
+
type: "button",
|
|
614
|
+
onClick: () => q(e.id),
|
|
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",
|
|
617
|
+
children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Mark Read"]
|
|
618
|
+
}),
|
|
619
|
+
/* @__PURE__ */ j("button", {
|
|
620
|
+
type: "button",
|
|
621
|
+
onClick: () => Y(e.id),
|
|
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",
|
|
624
|
+
children: [/* @__PURE__ */ A(C, { className: "h-3 w-3" }), "Delete"]
|
|
625
|
+
})
|
|
626
|
+
]
|
|
627
|
+
})
|
|
628
|
+
]
|
|
629
|
+
}),
|
|
630
|
+
/* @__PURE__ */ A("div", {
|
|
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" })
|
|
633
|
+
})
|
|
634
|
+
]
|
|
635
|
+
}, e.id);
|
|
636
|
+
})
|
|
637
|
+
})] }, e.label))
|
|
638
|
+
}),
|
|
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",
|
|
641
|
+
children: [/* @__PURE__ */ j("p", {
|
|
642
|
+
className: "text-sm text-muted-foreground",
|
|
643
|
+
children: [
|
|
644
|
+
"Showing ",
|
|
645
|
+
G.length,
|
|
646
|
+
" of ",
|
|
647
|
+
l.length,
|
|
648
|
+
" notifications"
|
|
649
|
+
]
|
|
650
|
+
}), g !== "all" && /* @__PURE__ */ j("button", {
|
|
651
|
+
type: "button",
|
|
652
|
+
onClick: () => {
|
|
653
|
+
v("all"), S("");
|
|
654
|
+
},
|
|
655
|
+
className: "flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
|
|
656
|
+
children: [/* @__PURE__ */ A(y, { className: "h-3.5 w-3.5" }), "Show All"]
|
|
657
|
+
})]
|
|
658
|
+
})
|
|
659
|
+
]
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
export { B as NotificationCenterPage };
|
|
664
|
+
|
|
665
|
+
//# sourceMappingURL=NotificationCenterPage.js.map
|