@burdenoff/microfe-channel 2026.527.1 → 2026.530.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/dist/channel/ChannelRoutes.js +5 -5
- package/dist/channel/ChannelRoutes.js.map +1 -1
- package/dist/channel/constants/permissions.js +3 -0
- package/dist/channel/constants/permissions.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +227 -221
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +392 -391
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +216 -212
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +99 -98
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +129 -126
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +40 -50
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/dist/channel/pages/ChannelLandingPage.js +50 -34
- package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,16 +2,17 @@ import { nativeImpact as e, nativeNotify as t } from "../../../../utils/nativeBr
|
|
|
2
2
|
import { useChannel as n } from "../../../hooks/useChannels.js";
|
|
3
3
|
import { PermissionGuard as r } from "../../../components/PermissionGuard.js";
|
|
4
4
|
import { CHANNEL_PERMISSIONS as i } from "../../../constants/permissions.js";
|
|
5
|
-
import { AUTH_TYPE_I18N as
|
|
6
|
-
import { AdapterCredentialsForm as
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { useI18n as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import { useLocation as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { AUTH_TYPE_I18N as ee, HEALTH_I18N as te, PLATFORM_I18N as ne, STATUS_I18N as re, translateLabel as a } from "../i18n.js";
|
|
6
|
+
import { AdapterCredentialsForm as ie, CredentialValidationStatus as ae } from "../../../components/AdapterCredentialsForm.js";
|
|
7
|
+
import { useEffect as oe, useState as o } from "react";
|
|
8
|
+
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as me, Plus as he, Power as ge, PowerOff as h, Radio as _e, RefreshCw as ve, Save as ye, Send as g, Trash2 as be, Truck as _, Users as xe, X as v, XCircle as y } from "lucide-react";
|
|
10
|
+
import { useLocation as Se, useNavigate as Ce, useParams as we } from "react-router-dom";
|
|
11
|
+
import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
+
import { TagBadge as Ee } from "@burdenoff/fe-libs/tag";
|
|
13
14
|
//#region src/channel/modules/channels/pages/ChannelDetailsPage.tsx
|
|
14
|
-
var
|
|
15
|
+
var S = {
|
|
15
16
|
EMAIL: {
|
|
16
17
|
label: "Email",
|
|
17
18
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -52,143 +53,143 @@ var w = {
|
|
|
52
53
|
label: "Webchat",
|
|
53
54
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
54
55
|
}
|
|
55
|
-
},
|
|
56
|
+
}, C = {
|
|
56
57
|
ACTIVE: {
|
|
57
58
|
label: "Active",
|
|
58
59
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
59
|
-
icon:
|
|
60
|
+
icon: d
|
|
60
61
|
},
|
|
61
62
|
INACTIVE: {
|
|
62
63
|
label: "Inactive",
|
|
63
64
|
color: "text-muted-foreground bg-muted",
|
|
64
|
-
icon:
|
|
65
|
+
icon: h
|
|
65
66
|
},
|
|
66
67
|
ERROR: {
|
|
67
68
|
label: "Error",
|
|
68
69
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
69
|
-
icon:
|
|
70
|
+
icon: y
|
|
70
71
|
},
|
|
71
72
|
SUSPENDED: {
|
|
72
73
|
label: "Suspended",
|
|
73
74
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
74
|
-
icon:
|
|
75
|
+
icon: c
|
|
75
76
|
},
|
|
76
77
|
ARCHIVED: {
|
|
77
78
|
label: "Archived",
|
|
78
79
|
color: "text-muted-foreground bg-muted",
|
|
79
|
-
icon:
|
|
80
|
+
icon: h
|
|
80
81
|
}
|
|
81
|
-
},
|
|
82
|
+
}, w = {
|
|
82
83
|
HEALTHY: {
|
|
83
84
|
label: "Healthy",
|
|
84
85
|
color: "text-status-success-text",
|
|
85
|
-
icon:
|
|
86
|
+
icon: d
|
|
86
87
|
},
|
|
87
88
|
DEGRADED: {
|
|
88
89
|
label: "Degraded",
|
|
89
90
|
color: "text-status-warning-text",
|
|
90
|
-
icon:
|
|
91
|
+
icon: c
|
|
91
92
|
},
|
|
92
93
|
UNHEALTHY: {
|
|
93
94
|
label: "Unhealthy",
|
|
94
95
|
color: "text-status-error-text",
|
|
95
|
-
icon:
|
|
96
|
+
icon: y
|
|
96
97
|
},
|
|
97
98
|
UNKNOWN: {
|
|
98
99
|
label: "Unknown",
|
|
99
100
|
color: "text-muted-foreground",
|
|
100
|
-
icon:
|
|
101
|
+
icon: f
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
function
|
|
104
|
-
let { channelId:
|
|
105
|
-
let n =
|
|
104
|
+
function T() {
|
|
105
|
+
let { channelId: c } = we(), f = Ce(), T = Se(), { hasPermission: E } = Te(), D = E(i.CHANNEL_UPDATE), De = E(i.CHANNEL_CONNECTION_CREATE), Oe = E(i.CHANNEL_CONNECTION_UPDATE), { t: ke } = se(), O = (e, t) => {
|
|
106
|
+
let n = ke(e);
|
|
106
107
|
return n === e ? t : n;
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
(
|
|
108
|
+
}, k = T.state, [A, j] = o(null), [M, N] = o(k?.showCredentialsForm || !1), [P, F] = o(k?.pendingCredentials || {}), [Ae, I] = o(!1), [L, R] = o(null), [je, z] = o(!1), [B, V] = o(""), [H, Me] = o(() => O("channel.testNotificationSubject", "Test Notification")), [U, Ne] = o(() => O("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [W, G] = o(null);
|
|
109
|
+
oe(() => {
|
|
110
|
+
(k?.pendingCredentials || k?.showCredentialsForm) && f(T.pathname, {
|
|
110
111
|
replace: !0,
|
|
111
112
|
state: null
|
|
112
113
|
});
|
|
113
114
|
}, []);
|
|
114
|
-
let { channel:
|
|
115
|
-
|
|
115
|
+
let { channel: K, isLoading: Pe, error: q, updateChannel: Fe, runHealthCheck: Ie, createConnection: Le, updateConnection: Re, deleteConnection: ze, testConnection: Be, sendTestNotification: Ve } = n(c), He = async () => {
|
|
116
|
+
j("health");
|
|
116
117
|
try {
|
|
117
|
-
await
|
|
118
|
+
await Ie();
|
|
118
119
|
} catch (e) {
|
|
119
120
|
console.error("[channel] Failed to run health check", e);
|
|
120
121
|
} finally {
|
|
121
|
-
|
|
122
|
+
j(null);
|
|
122
123
|
}
|
|
123
|
-
},
|
|
124
|
-
if (
|
|
125
|
-
|
|
124
|
+
}, Ue = async () => {
|
|
125
|
+
if (K) {
|
|
126
|
+
j("status");
|
|
126
127
|
try {
|
|
127
|
-
await
|
|
128
|
+
await Fe({ status: K.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
|
|
128
129
|
} catch (e) {
|
|
129
130
|
console.error("[channel] Failed to toggle channel status", e);
|
|
130
131
|
} finally {
|
|
131
|
-
|
|
132
|
+
j(null);
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
},
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
}, We = async () => {
|
|
136
|
+
if (K) {
|
|
137
|
+
j("connection");
|
|
137
138
|
try {
|
|
138
|
-
let e = "API_KEY", t =
|
|
139
|
-
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await
|
|
139
|
+
let e = "API_KEY", t = K.adapterType;
|
|
140
|
+
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await Le({
|
|
140
141
|
authType: e,
|
|
141
|
-
credentials:
|
|
142
|
-
}),
|
|
142
|
+
credentials: P
|
|
143
|
+
}), N(!1), F({}), I(!1);
|
|
143
144
|
} catch (e) {
|
|
144
145
|
console.error("[channel] Failed to create connection", e);
|
|
145
146
|
} finally {
|
|
146
|
-
|
|
147
|
+
j(null);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
|
-
},
|
|
150
|
-
|
|
150
|
+
}, Ge = async (e) => {
|
|
151
|
+
j("connection");
|
|
151
152
|
try {
|
|
152
|
-
await
|
|
153
|
+
await Re(e, { credentials: P }), N(!1), F({}), I(!1);
|
|
153
154
|
} catch (e) {
|
|
154
155
|
console.error("[channel] Failed to update connection", e);
|
|
155
156
|
} finally {
|
|
156
|
-
|
|
157
|
+
j(null);
|
|
157
158
|
}
|
|
158
|
-
},
|
|
159
|
-
e("medium"),
|
|
159
|
+
}, Ke = async (n) => {
|
|
160
|
+
e("medium"), j("delete-connection");
|
|
160
161
|
try {
|
|
161
|
-
await
|
|
162
|
+
await ze(n), t("success");
|
|
162
163
|
} catch (e) {
|
|
163
164
|
t("error"), console.error("[channel] Failed to delete connection", e);
|
|
164
165
|
} finally {
|
|
165
|
-
|
|
166
|
+
j(null);
|
|
166
167
|
}
|
|
167
|
-
},
|
|
168
|
-
|
|
168
|
+
}, qe = async (e) => {
|
|
169
|
+
j("test"), R(null);
|
|
169
170
|
try {
|
|
170
|
-
let t = await
|
|
171
|
-
t &&
|
|
171
|
+
let t = await Be(e);
|
|
172
|
+
t && R({
|
|
172
173
|
success: t.success,
|
|
173
|
-
message: t.message || (t.success ?
|
|
174
|
+
message: t.message || (t.success ? O("channel.connectionTestSuccess", "Connection successful!") : O("channel.connectionTestFailed", "Connection failed"))
|
|
174
175
|
});
|
|
175
176
|
} catch (e) {
|
|
176
|
-
console.error("[channel] Failed to test connection", e),
|
|
177
|
+
console.error("[channel] Failed to test connection", e), R({
|
|
177
178
|
success: !1,
|
|
178
|
-
message:
|
|
179
|
+
message: O("channel.connectionTestRequestFailed", "Failed to test connection")
|
|
179
180
|
});
|
|
180
181
|
} finally {
|
|
181
|
-
|
|
182
|
+
j(null);
|
|
182
183
|
}
|
|
183
|
-
},
|
|
184
|
-
if (
|
|
185
|
-
|
|
184
|
+
}, Je = async () => {
|
|
185
|
+
if (B.trim()) {
|
|
186
|
+
j("send-test"), G(null);
|
|
186
187
|
try {
|
|
187
|
-
let e =
|
|
188
|
-
subject:
|
|
189
|
-
html: `<p>${
|
|
190
|
-
} : void 0, t = await
|
|
191
|
-
t &&
|
|
188
|
+
let e = K?.platform === "EMAIL" ? {
|
|
189
|
+
subject: H,
|
|
190
|
+
html: `<p>${U}</p>`
|
|
191
|
+
} : void 0, t = await Ve(B.trim(), U, e);
|
|
192
|
+
t && G({
|
|
192
193
|
success: t.success,
|
|
193
194
|
messageId: t.messageId,
|
|
194
195
|
externalId: t.externalId,
|
|
@@ -201,8 +202,8 @@ function D() {
|
|
|
201
202
|
} : null
|
|
202
203
|
});
|
|
203
204
|
} catch (e) {
|
|
204
|
-
let t = e instanceof Error ? e.message :
|
|
205
|
-
console.error("[channel] Failed to send test notification", e),
|
|
205
|
+
let t = e instanceof Error ? e.message : O("channel.sendTestNotificationFailed", "Failed to send test notification");
|
|
206
|
+
console.error("[channel] Failed to send test notification", e), G({
|
|
206
207
|
success: !1,
|
|
207
208
|
error: {
|
|
208
209
|
code: "SEND_FAILED",
|
|
@@ -211,387 +212,387 @@ function D() {
|
|
|
211
212
|
}
|
|
212
213
|
});
|
|
213
214
|
} finally {
|
|
214
|
-
|
|
215
|
+
j(null);
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
|
-
},
|
|
218
|
+
}, J = (e) => {
|
|
218
219
|
switch (e) {
|
|
219
|
-
case "EMAIL": return
|
|
220
|
-
case "SMS": return
|
|
221
|
-
case "PUSH": return
|
|
222
|
-
case "SLACK": return
|
|
223
|
-
case "TEAMS": return
|
|
224
|
-
case "DISCORD": return
|
|
225
|
-
case "WHATSAPP": return
|
|
226
|
-
default: return
|
|
220
|
+
case "EMAIL": return O("channel.recipientPlaceholder.email", "email@example.com");
|
|
221
|
+
case "SMS": return O("channel.recipientPlaceholder.phone", "+1234567890");
|
|
222
|
+
case "PUSH": return O("channel.recipientPlaceholder.deviceToken", "Device token");
|
|
223
|
+
case "SLACK": return O("channel.recipientPlaceholder.slack", "Channel ID or User ID");
|
|
224
|
+
case "TEAMS": return O("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
225
|
+
case "DISCORD": return O("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
226
|
+
case "WHATSAPP": return O("channel.recipientPlaceholder.phone", "+1234567890");
|
|
227
|
+
default: return O("channel.recipientPlaceholder.default", "Recipient");
|
|
227
228
|
}
|
|
228
|
-
},
|
|
229
|
+
}, Y = (e) => {
|
|
229
230
|
switch (e) {
|
|
230
|
-
case "EMAIL": return
|
|
231
|
+
case "EMAIL": return O("channel.recipientLabel.email", "Email Address");
|
|
231
232
|
case "SMS":
|
|
232
|
-
case "WHATSAPP": return
|
|
233
|
-
case "PUSH": return
|
|
233
|
+
case "WHATSAPP": return O("channel.recipientLabel.phone", "Phone Number");
|
|
234
|
+
case "PUSH": return O("channel.recipientLabel.deviceToken", "Device Token");
|
|
234
235
|
case "SLACK":
|
|
235
236
|
case "TEAMS":
|
|
236
|
-
case "DISCORD": return
|
|
237
|
-
default: return
|
|
237
|
+
case "DISCORD": return O("channel.recipientLabel.channelOrUserId", "Channel/User ID");
|
|
238
|
+
default: return O("channel.recipientLabel.default", "Recipient");
|
|
238
239
|
}
|
|
239
|
-
},
|
|
240
|
-
...
|
|
240
|
+
}, Ye = (e) => ({
|
|
241
|
+
...S[e] || {
|
|
241
242
|
label: e,
|
|
242
243
|
color: "bg-bg-sunken text-text-secondary"
|
|
243
244
|
},
|
|
244
|
-
label:
|
|
245
|
-
}),
|
|
246
|
-
...
|
|
247
|
-
label:
|
|
248
|
-
}),
|
|
249
|
-
...
|
|
250
|
-
label:
|
|
245
|
+
label: a(e, ne, O)
|
|
246
|
+
}), Xe = (e) => ({
|
|
247
|
+
...C[e] || C.INACTIVE,
|
|
248
|
+
label: a(e, re, O)
|
|
249
|
+
}), Ze = (e) => ({
|
|
250
|
+
...w[e] || w.UNKNOWN,
|
|
251
|
+
label: a(e, te, O)
|
|
251
252
|
});
|
|
252
|
-
if (
|
|
253
|
+
if (Pe) return /* @__PURE__ */ b("div", {
|
|
253
254
|
className: "flex items-center justify-center min-h-screen",
|
|
254
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ b(p, {
|
|
255
256
|
size: 32,
|
|
256
257
|
className: "animate-spin text-accent-primary"
|
|
257
258
|
})
|
|
258
259
|
});
|
|
259
|
-
if (
|
|
260
|
+
if (q || !K) return /* @__PURE__ */ b("div", {
|
|
260
261
|
className: "p-6",
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ x("div", {
|
|
262
263
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
263
264
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ b(s, {
|
|
265
266
|
size: 20,
|
|
266
267
|
className: "text-status-error-text"
|
|
267
268
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ b("div", { children: /* @__PURE__ */ b("p", {
|
|
269
270
|
className: "text-sm font-medium text-status-error-text",
|
|
270
|
-
children:
|
|
271
|
+
children: q || O("channel.channelNotFound", "Channel not found")
|
|
271
272
|
}) }),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ b("button", {
|
|
273
274
|
type: "button",
|
|
274
|
-
onClick: () =>
|
|
275
|
+
onClick: () => f(-1),
|
|
275
276
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
276
|
-
children:
|
|
277
|
+
children: O("channel.goBack", "Go Back")
|
|
277
278
|
})
|
|
278
279
|
]
|
|
279
280
|
})
|
|
280
281
|
});
|
|
281
|
-
let X =
|
|
282
|
-
return /* @__PURE__ */
|
|
282
|
+
let X = Ye(K.platform), Z = Xe(K.status), Q = Ze(K.connectionHealth), Qe = Z.icon, $e = Q.icon, $ = K.connection;
|
|
283
|
+
return /* @__PURE__ */ b(r, {
|
|
283
284
|
permission: i.CHANNEL_READ,
|
|
284
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ x("div", {
|
|
285
286
|
className: "space-y-6 p-3 sm:p-6",
|
|
286
287
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ x("div", {
|
|
288
289
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ x("div", {
|
|
290
291
|
className: "flex items-center gap-3",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ b("button", {
|
|
292
293
|
type: "button",
|
|
293
|
-
onClick: () =>
|
|
294
|
+
onClick: () => f(-1),
|
|
294
295
|
className: "p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ b(ce, { size: 20 })
|
|
297
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
297
298
|
className: "flex items-center gap-2",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ b(_e, {
|
|
299
300
|
size: 24,
|
|
300
301
|
className: "text-accent-primary"
|
|
301
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ b("h1", {
|
|
302
303
|
className: "text-xl sm:text-2xl font-bold text-foreground",
|
|
303
|
-
children:
|
|
304
|
+
children: K.name
|
|
304
305
|
})]
|
|
305
|
-
}),
|
|
306
|
+
}), K.description && /* @__PURE__ */ b("p", {
|
|
306
307
|
className: "text-sm text-muted-foreground mt-1",
|
|
307
|
-
children:
|
|
308
|
+
children: K.description
|
|
308
309
|
})] })]
|
|
309
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ x("div", {
|
|
310
311
|
className: "flex items-center gap-2",
|
|
311
312
|
children: [
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ b(r, {
|
|
313
314
|
permission: i.CHANNEL_EXECUTE,
|
|
314
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ x("button", {
|
|
315
316
|
type: "button",
|
|
316
|
-
onClick:
|
|
317
|
-
disabled:
|
|
317
|
+
onClick: He,
|
|
318
|
+
disabled: A === "health",
|
|
318
319
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground hover:text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
319
|
-
children: [
|
|
320
|
+
children: [A === "health" ? /* @__PURE__ */ b(p, {
|
|
320
321
|
size: 16,
|
|
321
322
|
className: "animate-spin"
|
|
322
|
-
}) : /* @__PURE__ */
|
|
323
|
+
}) : /* @__PURE__ */ b(ve, { size: 16 }), O("channel.healthCheck", "Health Check")]
|
|
323
324
|
})
|
|
324
325
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ b(r, {
|
|
326
327
|
permission: i.CHANNEL_UPDATE,
|
|
327
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ x("button", {
|
|
328
329
|
type: "button",
|
|
329
|
-
onClick:
|
|
330
|
-
disabled:
|
|
331
|
-
className: `flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors disabled:opacity-50 ${
|
|
332
|
-
children: [
|
|
330
|
+
onClick: Ue,
|
|
331
|
+
disabled: A === "status",
|
|
332
|
+
className: `flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors disabled:opacity-50 ${K.status === "ACTIVE" ? "text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-status-success-text hover:bg-status-success-bg-subtle"}`,
|
|
333
|
+
children: [A === "status" ? /* @__PURE__ */ b(p, {
|
|
333
334
|
size: 16,
|
|
334
335
|
className: "animate-spin"
|
|
335
|
-
}) :
|
|
336
|
+
}) : K.status === "ACTIVE" ? /* @__PURE__ */ b(h, { size: 16 }) : /* @__PURE__ */ b(ge, { size: 16 }), K.status === "ACTIVE" ? O("channel.deactivate", "Deactivate") : O("channel.activate", "Activate")]
|
|
336
337
|
})
|
|
337
338
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ x("button", {
|
|
339
340
|
type: "button",
|
|
340
341
|
onClick: () => {
|
|
341
|
-
|
|
342
|
+
z(!0), G(null), V("");
|
|
342
343
|
},
|
|
343
|
-
disabled: !
|
|
344
|
+
disabled: !K.connection,
|
|
344
345
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
345
|
-
title:
|
|
346
|
-
children: [/* @__PURE__ */
|
|
346
|
+
title: K.connection ? O("channel.sendTestNotification", "Send test notification") : O("channel.configureCredentialsFirst", "Configure credentials first"),
|
|
347
|
+
children: [/* @__PURE__ */ b(g, { size: 16 }), O("channel.testChannel", "Test Channel")]
|
|
347
348
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
D && /* @__PURE__ */ x("button", {
|
|
349
350
|
type: "button",
|
|
350
|
-
onClick: () =>
|
|
351
|
+
onClick: () => f("./edit"),
|
|
351
352
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors shadow-sm",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.edit", "Edit")]
|
|
353
354
|
})
|
|
354
355
|
]
|
|
355
356
|
})]
|
|
356
357
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ x("div", {
|
|
358
359
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
359
360
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ x("div", {
|
|
361
362
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ b("p", {
|
|
363
364
|
className: "text-xs text-muted-foreground mb-1",
|
|
364
|
-
children:
|
|
365
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: O("channel.platform", "Platform")
|
|
366
|
+
}), /* @__PURE__ */ b("span", {
|
|
366
367
|
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${X.color}`,
|
|
367
368
|
children: X.label
|
|
368
369
|
})]
|
|
369
370
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ x("div", {
|
|
371
372
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ b("p", {
|
|
373
374
|
className: "text-xs text-muted-foreground mb-1",
|
|
374
|
-
children:
|
|
375
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: O("channel.status", "Status")
|
|
376
|
+
}), /* @__PURE__ */ x("div", {
|
|
376
377
|
className: "flex items-center gap-2",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ b(Qe, {
|
|
378
379
|
size: 16,
|
|
379
380
|
className: Z.color.split(" ")[0]
|
|
380
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ b("span", {
|
|
381
382
|
className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
|
|
382
383
|
children: Z.label
|
|
383
384
|
})]
|
|
384
385
|
})]
|
|
385
386
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ x("div", {
|
|
387
388
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
388
389
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ b("p", {
|
|
390
391
|
className: "text-xs text-muted-foreground mb-1",
|
|
391
|
-
children:
|
|
392
|
+
children: O("channel.connectionHealth", "Connection Health")
|
|
392
393
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ x("div", {
|
|
394
395
|
className: "flex items-center gap-2",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ b($e, {
|
|
396
397
|
size: 16,
|
|
397
398
|
className: Q.color
|
|
398
|
-
}), /* @__PURE__ */
|
|
399
|
+
}), /* @__PURE__ */ b("span", {
|
|
399
400
|
className: `text-sm font-medium ${Q.color}`,
|
|
400
401
|
children: Q.label
|
|
401
402
|
})]
|
|
402
403
|
}),
|
|
403
|
-
|
|
404
|
+
K.lastHealthCheckAt && /* @__PURE__ */ x("p", {
|
|
404
405
|
className: "text-xs text-muted-foreground mt-1",
|
|
405
406
|
children: [
|
|
406
|
-
|
|
407
|
+
O("channel.lastCheck", "Last check"),
|
|
407
408
|
":",
|
|
408
409
|
" ",
|
|
409
|
-
new Date(
|
|
410
|
+
new Date(K.lastHealthCheckAt).toLocaleString()
|
|
410
411
|
]
|
|
411
412
|
})
|
|
412
413
|
]
|
|
413
414
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ x("div", {
|
|
415
416
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ b("p", {
|
|
417
418
|
className: "text-xs text-muted-foreground mb-1",
|
|
418
|
-
children:
|
|
419
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: O("channel.connection", "Connection")
|
|
420
|
+
}), /* @__PURE__ */ x("div", {
|
|
420
421
|
className: "flex items-center gap-2",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ b(u, {
|
|
422
423
|
size: 16,
|
|
423
|
-
className:
|
|
424
|
-
}), /* @__PURE__ */
|
|
425
|
-
className: `text-sm font-medium ${
|
|
426
|
-
children:
|
|
424
|
+
className: K.isConnected ? "text-status-success-text" : "text-muted-foreground"
|
|
425
|
+
}), /* @__PURE__ */ b("span", {
|
|
426
|
+
className: `text-sm font-medium ${K.isConnected ? "text-status-success-text" : "text-muted-foreground"}`,
|
|
427
|
+
children: K.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
|
|
427
428
|
})]
|
|
428
429
|
})]
|
|
429
430
|
})
|
|
430
431
|
]
|
|
431
432
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ x("div", {
|
|
433
434
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
434
435
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ b("h2", {
|
|
436
437
|
className: "text-lg font-semibold text-foreground mb-4",
|
|
437
|
-
children:
|
|
438
|
+
children: O("channel.channelDetails", "Channel Details")
|
|
438
439
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ x("div", {
|
|
440
441
|
className: "grid gap-4 sm:grid-cols-2",
|
|
441
442
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
443
444
|
className: "text-xs text-muted-foreground",
|
|
444
|
-
children:
|
|
445
|
-
}), /* @__PURE__ */
|
|
445
|
+
children: O("channel.adapterType", "Adapter Type")
|
|
446
|
+
}), /* @__PURE__ */ b("p", {
|
|
446
447
|
className: "text-sm font-medium text-foreground",
|
|
447
|
-
children:
|
|
448
|
+
children: K.adapterType?.replace(/_/g, " ") || O("channel.notConfigured", "Not configured")
|
|
448
449
|
})] }),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
450
451
|
className: "text-xs text-muted-foreground",
|
|
451
|
-
children:
|
|
452
|
-
}), /* @__PURE__ */
|
|
452
|
+
children: O("channel.priority", "Priority")
|
|
453
|
+
}), /* @__PURE__ */ b("p", {
|
|
453
454
|
className: "text-sm font-medium text-foreground",
|
|
454
|
-
children:
|
|
455
|
+
children: K.priority
|
|
455
456
|
})] }),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
457
458
|
className: "text-xs text-muted-foreground",
|
|
458
|
-
children:
|
|
459
|
-
}), /* @__PURE__ */
|
|
459
|
+
children: O("channel.consecutiveFailures", "Consecutive Failures")
|
|
460
|
+
}), /* @__PURE__ */ b("p", {
|
|
460
461
|
className: "text-sm font-medium text-foreground",
|
|
461
|
-
children:
|
|
462
|
+
children: K.consecutiveFailures
|
|
462
463
|
})] }),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
464
465
|
className: "text-xs text-muted-foreground",
|
|
465
|
-
children:
|
|
466
|
-
}), /* @__PURE__ */
|
|
466
|
+
children: O("channel.messages24h", "Messages (24h)")
|
|
467
|
+
}), /* @__PURE__ */ b("p", {
|
|
467
468
|
className: "text-sm font-medium text-foreground",
|
|
468
|
-
children:
|
|
469
|
+
children: K.messageCount24h
|
|
469
470
|
})] }),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
471
472
|
className: "text-xs text-muted-foreground",
|
|
472
|
-
children:
|
|
473
|
-
}), /* @__PURE__ */
|
|
473
|
+
children: O("channel.createdAt", "Created At")
|
|
474
|
+
}), /* @__PURE__ */ b("p", {
|
|
474
475
|
className: "text-sm font-medium text-foreground",
|
|
475
|
-
children: new Date(
|
|
476
|
+
children: new Date(K.createdAt).toLocaleString()
|
|
476
477
|
})] }),
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
478
479
|
className: "text-xs text-muted-foreground",
|
|
479
|
-
children:
|
|
480
|
-
}), /* @__PURE__ */
|
|
480
|
+
children: O("channel.updatedAt", "Updated At")
|
|
481
|
+
}), /* @__PURE__ */ b("p", {
|
|
481
482
|
className: "text-sm font-medium text-foreground",
|
|
482
|
-
children: new Date(
|
|
483
|
+
children: new Date(K.updatedAt).toLocaleString()
|
|
483
484
|
})] })
|
|
484
485
|
]
|
|
485
486
|
}),
|
|
486
|
-
|
|
487
|
+
K.tagAssignments && K.tagAssignments.length > 0 && /* @__PURE__ */ x("div", {
|
|
487
488
|
className: "mt-4",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ b("p", {
|
|
489
490
|
className: "text-xs text-muted-foreground mb-1.5",
|
|
490
|
-
children:
|
|
491
|
-
}), /* @__PURE__ */
|
|
491
|
+
children: O("channel.tags", "Tags")
|
|
492
|
+
}), /* @__PURE__ */ b("div", {
|
|
492
493
|
className: "flex flex-wrap gap-1.5",
|
|
493
494
|
"aria-label": "Channel tags",
|
|
494
|
-
children:
|
|
495
|
+
children: K.tagAssignments.map((e) => /* @__PURE__ */ b(Ee, {
|
|
495
496
|
id: e.tagId,
|
|
496
497
|
label: e.tagId,
|
|
497
498
|
size: "md"
|
|
498
499
|
}, e.id))
|
|
499
500
|
})]
|
|
500
501
|
}),
|
|
501
|
-
|
|
502
|
+
K.healthCheckError && /* @__PURE__ */ x("div", {
|
|
502
503
|
className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
503
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ b("p", {
|
|
504
505
|
className: "text-xs text-status-error-text font-medium",
|
|
505
|
-
children:
|
|
506
|
-
}), /* @__PURE__ */
|
|
506
|
+
children: O("channel.lastHealthCheckError", "Last Health Check Error")
|
|
507
|
+
}), /* @__PURE__ */ b("p", {
|
|
507
508
|
className: "text-sm text-status-error-text",
|
|
508
|
-
children:
|
|
509
|
+
children: K.healthCheckError
|
|
509
510
|
})]
|
|
510
511
|
})
|
|
511
512
|
]
|
|
512
513
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ x("div", {
|
|
514
515
|
className: "grid gap-3 sm:grid-cols-3",
|
|
515
516
|
children: [
|
|
516
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ x("button", {
|
|
517
518
|
type: "button",
|
|
518
|
-
onClick: () =>
|
|
519
|
+
onClick: () => f("./deliveries"),
|
|
519
520
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
520
521
|
children: [
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ b("div", {
|
|
522
523
|
className: "p-2 bg-accent-orange/10 rounded-lg",
|
|
523
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ b(_, {
|
|
524
525
|
size: 18,
|
|
525
526
|
className: "text-accent-orange"
|
|
526
527
|
})
|
|
527
528
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ x("div", {
|
|
529
530
|
className: "flex-1 min-w-0",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ b("p", {
|
|
531
532
|
className: "text-sm font-medium text-foreground",
|
|
532
|
-
children:
|
|
533
|
-
}), /* @__PURE__ */
|
|
533
|
+
children: O("channel.deliveryHistory", "Delivery History")
|
|
534
|
+
}), /* @__PURE__ */ b("p", {
|
|
534
535
|
className: "text-xs text-muted-foreground truncate",
|
|
535
|
-
children:
|
|
536
|
+
children: O("channel.viewMessageDeliveries", "View message deliveries")
|
|
536
537
|
})]
|
|
537
538
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ b(l, {
|
|
539
540
|
size: 16,
|
|
540
541
|
className: "text-muted-foreground shrink-0"
|
|
541
542
|
})
|
|
542
543
|
]
|
|
543
544
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ x("button", {
|
|
545
546
|
type: "button",
|
|
546
|
-
onClick: () =>
|
|
547
|
+
onClick: () => f("./webhooks"),
|
|
547
548
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
548
549
|
children: [
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ b("div", {
|
|
550
551
|
className: "p-2 bg-accent-purple/10 rounded-lg",
|
|
551
|
-
children: /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ b(le, {
|
|
552
553
|
size: 18,
|
|
553
554
|
className: "text-accent-purple"
|
|
554
555
|
})
|
|
555
556
|
}),
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ x("div", {
|
|
557
558
|
className: "flex-1 min-w-0",
|
|
558
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ b("p", {
|
|
559
560
|
className: "text-sm font-medium text-foreground",
|
|
560
|
-
children:
|
|
561
|
-
}), /* @__PURE__ */
|
|
561
|
+
children: O("channel.webhookEvents", "Webhook Events")
|
|
562
|
+
}), /* @__PURE__ */ b("p", {
|
|
562
563
|
className: "text-xs text-muted-foreground truncate",
|
|
563
|
-
children:
|
|
564
|
+
children: O("channel.viewIncomingWebhooks", "View incoming webhooks")
|
|
564
565
|
})]
|
|
565
566
|
}),
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ b(l, {
|
|
567
568
|
size: 16,
|
|
568
569
|
className: "text-muted-foreground shrink-0"
|
|
569
570
|
})
|
|
570
571
|
]
|
|
571
572
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ x("button", {
|
|
573
574
|
type: "button",
|
|
574
|
-
onClick: () =>
|
|
575
|
+
onClick: () => f("./users"),
|
|
575
576
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
576
577
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ b("div", {
|
|
578
579
|
className: "p-2 bg-accent-blue/10 rounded-lg",
|
|
579
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ b(xe, {
|
|
580
581
|
size: 18,
|
|
581
582
|
className: "text-accent-blue"
|
|
582
583
|
})
|
|
583
584
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ x("div", {
|
|
585
586
|
className: "flex-1 min-w-0",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ b("p", {
|
|
587
588
|
className: "text-sm font-medium text-foreground",
|
|
588
|
-
children:
|
|
589
|
-
}), /* @__PURE__ */
|
|
589
|
+
children: O("channel.channelUsers", "Channel Users")
|
|
590
|
+
}), /* @__PURE__ */ b("p", {
|
|
590
591
|
className: "text-xs text-muted-foreground truncate",
|
|
591
|
-
children:
|
|
592
|
+
children: O("channel.viewConnectedUsers", "View connected users")
|
|
592
593
|
})]
|
|
593
594
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ b(l, {
|
|
595
596
|
size: 16,
|
|
596
597
|
className: "text-muted-foreground shrink-0"
|
|
597
598
|
})
|
|
@@ -599,365 +600,365 @@ function D() {
|
|
|
599
600
|
})
|
|
600
601
|
]
|
|
601
602
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ x("div", {
|
|
603
604
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
604
605
|
children: [
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ x("div", {
|
|
606
607
|
className: "flex items-center justify-between mb-4",
|
|
607
|
-
children: [/* @__PURE__ */
|
|
608
|
+
children: [/* @__PURE__ */ x("div", {
|
|
608
609
|
className: "flex items-center gap-2",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
610
|
+
children: [/* @__PURE__ */ b(ue, {
|
|
610
611
|
size: 20,
|
|
611
612
|
className: "text-accent-primary"
|
|
612
|
-
}), /* @__PURE__ */
|
|
613
|
+
}), /* @__PURE__ */ b("h2", {
|
|
613
614
|
className: "text-lg font-semibold text-foreground",
|
|
614
|
-
children:
|
|
615
|
+
children: O("channel.connectionAndCredentials", "Connection & Credentials")
|
|
615
616
|
})]
|
|
616
|
-
}), !$ && !
|
|
617
|
+
}), De && !$ && !M && /* @__PURE__ */ x("button", {
|
|
617
618
|
type: "button",
|
|
618
|
-
onClick: () =>
|
|
619
|
+
onClick: () => N(!0),
|
|
619
620
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
|
|
620
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ b(he, { size: 16 }), O("channel.addCredentials", "Add Credentials")]
|
|
621
622
|
})]
|
|
622
623
|
}),
|
|
623
|
-
$ && !
|
|
624
|
+
$ && !M && /* @__PURE__ */ x("div", {
|
|
624
625
|
className: "space-y-4",
|
|
625
626
|
children: [
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ x("div", {
|
|
627
628
|
className: "grid gap-4 sm:grid-cols-2",
|
|
628
629
|
children: [
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
630
631
|
className: "text-xs text-muted-foreground",
|
|
631
|
-
children:
|
|
632
|
-
}), /* @__PURE__ */
|
|
632
|
+
children: O("channel.authType", "Auth Type")
|
|
633
|
+
}), /* @__PURE__ */ b("p", {
|
|
633
634
|
className: "text-sm font-medium text-foreground",
|
|
634
|
-
children:
|
|
635
|
+
children: a($.authType, ee, O)
|
|
635
636
|
})] }),
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
637
638
|
className: "text-xs text-muted-foreground",
|
|
638
|
-
children:
|
|
639
|
-
}), /* @__PURE__ */
|
|
639
|
+
children: O("channel.status", "Status")
|
|
640
|
+
}), /* @__PURE__ */ x("div", {
|
|
640
641
|
className: "flex items-center gap-2",
|
|
641
|
-
children: [$.isHealthy ? /* @__PURE__ */
|
|
642
|
+
children: [$.isHealthy ? /* @__PURE__ */ b(d, {
|
|
642
643
|
size: 14,
|
|
643
644
|
className: "text-status-success-text"
|
|
644
|
-
}) : /* @__PURE__ */
|
|
645
|
+
}) : /* @__PURE__ */ b(y, {
|
|
645
646
|
size: 14,
|
|
646
647
|
className: "text-status-error-text"
|
|
647
|
-
}), /* @__PURE__ */
|
|
648
|
+
}), /* @__PURE__ */ b("span", {
|
|
648
649
|
className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
|
|
649
|
-
children: $.isHealthy ?
|
|
650
|
+
children: $.isHealthy ? O("channel.healthy", "Healthy") : O("channel.unhealthy", "Unhealthy")
|
|
650
651
|
})]
|
|
651
652
|
})] }),
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
653
654
|
className: "text-xs text-muted-foreground",
|
|
654
|
-
children:
|
|
655
|
-
}), /* @__PURE__ */
|
|
655
|
+
children: O("channel.lastTested", "Last Tested")
|
|
656
|
+
}), /* @__PURE__ */ b("p", {
|
|
656
657
|
className: "text-sm font-medium text-foreground",
|
|
657
|
-
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() :
|
|
658
|
+
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : O("channel.never", "Never")
|
|
658
659
|
})] }),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
660
661
|
className: "text-xs text-muted-foreground",
|
|
661
|
-
children:
|
|
662
|
-
}), /* @__PURE__ */
|
|
662
|
+
children: O("channel.testStatus", "Test Status")
|
|
663
|
+
}), /* @__PURE__ */ b("p", {
|
|
663
664
|
className: "text-sm font-medium text-foreground",
|
|
664
|
-
children: $.testStatus ||
|
|
665
|
+
children: $.testStatus || O("channel.notTested", "Not tested")
|
|
665
666
|
})] }),
|
|
666
|
-
$.tokenExpiresAt && /* @__PURE__ */
|
|
667
|
+
$.tokenExpiresAt && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
667
668
|
className: "text-xs text-muted-foreground",
|
|
668
|
-
children:
|
|
669
|
-
}), /* @__PURE__ */
|
|
669
|
+
children: O("channel.tokenExpires", "Token Expires")
|
|
670
|
+
}), /* @__PURE__ */ x("p", {
|
|
670
671
|
className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-foreground"}`,
|
|
671
|
-
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */
|
|
672
|
+
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ x("span", {
|
|
672
673
|
className: "text-xs text-muted-foreground ml-1",
|
|
673
674
|
children: [
|
|
674
675
|
"(",
|
|
675
676
|
$.daysUntilExpiry,
|
|
676
677
|
" ",
|
|
677
|
-
|
|
678
|
+
O("channel.days", "days"),
|
|
678
679
|
")"
|
|
679
680
|
]
|
|
680
681
|
})]
|
|
681
682
|
})] })
|
|
682
683
|
]
|
|
683
684
|
}),
|
|
684
|
-
|
|
685
|
-
className: `p-3 rounded-lg ${
|
|
686
|
-
children: /* @__PURE__ */
|
|
685
|
+
L && /* @__PURE__ */ b("div", {
|
|
686
|
+
className: `p-3 rounded-lg ${L.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
687
|
+
children: /* @__PURE__ */ x("div", {
|
|
687
688
|
className: "flex items-center gap-2",
|
|
688
|
-
children: [
|
|
689
|
+
children: [L.success ? /* @__PURE__ */ b(d, {
|
|
689
690
|
size: 16,
|
|
690
691
|
className: "text-status-success-text"
|
|
691
|
-
}) : /* @__PURE__ */
|
|
692
|
+
}) : /* @__PURE__ */ b(y, {
|
|
692
693
|
size: 16,
|
|
693
694
|
className: "text-status-error-text"
|
|
694
|
-
}), /* @__PURE__ */
|
|
695
|
-
className: `text-sm font-medium ${
|
|
696
|
-
children:
|
|
695
|
+
}), /* @__PURE__ */ b("p", {
|
|
696
|
+
className: `text-sm font-medium ${L.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
697
|
+
children: L.message
|
|
697
698
|
})]
|
|
698
699
|
})
|
|
699
700
|
}),
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ x("div", {
|
|
701
702
|
className: "flex items-center gap-2 pt-2",
|
|
702
703
|
children: [
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ b(r, {
|
|
704
705
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
705
|
-
children: /* @__PURE__ */
|
|
706
|
+
children: /* @__PURE__ */ x("button", {
|
|
706
707
|
type: "button",
|
|
707
|
-
onClick: () =>
|
|
708
|
-
disabled:
|
|
708
|
+
onClick: () => qe($.id),
|
|
709
|
+
disabled: A === "test",
|
|
709
710
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
710
|
-
children: [
|
|
711
|
+
children: [A === "test" ? /* @__PURE__ */ b(p, {
|
|
711
712
|
size: 16,
|
|
712
713
|
className: "animate-spin"
|
|
713
|
-
}) : /* @__PURE__ */
|
|
714
|
+
}) : /* @__PURE__ */ b(me, { size: 16 }), O("channel.testConnection", "Test Connection")]
|
|
714
715
|
})
|
|
715
716
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
+
Oe && /* @__PURE__ */ x("button", {
|
|
717
718
|
type: "button",
|
|
718
719
|
onClick: () => {
|
|
719
|
-
|
|
720
|
+
N(!0), F($?.platformMetadata ?? {});
|
|
720
721
|
},
|
|
721
722
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground hover:text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors",
|
|
722
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.updateCredentials", "Update Credentials")]
|
|
723
724
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ b(r, {
|
|
725
726
|
permission: i.CHANNEL_CONNECTION_DELETE,
|
|
726
|
-
children: /* @__PURE__ */
|
|
727
|
+
children: /* @__PURE__ */ x("button", {
|
|
727
728
|
type: "button",
|
|
728
|
-
onClick: () =>
|
|
729
|
-
disabled:
|
|
729
|
+
onClick: () => Ke($.id),
|
|
730
|
+
disabled: A === "delete-connection",
|
|
730
731
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
731
|
-
children: [
|
|
732
|
+
children: [A === "delete-connection" ? /* @__PURE__ */ b(p, {
|
|
732
733
|
size: 16,
|
|
733
734
|
className: "animate-spin"
|
|
734
|
-
}) : /* @__PURE__ */
|
|
735
|
+
}) : /* @__PURE__ */ b(be, { size: 16 }), O("channel.remove", "Remove")]
|
|
735
736
|
})
|
|
736
737
|
})
|
|
737
738
|
]
|
|
738
739
|
})
|
|
739
740
|
]
|
|
740
741
|
}),
|
|
741
|
-
!$ && !
|
|
742
|
+
!$ && !M && /* @__PURE__ */ x("div", {
|
|
742
743
|
className: "text-center py-8",
|
|
743
744
|
children: [
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ b(u, {
|
|
745
746
|
size: 32,
|
|
746
747
|
className: "mx-auto text-muted-foreground mb-3"
|
|
747
748
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ b("p", {
|
|
749
750
|
className: "text-sm text-muted-foreground mb-2",
|
|
750
|
-
children:
|
|
751
|
+
children: O("channel.noCredentialsConfigured", "No credentials configured for this channel")
|
|
751
752
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ b("p", {
|
|
753
754
|
className: "text-xs text-muted-foreground",
|
|
754
|
-
children:
|
|
755
|
+
children: O("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
|
|
755
756
|
})
|
|
756
757
|
]
|
|
757
758
|
}),
|
|
758
|
-
|
|
759
|
+
M && /* @__PURE__ */ x("div", {
|
|
759
760
|
className: "space-y-4",
|
|
760
761
|
children: [
|
|
761
|
-
!
|
|
762
|
+
!K.adapterType && /* @__PURE__ */ b("div", {
|
|
762
763
|
className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
|
|
763
|
-
children: /* @__PURE__ */
|
|
764
|
+
children: /* @__PURE__ */ x("div", {
|
|
764
765
|
className: "flex items-start gap-2",
|
|
765
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ b(s, {
|
|
766
767
|
size: 16,
|
|
767
768
|
className: "text-accent-orange mt-0.5"
|
|
768
|
-
}), /* @__PURE__ */
|
|
769
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
769
770
|
className: "text-sm font-medium text-accent-orange",
|
|
770
|
-
children:
|
|
771
|
-
}), /* @__PURE__ */
|
|
771
|
+
children: O("channel.noAdapterTypeConfigured", "No adapter type configured")
|
|
772
|
+
}), /* @__PURE__ */ b("p", {
|
|
772
773
|
className: "text-xs text-muted-foreground mt-1",
|
|
773
|
-
children:
|
|
774
|
+
children: O("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
|
|
774
775
|
})] })]
|
|
775
776
|
})
|
|
776
777
|
}),
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
adapterType:
|
|
779
|
-
credentials:
|
|
780
|
-
onChange:
|
|
781
|
-
onValidationChange: (e) =>
|
|
782
|
-
disabled:
|
|
778
|
+
/* @__PURE__ */ b(ie, {
|
|
779
|
+
adapterType: K.adapterType ?? void 0,
|
|
780
|
+
credentials: P,
|
|
781
|
+
onChange: F,
|
|
782
|
+
onValidationChange: (e) => I(e),
|
|
783
|
+
disabled: A === "connection"
|
|
783
784
|
}),
|
|
784
|
-
|
|
785
|
+
K.adapterType && /* @__PURE__ */ b("div", {
|
|
785
786
|
className: "pt-2",
|
|
786
|
-
children: /* @__PURE__ */
|
|
787
|
-
adapterType:
|
|
788
|
-
credentials:
|
|
787
|
+
children: /* @__PURE__ */ b(ae, {
|
|
788
|
+
adapterType: K.adapterType,
|
|
789
|
+
credentials: P
|
|
789
790
|
})
|
|
790
791
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ x("div", {
|
|
792
793
|
className: "flex items-center gap-2 pt-2 border-t border-border",
|
|
793
|
-
children: [/* @__PURE__ */
|
|
794
|
+
children: [/* @__PURE__ */ b(r, {
|
|
794
795
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
795
|
-
children: /* @__PURE__ */
|
|
796
|
+
children: /* @__PURE__ */ x("button", {
|
|
796
797
|
type: "button",
|
|
797
798
|
onClick: () => {
|
|
798
|
-
$ ?
|
|
799
|
+
$ ? Ge($.id) : We();
|
|
799
800
|
},
|
|
800
|
-
disabled:
|
|
801
|
+
disabled: A === "connection" || !Ae && !!K.adapterType,
|
|
801
802
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
802
|
-
children: [
|
|
803
|
+
children: [A === "connection" ? /* @__PURE__ */ b(p, {
|
|
803
804
|
size: 16,
|
|
804
805
|
className: "animate-spin"
|
|
805
|
-
}) : /* @__PURE__ */
|
|
806
|
+
}) : /* @__PURE__ */ b(ye, { size: 16 }), $ ? O("channel.updateCredentials", "Update Credentials") : O("channel.saveCredentials", "Save Credentials")]
|
|
806
807
|
})
|
|
807
|
-
}), /* @__PURE__ */
|
|
808
|
+
}), /* @__PURE__ */ x("button", {
|
|
808
809
|
type: "button",
|
|
809
810
|
onClick: () => {
|
|
810
|
-
|
|
811
|
+
N(!1), F({}), I(!1);
|
|
811
812
|
},
|
|
812
813
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-muted-foreground hover:bg-muted rounded-lg transition-colors",
|
|
813
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), O("channel.cancel", "Cancel")]
|
|
814
815
|
})]
|
|
815
816
|
})
|
|
816
817
|
]
|
|
817
818
|
})
|
|
818
819
|
]
|
|
819
820
|
}),
|
|
820
|
-
|
|
821
|
+
je && /* @__PURE__ */ b("div", {
|
|
821
822
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
822
|
-
children: /* @__PURE__ */
|
|
823
|
+
children: /* @__PURE__ */ x("div", {
|
|
823
824
|
className: "w-full max-w-md mx-4 p-6 bg-surface border border-border rounded-lg shadow-xl",
|
|
824
|
-
children: [/* @__PURE__ */
|
|
825
|
+
children: [/* @__PURE__ */ x("div", {
|
|
825
826
|
className: "flex items-center justify-between mb-4",
|
|
826
|
-
children: [/* @__PURE__ */
|
|
827
|
+
children: [/* @__PURE__ */ x("div", {
|
|
827
828
|
className: "flex items-center gap-2",
|
|
828
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ b(g, {
|
|
829
830
|
size: 20,
|
|
830
831
|
className: "text-accent-primary"
|
|
831
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ x("h3", {
|
|
832
833
|
className: "text-lg font-semibold text-foreground",
|
|
833
834
|
children: [
|
|
834
835
|
"Test ",
|
|
835
|
-
|
|
836
|
+
S[K.platform]?.label || K.platform,
|
|
836
837
|
" Channel"
|
|
837
838
|
]
|
|
838
839
|
})]
|
|
839
|
-
}), /* @__PURE__ */
|
|
840
|
+
}), /* @__PURE__ */ b("button", {
|
|
840
841
|
type: "button",
|
|
841
|
-
onClick: () =>
|
|
842
|
+
onClick: () => z(!1),
|
|
842
843
|
className: "p-1 text-muted-foreground hover:text-foreground rounded",
|
|
843
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ b(v, { size: 20 })
|
|
844
845
|
})]
|
|
845
|
-
}), /* @__PURE__ */
|
|
846
|
+
}), /* @__PURE__ */ x("div", {
|
|
846
847
|
className: "space-y-4",
|
|
847
848
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
|
|
849
850
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
850
851
|
children: [
|
|
851
|
-
|
|
852
|
+
Y(K.platform),
|
|
852
853
|
" ",
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ b("span", {
|
|
854
855
|
className: "text-status-error-text",
|
|
855
856
|
children: "*"
|
|
856
857
|
})
|
|
857
858
|
]
|
|
858
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ x("div", {
|
|
859
860
|
className: "relative",
|
|
860
|
-
children: [/* @__PURE__ */
|
|
861
|
-
"aria-label":
|
|
861
|
+
children: [/* @__PURE__ */ b("input", {
|
|
862
|
+
"aria-label": J(K.platform),
|
|
862
863
|
type: "text",
|
|
863
|
-
value:
|
|
864
|
-
onChange: (e) =>
|
|
865
|
-
placeholder:
|
|
864
|
+
value: B,
|
|
865
|
+
onChange: (e) => V(e.target.value),
|
|
866
|
+
placeholder: J(K.platform),
|
|
866
867
|
className: "w-full pl-9 pr-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
867
|
-
}), /* @__PURE__ */
|
|
868
|
+
}), /* @__PURE__ */ b("div", {
|
|
868
869
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
869
|
-
children:
|
|
870
|
+
children: K.platform === "EMAIL" ? /* @__PURE__ */ b(de, { size: 16 }) : K.platform === "SMS" || K.platform === "WHATSAPP" ? /* @__PURE__ */ b(pe, { size: 16 }) : /* @__PURE__ */ b(fe, { size: 16 })
|
|
870
871
|
})]
|
|
871
872
|
})] }),
|
|
872
|
-
|
|
873
|
+
K.platform === "EMAIL" && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
873
874
|
htmlFor: "channel-details-test-subject",
|
|
874
875
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
875
876
|
children: "Subject"
|
|
876
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ b("input", {
|
|
877
878
|
id: "channel-details-test-subject",
|
|
878
879
|
"aria-label": "Email subject",
|
|
879
880
|
type: "text",
|
|
880
|
-
value:
|
|
881
|
-
onChange: (e) =>
|
|
881
|
+
value: H,
|
|
882
|
+
onChange: (e) => Me(e.target.value),
|
|
882
883
|
placeholder: "Email subject",
|
|
883
884
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
884
885
|
})] }),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
886
887
|
htmlFor: "channel-details-test-message",
|
|
887
888
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
888
889
|
children: "Message"
|
|
889
|
-
}), /* @__PURE__ */
|
|
890
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
890
891
|
id: "channel-details-test-message",
|
|
891
892
|
"aria-label": "Test message content",
|
|
892
|
-
value:
|
|
893
|
-
onChange: (e) =>
|
|
893
|
+
value: U,
|
|
894
|
+
onChange: (e) => Ne(e.target.value),
|
|
894
895
|
placeholder: "Test message content",
|
|
895
896
|
rows: 3,
|
|
896
897
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none"
|
|
897
898
|
})] }),
|
|
898
|
-
|
|
899
|
-
className: `p-3 rounded-lg ${
|
|
900
|
-
children: /* @__PURE__ */
|
|
899
|
+
W && /* @__PURE__ */ b("div", {
|
|
900
|
+
className: `p-3 rounded-lg ${W.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
901
|
+
children: /* @__PURE__ */ x("div", {
|
|
901
902
|
className: "flex items-start gap-2",
|
|
902
|
-
children: [
|
|
903
|
+
children: [W.success ? /* @__PURE__ */ b(d, {
|
|
903
904
|
size: 16,
|
|
904
905
|
className: "text-status-success-text mt-0.5"
|
|
905
|
-
}) : /* @__PURE__ */
|
|
906
|
+
}) : /* @__PURE__ */ b(y, {
|
|
906
907
|
size: 16,
|
|
907
908
|
className: "text-status-error-text mt-0.5"
|
|
908
|
-
}), /* @__PURE__ */
|
|
909
|
+
}), /* @__PURE__ */ x("div", {
|
|
909
910
|
className: "flex-1",
|
|
910
911
|
children: [
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
className: `text-sm font-medium ${
|
|
913
|
-
children:
|
|
912
|
+
/* @__PURE__ */ b("p", {
|
|
913
|
+
className: `text-sm font-medium ${W.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
914
|
+
children: W.success ? O("channel.messageSentSuccess", "Message sent successfully!") : O("channel.messageSendFailed", "Failed to send message")
|
|
914
915
|
}),
|
|
915
|
-
|
|
916
|
+
W.messageId && /* @__PURE__ */ x("p", {
|
|
916
917
|
className: "text-xs text-success-600 mt-1",
|
|
917
|
-
children: ["Message ID: ",
|
|
918
|
+
children: ["Message ID: ", W.messageId]
|
|
918
919
|
}),
|
|
919
|
-
|
|
920
|
+
W.externalId && /* @__PURE__ */ x("p", {
|
|
920
921
|
className: "text-xs text-muted-foreground mt-1",
|
|
921
|
-
children: ["External ID: ",
|
|
922
|
+
children: ["External ID: ", W.externalId]
|
|
922
923
|
}),
|
|
923
|
-
|
|
924
|
+
W.status && /* @__PURE__ */ x("p", {
|
|
924
925
|
className: "text-xs text-muted-foreground mt-1",
|
|
925
|
-
children: ["Status: ",
|
|
926
|
+
children: ["Status: ", W.status]
|
|
926
927
|
}),
|
|
927
|
-
|
|
928
|
+
W.error && /* @__PURE__ */ x("p", {
|
|
928
929
|
className: "text-xs text-status-error-text mt-1",
|
|
929
|
-
children: [
|
|
930
|
+
children: [W.error.message, W.error.retryable && /* @__PURE__ */ b("span", {
|
|
930
931
|
className: "text-warning-600 ml-1",
|
|
931
932
|
children: "(will retry)"
|
|
932
933
|
})]
|
|
933
934
|
}),
|
|
934
|
-
|
|
935
|
+
W.sentAt && /* @__PURE__ */ x("p", {
|
|
935
936
|
className: "text-xs text-muted-foreground mt-1",
|
|
936
|
-
children: ["Sent at: ", new Date(
|
|
937
|
+
children: ["Sent at: ", new Date(W.sentAt).toLocaleString()]
|
|
937
938
|
})
|
|
938
939
|
]
|
|
939
940
|
})]
|
|
940
941
|
})
|
|
941
942
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ x("div", {
|
|
943
944
|
className: "flex items-center gap-2 pt-2",
|
|
944
|
-
children: [/* @__PURE__ */
|
|
945
|
+
children: [/* @__PURE__ */ b(r, {
|
|
945
946
|
permission: i.CHANNEL_DELIVERY_SEND,
|
|
946
|
-
children: /* @__PURE__ */
|
|
947
|
+
children: /* @__PURE__ */ x("button", {
|
|
947
948
|
type: "button",
|
|
948
|
-
onClick:
|
|
949
|
-
disabled:
|
|
949
|
+
onClick: Je,
|
|
950
|
+
disabled: A === "send-test" || !B.trim(),
|
|
950
951
|
className: "flex-1 flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
951
|
-
children: [
|
|
952
|
+
children: [A === "send-test" ? /* @__PURE__ */ b(p, {
|
|
952
953
|
size: 16,
|
|
953
954
|
className: "animate-spin"
|
|
954
|
-
}) : /* @__PURE__ */
|
|
955
|
+
}) : /* @__PURE__ */ b(g, { size: 16 }), O("channel.sendTest", "Send Test")]
|
|
955
956
|
})
|
|
956
|
-
}), /* @__PURE__ */
|
|
957
|
+
}), /* @__PURE__ */ b("button", {
|
|
957
958
|
type: "button",
|
|
958
|
-
onClick: () =>
|
|
959
|
+
onClick: () => z(!1),
|
|
959
960
|
className: "px-4 py-2 text-sm text-muted-foreground hover:bg-muted rounded-lg transition-colors",
|
|
960
|
-
children:
|
|
961
|
+
children: O("channel.close", "Close")
|
|
961
962
|
})]
|
|
962
963
|
})
|
|
963
964
|
]
|
|
@@ -969,6 +970,6 @@ function D() {
|
|
|
969
970
|
});
|
|
970
971
|
}
|
|
971
972
|
//#endregion
|
|
972
|
-
export {
|
|
973
|
+
export { T as ChannelDetailsPage };
|
|
973
974
|
|
|
974
975
|
//# sourceMappingURL=ChannelDetailsPage.js.map
|