@burdenoff/microfe-channel 2026.526.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 -6
- package/dist/channel/ChannelRoutes.js.map +1 -1
- package/dist/channel/components/AdapterCredentialsForm.js +14 -2
- package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
- package/dist/channel/components/FeatureNotEnabled.js +1 -1
- package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
- package/dist/channel/components/PermissionGuard.js +1 -1
- package/dist/channel/components/PermissionGuard.js.map +1 -1
- package/dist/channel/config/adapterCredentials.js +19 -11
- package/dist/channel/config/adapterCredentials.js.map +1 -1
- package/dist/channel/constants/permissions.js +3 -0
- package/dist/channel/constants/permissions.js.map +1 -1
- package/dist/channel/hooks/useChannelSubscription.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +244 -220
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +416 -390
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +30 -15
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +8 -2
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +241 -213
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +107 -98
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +160 -140
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +47 -50
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +16 -5
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +11 -4
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +17 -8
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +11 -6
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +21 -9
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +8 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/dist/channel/pages/ChannelLandingPage.js +50 -35
- package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
- package/dist/channel/providers/ChannelProvider.js +1 -1
- package/dist/channel/providers/ChannelProvider.js.map +1 -1
- package/package.json +2 -2
- package/dist/channel/modules/channels/pages/index.js +0 -14
|
@@ -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 T = {
|
|
|
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 O() {
|
|
|
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,378 +212,387 @@ function O() {
|
|
|
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
|
-
|
|
273
|
+
/* @__PURE__ */ b("button", {
|
|
274
|
+
type: "button",
|
|
275
|
+
onClick: () => f(-1),
|
|
274
276
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
275
|
-
children:
|
|
277
|
+
children: O("channel.goBack", "Go Back")
|
|
276
278
|
})
|
|
277
279
|
]
|
|
278
280
|
})
|
|
279
281
|
});
|
|
280
|
-
let X =
|
|
281
|
-
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, {
|
|
282
284
|
permission: i.CHANNEL_READ,
|
|
283
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ x("div", {
|
|
284
286
|
className: "space-y-6 p-3 sm:p-6",
|
|
285
287
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ x("div", {
|
|
287
289
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ x("div", {
|
|
289
291
|
className: "flex items-center gap-3",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
291
|
-
|
|
292
|
+
children: [/* @__PURE__ */ b("button", {
|
|
293
|
+
type: "button",
|
|
294
|
+
onClick: () => f(-1),
|
|
292
295
|
className: "p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",
|
|
293
|
-
children: /* @__PURE__ */
|
|
294
|
-
}), /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ b(ce, { size: 20 })
|
|
297
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
|
|
295
298
|
className: "flex items-center gap-2",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ b(_e, {
|
|
297
300
|
size: 24,
|
|
298
301
|
className: "text-accent-primary"
|
|
299
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ b("h1", {
|
|
300
303
|
className: "text-xl sm:text-2xl font-bold text-foreground",
|
|
301
|
-
children:
|
|
304
|
+
children: K.name
|
|
302
305
|
})]
|
|
303
|
-
}),
|
|
306
|
+
}), K.description && /* @__PURE__ */ b("p", {
|
|
304
307
|
className: "text-sm text-muted-foreground mt-1",
|
|
305
|
-
children:
|
|
308
|
+
children: K.description
|
|
306
309
|
})] })]
|
|
307
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ x("div", {
|
|
308
311
|
className: "flex items-center gap-2",
|
|
309
312
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ b(r, {
|
|
311
314
|
permission: i.CHANNEL_EXECUTE,
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
+
children: /* @__PURE__ */ x("button", {
|
|
316
|
+
type: "button",
|
|
317
|
+
onClick: He,
|
|
318
|
+
disabled: A === "health",
|
|
315
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",
|
|
316
|
-
children: [
|
|
320
|
+
children: [A === "health" ? /* @__PURE__ */ b(p, {
|
|
317
321
|
size: 16,
|
|
318
322
|
className: "animate-spin"
|
|
319
|
-
}) : /* @__PURE__ */
|
|
323
|
+
}) : /* @__PURE__ */ b(ve, { size: 16 }), O("channel.healthCheck", "Health Check")]
|
|
320
324
|
})
|
|
321
325
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ b(r, {
|
|
323
327
|
permission: i.CHANNEL_UPDATE,
|
|
324
|
-
children: /* @__PURE__ */
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
children: /* @__PURE__ */ x("button", {
|
|
329
|
+
type: "button",
|
|
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, {
|
|
329
334
|
size: 16,
|
|
330
335
|
className: "animate-spin"
|
|
331
|
-
}) :
|
|
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")]
|
|
332
337
|
})
|
|
333
338
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ x("button", {
|
|
340
|
+
type: "button",
|
|
335
341
|
onClick: () => {
|
|
336
|
-
|
|
342
|
+
z(!0), G(null), V("");
|
|
337
343
|
},
|
|
338
|
-
disabled: !
|
|
344
|
+
disabled: !K.connection,
|
|
339
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",
|
|
340
|
-
title:
|
|
341
|
-
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")]
|
|
342
348
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
|
|
349
|
+
D && /* @__PURE__ */ x("button", {
|
|
350
|
+
type: "button",
|
|
351
|
+
onClick: () => f("./edit"),
|
|
345
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",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.edit", "Edit")]
|
|
347
354
|
})
|
|
348
355
|
]
|
|
349
356
|
})]
|
|
350
357
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ x("div", {
|
|
352
359
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
353
360
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ x("div", {
|
|
355
362
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
356
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ b("p", {
|
|
357
364
|
className: "text-xs text-muted-foreground mb-1",
|
|
358
|
-
children:
|
|
359
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: O("channel.platform", "Platform")
|
|
366
|
+
}), /* @__PURE__ */ b("span", {
|
|
360
367
|
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${X.color}`,
|
|
361
368
|
children: X.label
|
|
362
369
|
})]
|
|
363
370
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ x("div", {
|
|
365
372
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ b("p", {
|
|
367
374
|
className: "text-xs text-muted-foreground mb-1",
|
|
368
|
-
children:
|
|
369
|
-
}), /* @__PURE__ */
|
|
375
|
+
children: O("channel.status", "Status")
|
|
376
|
+
}), /* @__PURE__ */ x("div", {
|
|
370
377
|
className: "flex items-center gap-2",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ b(Qe, {
|
|
372
379
|
size: 16,
|
|
373
380
|
className: Z.color.split(" ")[0]
|
|
374
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ b("span", {
|
|
375
382
|
className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
|
|
376
383
|
children: Z.label
|
|
377
384
|
})]
|
|
378
385
|
})]
|
|
379
386
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ x("div", {
|
|
381
388
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
382
389
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ b("p", {
|
|
384
391
|
className: "text-xs text-muted-foreground mb-1",
|
|
385
|
-
children:
|
|
392
|
+
children: O("channel.connectionHealth", "Connection Health")
|
|
386
393
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ x("div", {
|
|
388
395
|
className: "flex items-center gap-2",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ b($e, {
|
|
390
397
|
size: 16,
|
|
391
398
|
className: Q.color
|
|
392
|
-
}), /* @__PURE__ */
|
|
399
|
+
}), /* @__PURE__ */ b("span", {
|
|
393
400
|
className: `text-sm font-medium ${Q.color}`,
|
|
394
401
|
children: Q.label
|
|
395
402
|
})]
|
|
396
403
|
}),
|
|
397
|
-
|
|
404
|
+
K.lastHealthCheckAt && /* @__PURE__ */ x("p", {
|
|
398
405
|
className: "text-xs text-muted-foreground mt-1",
|
|
399
406
|
children: [
|
|
400
|
-
|
|
407
|
+
O("channel.lastCheck", "Last check"),
|
|
401
408
|
":",
|
|
402
409
|
" ",
|
|
403
|
-
new Date(
|
|
410
|
+
new Date(K.lastHealthCheckAt).toLocaleString()
|
|
404
411
|
]
|
|
405
412
|
})
|
|
406
413
|
]
|
|
407
414
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ x("div", {
|
|
409
416
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ b("p", {
|
|
411
418
|
className: "text-xs text-muted-foreground mb-1",
|
|
412
|
-
children:
|
|
413
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: O("channel.connection", "Connection")
|
|
420
|
+
}), /* @__PURE__ */ x("div", {
|
|
414
421
|
className: "flex items-center gap-2",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ b(u, {
|
|
416
423
|
size: 16,
|
|
417
|
-
className:
|
|
418
|
-
}), /* @__PURE__ */
|
|
419
|
-
className: `text-sm font-medium ${
|
|
420
|
-
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")
|
|
421
428
|
})]
|
|
422
429
|
})]
|
|
423
430
|
})
|
|
424
431
|
]
|
|
425
432
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ x("div", {
|
|
427
434
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
428
435
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ b("h2", {
|
|
430
437
|
className: "text-lg font-semibold text-foreground mb-4",
|
|
431
|
-
children:
|
|
438
|
+
children: O("channel.channelDetails", "Channel Details")
|
|
432
439
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ x("div", {
|
|
434
441
|
className: "grid gap-4 sm:grid-cols-2",
|
|
435
442
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
437
444
|
className: "text-xs text-muted-foreground",
|
|
438
|
-
children:
|
|
439
|
-
}), /* @__PURE__ */
|
|
445
|
+
children: O("channel.adapterType", "Adapter Type")
|
|
446
|
+
}), /* @__PURE__ */ b("p", {
|
|
440
447
|
className: "text-sm font-medium text-foreground",
|
|
441
|
-
children:
|
|
448
|
+
children: K.adapterType?.replace(/_/g, " ") || O("channel.notConfigured", "Not configured")
|
|
442
449
|
})] }),
|
|
443
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
444
451
|
className: "text-xs text-muted-foreground",
|
|
445
|
-
children:
|
|
446
|
-
}), /* @__PURE__ */
|
|
452
|
+
children: O("channel.priority", "Priority")
|
|
453
|
+
}), /* @__PURE__ */ b("p", {
|
|
447
454
|
className: "text-sm font-medium text-foreground",
|
|
448
|
-
children:
|
|
455
|
+
children: K.priority
|
|
449
456
|
})] }),
|
|
450
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
451
458
|
className: "text-xs text-muted-foreground",
|
|
452
|
-
children:
|
|
453
|
-
}), /* @__PURE__ */
|
|
459
|
+
children: O("channel.consecutiveFailures", "Consecutive Failures")
|
|
460
|
+
}), /* @__PURE__ */ b("p", {
|
|
454
461
|
className: "text-sm font-medium text-foreground",
|
|
455
|
-
children:
|
|
462
|
+
children: K.consecutiveFailures
|
|
456
463
|
})] }),
|
|
457
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
458
465
|
className: "text-xs text-muted-foreground",
|
|
459
|
-
children:
|
|
460
|
-
}), /* @__PURE__ */
|
|
466
|
+
children: O("channel.messages24h", "Messages (24h)")
|
|
467
|
+
}), /* @__PURE__ */ b("p", {
|
|
461
468
|
className: "text-sm font-medium text-foreground",
|
|
462
|
-
children:
|
|
469
|
+
children: K.messageCount24h
|
|
463
470
|
})] }),
|
|
464
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
465
472
|
className: "text-xs text-muted-foreground",
|
|
466
|
-
children:
|
|
467
|
-
}), /* @__PURE__ */
|
|
473
|
+
children: O("channel.createdAt", "Created At")
|
|
474
|
+
}), /* @__PURE__ */ b("p", {
|
|
468
475
|
className: "text-sm font-medium text-foreground",
|
|
469
|
-
children: new Date(
|
|
476
|
+
children: new Date(K.createdAt).toLocaleString()
|
|
470
477
|
})] }),
|
|
471
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
472
479
|
className: "text-xs text-muted-foreground",
|
|
473
|
-
children:
|
|
474
|
-
}), /* @__PURE__ */
|
|
480
|
+
children: O("channel.updatedAt", "Updated At")
|
|
481
|
+
}), /* @__PURE__ */ b("p", {
|
|
475
482
|
className: "text-sm font-medium text-foreground",
|
|
476
|
-
children: new Date(
|
|
483
|
+
children: new Date(K.updatedAt).toLocaleString()
|
|
477
484
|
})] })
|
|
478
485
|
]
|
|
479
486
|
}),
|
|
480
|
-
|
|
487
|
+
K.tagAssignments && K.tagAssignments.length > 0 && /* @__PURE__ */ x("div", {
|
|
481
488
|
className: "mt-4",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ b("p", {
|
|
483
490
|
className: "text-xs text-muted-foreground mb-1.5",
|
|
484
|
-
children:
|
|
485
|
-
}), /* @__PURE__ */
|
|
491
|
+
children: O("channel.tags", "Tags")
|
|
492
|
+
}), /* @__PURE__ */ b("div", {
|
|
486
493
|
className: "flex flex-wrap gap-1.5",
|
|
487
494
|
"aria-label": "Channel tags",
|
|
488
|
-
children:
|
|
495
|
+
children: K.tagAssignments.map((e) => /* @__PURE__ */ b(Ee, {
|
|
489
496
|
id: e.tagId,
|
|
490
497
|
label: e.tagId,
|
|
491
498
|
size: "md"
|
|
492
499
|
}, e.id))
|
|
493
500
|
})]
|
|
494
501
|
}),
|
|
495
|
-
|
|
502
|
+
K.healthCheckError && /* @__PURE__ */ x("div", {
|
|
496
503
|
className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ b("p", {
|
|
498
505
|
className: "text-xs text-status-error-text font-medium",
|
|
499
|
-
children:
|
|
500
|
-
}), /* @__PURE__ */
|
|
506
|
+
children: O("channel.lastHealthCheckError", "Last Health Check Error")
|
|
507
|
+
}), /* @__PURE__ */ b("p", {
|
|
501
508
|
className: "text-sm text-status-error-text",
|
|
502
|
-
children:
|
|
509
|
+
children: K.healthCheckError
|
|
503
510
|
})]
|
|
504
511
|
})
|
|
505
512
|
]
|
|
506
513
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ x("div", {
|
|
508
515
|
className: "grid gap-3 sm:grid-cols-3",
|
|
509
516
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
517
|
+
/* @__PURE__ */ x("button", {
|
|
518
|
+
type: "button",
|
|
519
|
+
onClick: () => f("./deliveries"),
|
|
512
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",
|
|
513
521
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ b("div", {
|
|
515
523
|
className: "p-2 bg-accent-orange/10 rounded-lg",
|
|
516
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ b(_, {
|
|
517
525
|
size: 18,
|
|
518
526
|
className: "text-accent-orange"
|
|
519
527
|
})
|
|
520
528
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ x("div", {
|
|
522
530
|
className: "flex-1 min-w-0",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ b("p", {
|
|
524
532
|
className: "text-sm font-medium text-foreground",
|
|
525
|
-
children:
|
|
526
|
-
}), /* @__PURE__ */
|
|
533
|
+
children: O("channel.deliveryHistory", "Delivery History")
|
|
534
|
+
}), /* @__PURE__ */ b("p", {
|
|
527
535
|
className: "text-xs text-muted-foreground truncate",
|
|
528
|
-
children:
|
|
536
|
+
children: O("channel.viewMessageDeliveries", "View message deliveries")
|
|
529
537
|
})]
|
|
530
538
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ b(l, {
|
|
532
540
|
size: 16,
|
|
533
541
|
className: "text-muted-foreground shrink-0"
|
|
534
542
|
})
|
|
535
543
|
]
|
|
536
544
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
|
|
545
|
+
/* @__PURE__ */ x("button", {
|
|
546
|
+
type: "button",
|
|
547
|
+
onClick: () => f("./webhooks"),
|
|
539
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",
|
|
540
549
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ b("div", {
|
|
542
551
|
className: "p-2 bg-accent-purple/10 rounded-lg",
|
|
543
|
-
children: /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ b(le, {
|
|
544
553
|
size: 18,
|
|
545
554
|
className: "text-accent-purple"
|
|
546
555
|
})
|
|
547
556
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ x("div", {
|
|
549
558
|
className: "flex-1 min-w-0",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ b("p", {
|
|
551
560
|
className: "text-sm font-medium text-foreground",
|
|
552
|
-
children:
|
|
553
|
-
}), /* @__PURE__ */
|
|
561
|
+
children: O("channel.webhookEvents", "Webhook Events")
|
|
562
|
+
}), /* @__PURE__ */ b("p", {
|
|
554
563
|
className: "text-xs text-muted-foreground truncate",
|
|
555
|
-
children:
|
|
564
|
+
children: O("channel.viewIncomingWebhooks", "View incoming webhooks")
|
|
556
565
|
})]
|
|
557
566
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ b(l, {
|
|
559
568
|
size: 16,
|
|
560
569
|
className: "text-muted-foreground shrink-0"
|
|
561
570
|
})
|
|
562
571
|
]
|
|
563
572
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
|
|
573
|
+
/* @__PURE__ */ x("button", {
|
|
574
|
+
type: "button",
|
|
575
|
+
onClick: () => f("./users"),
|
|
566
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",
|
|
567
577
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ b("div", {
|
|
569
579
|
className: "p-2 bg-accent-blue/10 rounded-lg",
|
|
570
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ b(xe, {
|
|
571
581
|
size: 18,
|
|
572
582
|
className: "text-accent-blue"
|
|
573
583
|
})
|
|
574
584
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ x("div", {
|
|
576
586
|
className: "flex-1 min-w-0",
|
|
577
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ b("p", {
|
|
578
588
|
className: "text-sm font-medium text-foreground",
|
|
579
|
-
children:
|
|
580
|
-
}), /* @__PURE__ */
|
|
589
|
+
children: O("channel.channelUsers", "Channel Users")
|
|
590
|
+
}), /* @__PURE__ */ b("p", {
|
|
581
591
|
className: "text-xs text-muted-foreground truncate",
|
|
582
|
-
children:
|
|
592
|
+
children: O("channel.viewConnectedUsers", "View connected users")
|
|
583
593
|
})]
|
|
584
594
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ b(l, {
|
|
586
596
|
size: 16,
|
|
587
597
|
className: "text-muted-foreground shrink-0"
|
|
588
598
|
})
|
|
@@ -590,349 +600,365 @@ function O() {
|
|
|
590
600
|
})
|
|
591
601
|
]
|
|
592
602
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ x("div", {
|
|
594
604
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
595
605
|
children: [
|
|
596
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ x("div", {
|
|
597
607
|
className: "flex items-center justify-between mb-4",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
608
|
+
children: [/* @__PURE__ */ x("div", {
|
|
599
609
|
className: "flex items-center gap-2",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
610
|
+
children: [/* @__PURE__ */ b(ue, {
|
|
601
611
|
size: 20,
|
|
602
612
|
className: "text-accent-primary"
|
|
603
|
-
}), /* @__PURE__ */
|
|
613
|
+
}), /* @__PURE__ */ b("h2", {
|
|
604
614
|
className: "text-lg font-semibold text-foreground",
|
|
605
|
-
children:
|
|
615
|
+
children: O("channel.connectionAndCredentials", "Connection & Credentials")
|
|
606
616
|
})]
|
|
607
|
-
}), !$ && !
|
|
608
|
-
|
|
617
|
+
}), De && !$ && !M && /* @__PURE__ */ x("button", {
|
|
618
|
+
type: "button",
|
|
619
|
+
onClick: () => N(!0),
|
|
609
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",
|
|
610
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ b(he, { size: 16 }), O("channel.addCredentials", "Add Credentials")]
|
|
611
622
|
})]
|
|
612
623
|
}),
|
|
613
|
-
$ && !
|
|
624
|
+
$ && !M && /* @__PURE__ */ x("div", {
|
|
614
625
|
className: "space-y-4",
|
|
615
626
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ x("div", {
|
|
617
628
|
className: "grid gap-4 sm:grid-cols-2",
|
|
618
629
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
620
631
|
className: "text-xs text-muted-foreground",
|
|
621
|
-
children:
|
|
622
|
-
}), /* @__PURE__ */
|
|
632
|
+
children: O("channel.authType", "Auth Type")
|
|
633
|
+
}), /* @__PURE__ */ b("p", {
|
|
623
634
|
className: "text-sm font-medium text-foreground",
|
|
624
|
-
children:
|
|
635
|
+
children: a($.authType, ee, O)
|
|
625
636
|
})] }),
|
|
626
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
627
638
|
className: "text-xs text-muted-foreground",
|
|
628
|
-
children:
|
|
629
|
-
}), /* @__PURE__ */
|
|
639
|
+
children: O("channel.status", "Status")
|
|
640
|
+
}), /* @__PURE__ */ x("div", {
|
|
630
641
|
className: "flex items-center gap-2",
|
|
631
|
-
children: [$.isHealthy ? /* @__PURE__ */
|
|
642
|
+
children: [$.isHealthy ? /* @__PURE__ */ b(d, {
|
|
632
643
|
size: 14,
|
|
633
644
|
className: "text-status-success-text"
|
|
634
|
-
}) : /* @__PURE__ */
|
|
645
|
+
}) : /* @__PURE__ */ b(y, {
|
|
635
646
|
size: 14,
|
|
636
647
|
className: "text-status-error-text"
|
|
637
|
-
}), /* @__PURE__ */
|
|
648
|
+
}), /* @__PURE__ */ b("span", {
|
|
638
649
|
className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
|
|
639
|
-
children: $.isHealthy ?
|
|
650
|
+
children: $.isHealthy ? O("channel.healthy", "Healthy") : O("channel.unhealthy", "Unhealthy")
|
|
640
651
|
})]
|
|
641
652
|
})] }),
|
|
642
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
643
654
|
className: "text-xs text-muted-foreground",
|
|
644
|
-
children:
|
|
645
|
-
}), /* @__PURE__ */
|
|
655
|
+
children: O("channel.lastTested", "Last Tested")
|
|
656
|
+
}), /* @__PURE__ */ b("p", {
|
|
646
657
|
className: "text-sm font-medium text-foreground",
|
|
647
|
-
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() :
|
|
658
|
+
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : O("channel.never", "Never")
|
|
648
659
|
})] }),
|
|
649
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
650
661
|
className: "text-xs text-muted-foreground",
|
|
651
|
-
children:
|
|
652
|
-
}), /* @__PURE__ */
|
|
662
|
+
children: O("channel.testStatus", "Test Status")
|
|
663
|
+
}), /* @__PURE__ */ b("p", {
|
|
653
664
|
className: "text-sm font-medium text-foreground",
|
|
654
|
-
children: $.testStatus ||
|
|
665
|
+
children: $.testStatus || O("channel.notTested", "Not tested")
|
|
655
666
|
})] }),
|
|
656
|
-
$.tokenExpiresAt && /* @__PURE__ */
|
|
667
|
+
$.tokenExpiresAt && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
657
668
|
className: "text-xs text-muted-foreground",
|
|
658
|
-
children:
|
|
659
|
-
}), /* @__PURE__ */
|
|
669
|
+
children: O("channel.tokenExpires", "Token Expires")
|
|
670
|
+
}), /* @__PURE__ */ x("p", {
|
|
660
671
|
className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-foreground"}`,
|
|
661
|
-
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */
|
|
672
|
+
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ x("span", {
|
|
662
673
|
className: "text-xs text-muted-foreground ml-1",
|
|
663
674
|
children: [
|
|
664
675
|
"(",
|
|
665
676
|
$.daysUntilExpiry,
|
|
666
677
|
" ",
|
|
667
|
-
|
|
678
|
+
O("channel.days", "days"),
|
|
668
679
|
")"
|
|
669
680
|
]
|
|
670
681
|
})]
|
|
671
682
|
})] })
|
|
672
683
|
]
|
|
673
684
|
}),
|
|
674
|
-
|
|
675
|
-
className: `p-3 rounded-lg ${
|
|
676
|
-
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", {
|
|
677
688
|
className: "flex items-center gap-2",
|
|
678
|
-
children: [
|
|
689
|
+
children: [L.success ? /* @__PURE__ */ b(d, {
|
|
679
690
|
size: 16,
|
|
680
691
|
className: "text-status-success-text"
|
|
681
|
-
}) : /* @__PURE__ */
|
|
692
|
+
}) : /* @__PURE__ */ b(y, {
|
|
682
693
|
size: 16,
|
|
683
694
|
className: "text-status-error-text"
|
|
684
|
-
}), /* @__PURE__ */
|
|
685
|
-
className: `text-sm font-medium ${
|
|
686
|
-
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
|
|
687
698
|
})]
|
|
688
699
|
})
|
|
689
700
|
}),
|
|
690
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ x("div", {
|
|
691
702
|
className: "flex items-center gap-2 pt-2",
|
|
692
703
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ b(r, {
|
|
694
705
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
695
|
-
children: /* @__PURE__ */
|
|
696
|
-
|
|
697
|
-
|
|
706
|
+
children: /* @__PURE__ */ x("button", {
|
|
707
|
+
type: "button",
|
|
708
|
+
onClick: () => qe($.id),
|
|
709
|
+
disabled: A === "test",
|
|
698
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",
|
|
699
|
-
children: [
|
|
711
|
+
children: [A === "test" ? /* @__PURE__ */ b(p, {
|
|
700
712
|
size: 16,
|
|
701
713
|
className: "animate-spin"
|
|
702
|
-
}) : /* @__PURE__ */
|
|
714
|
+
}) : /* @__PURE__ */ b(me, { size: 16 }), O("channel.testConnection", "Test Connection")]
|
|
703
715
|
})
|
|
704
716
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
717
|
+
Oe && /* @__PURE__ */ x("button", {
|
|
718
|
+
type: "button",
|
|
706
719
|
onClick: () => {
|
|
707
|
-
|
|
720
|
+
N(!0), F($?.platformMetadata ?? {});
|
|
708
721
|
},
|
|
709
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",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.updateCredentials", "Update Credentials")]
|
|
711
724
|
}),
|
|
712
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ b(r, {
|
|
713
726
|
permission: i.CHANNEL_CONNECTION_DELETE,
|
|
714
|
-
children: /* @__PURE__ */
|
|
715
|
-
|
|
716
|
-
|
|
727
|
+
children: /* @__PURE__ */ x("button", {
|
|
728
|
+
type: "button",
|
|
729
|
+
onClick: () => Ke($.id),
|
|
730
|
+
disabled: A === "delete-connection",
|
|
717
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",
|
|
718
|
-
children: [
|
|
732
|
+
children: [A === "delete-connection" ? /* @__PURE__ */ b(p, {
|
|
719
733
|
size: 16,
|
|
720
734
|
className: "animate-spin"
|
|
721
|
-
}) : /* @__PURE__ */
|
|
735
|
+
}) : /* @__PURE__ */ b(be, { size: 16 }), O("channel.remove", "Remove")]
|
|
722
736
|
})
|
|
723
737
|
})
|
|
724
738
|
]
|
|
725
739
|
})
|
|
726
740
|
]
|
|
727
741
|
}),
|
|
728
|
-
!$ && !
|
|
742
|
+
!$ && !M && /* @__PURE__ */ x("div", {
|
|
729
743
|
className: "text-center py-8",
|
|
730
744
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ b(u, {
|
|
732
746
|
size: 32,
|
|
733
747
|
className: "mx-auto text-muted-foreground mb-3"
|
|
734
748
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ b("p", {
|
|
736
750
|
className: "text-sm text-muted-foreground mb-2",
|
|
737
|
-
children:
|
|
751
|
+
children: O("channel.noCredentialsConfigured", "No credentials configured for this channel")
|
|
738
752
|
}),
|
|
739
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ b("p", {
|
|
740
754
|
className: "text-xs text-muted-foreground",
|
|
741
|
-
children:
|
|
755
|
+
children: O("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
|
|
742
756
|
})
|
|
743
757
|
]
|
|
744
758
|
}),
|
|
745
|
-
|
|
759
|
+
M && /* @__PURE__ */ x("div", {
|
|
746
760
|
className: "space-y-4",
|
|
747
761
|
children: [
|
|
748
|
-
!
|
|
762
|
+
!K.adapterType && /* @__PURE__ */ b("div", {
|
|
749
763
|
className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
|
|
750
|
-
children: /* @__PURE__ */
|
|
764
|
+
children: /* @__PURE__ */ x("div", {
|
|
751
765
|
className: "flex items-start gap-2",
|
|
752
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ b(s, {
|
|
753
767
|
size: 16,
|
|
754
768
|
className: "text-accent-orange mt-0.5"
|
|
755
|
-
}), /* @__PURE__ */
|
|
769
|
+
}), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
756
770
|
className: "text-sm font-medium text-accent-orange",
|
|
757
|
-
children:
|
|
758
|
-
}), /* @__PURE__ */
|
|
771
|
+
children: O("channel.noAdapterTypeConfigured", "No adapter type configured")
|
|
772
|
+
}), /* @__PURE__ */ b("p", {
|
|
759
773
|
className: "text-xs text-muted-foreground mt-1",
|
|
760
|
-
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.")
|
|
761
775
|
})] })]
|
|
762
776
|
})
|
|
763
777
|
}),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
adapterType:
|
|
766
|
-
credentials:
|
|
767
|
-
onChange:
|
|
768
|
-
onValidationChange: (e) =>
|
|
769
|
-
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"
|
|
770
784
|
}),
|
|
771
|
-
|
|
785
|
+
K.adapterType && /* @__PURE__ */ b("div", {
|
|
772
786
|
className: "pt-2",
|
|
773
|
-
children: /* @__PURE__ */
|
|
774
|
-
adapterType:
|
|
775
|
-
credentials:
|
|
787
|
+
children: /* @__PURE__ */ b(ae, {
|
|
788
|
+
adapterType: K.adapterType,
|
|
789
|
+
credentials: P
|
|
776
790
|
})
|
|
777
791
|
}),
|
|
778
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ x("div", {
|
|
779
793
|
className: "flex items-center gap-2 pt-2 border-t border-border",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
794
|
+
children: [/* @__PURE__ */ b(r, {
|
|
781
795
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
782
|
-
children: /* @__PURE__ */
|
|
796
|
+
children: /* @__PURE__ */ x("button", {
|
|
797
|
+
type: "button",
|
|
783
798
|
onClick: () => {
|
|
784
|
-
$ ?
|
|
799
|
+
$ ? Ge($.id) : We();
|
|
785
800
|
},
|
|
786
|
-
disabled:
|
|
801
|
+
disabled: A === "connection" || !Ae && !!K.adapterType,
|
|
787
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",
|
|
788
|
-
children: [
|
|
803
|
+
children: [A === "connection" ? /* @__PURE__ */ b(p, {
|
|
789
804
|
size: 16,
|
|
790
805
|
className: "animate-spin"
|
|
791
|
-
}) : /* @__PURE__ */
|
|
806
|
+
}) : /* @__PURE__ */ b(ye, { size: 16 }), $ ? O("channel.updateCredentials", "Update Credentials") : O("channel.saveCredentials", "Save Credentials")]
|
|
792
807
|
})
|
|
793
|
-
}), /* @__PURE__ */
|
|
808
|
+
}), /* @__PURE__ */ x("button", {
|
|
809
|
+
type: "button",
|
|
794
810
|
onClick: () => {
|
|
795
|
-
|
|
811
|
+
N(!1), F({}), I(!1);
|
|
796
812
|
},
|
|
797
813
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-muted-foreground hover:bg-muted rounded-lg transition-colors",
|
|
798
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), O("channel.cancel", "Cancel")]
|
|
799
815
|
})]
|
|
800
816
|
})
|
|
801
817
|
]
|
|
802
818
|
})
|
|
803
819
|
]
|
|
804
820
|
}),
|
|
805
|
-
|
|
821
|
+
je && /* @__PURE__ */ b("div", {
|
|
806
822
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
807
|
-
children: /* @__PURE__ */
|
|
823
|
+
children: /* @__PURE__ */ x("div", {
|
|
808
824
|
className: "w-full max-w-md mx-4 p-6 bg-surface border border-border rounded-lg shadow-xl",
|
|
809
|
-
children: [/* @__PURE__ */
|
|
825
|
+
children: [/* @__PURE__ */ x("div", {
|
|
810
826
|
className: "flex items-center justify-between mb-4",
|
|
811
|
-
children: [/* @__PURE__ */
|
|
827
|
+
children: [/* @__PURE__ */ x("div", {
|
|
812
828
|
className: "flex items-center gap-2",
|
|
813
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ b(g, {
|
|
814
830
|
size: 20,
|
|
815
831
|
className: "text-accent-primary"
|
|
816
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ x("h3", {
|
|
817
833
|
className: "text-lg font-semibold text-foreground",
|
|
818
834
|
children: [
|
|
819
835
|
"Test ",
|
|
820
|
-
|
|
836
|
+
S[K.platform]?.label || K.platform,
|
|
821
837
|
" Channel"
|
|
822
838
|
]
|
|
823
839
|
})]
|
|
824
|
-
}), /* @__PURE__ */
|
|
825
|
-
|
|
840
|
+
}), /* @__PURE__ */ b("button", {
|
|
841
|
+
type: "button",
|
|
842
|
+
onClick: () => z(!1),
|
|
826
843
|
className: "p-1 text-muted-foreground hover:text-foreground rounded",
|
|
827
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ b(v, { size: 20 })
|
|
828
845
|
})]
|
|
829
|
-
}), /* @__PURE__ */
|
|
846
|
+
}), /* @__PURE__ */ x("div", {
|
|
830
847
|
className: "space-y-4",
|
|
831
848
|
children: [
|
|
832
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
|
|
833
850
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
834
851
|
children: [
|
|
835
|
-
|
|
852
|
+
Y(K.platform),
|
|
836
853
|
" ",
|
|
837
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ b("span", {
|
|
838
855
|
className: "text-status-error-text",
|
|
839
856
|
children: "*"
|
|
840
857
|
})
|
|
841
858
|
]
|
|
842
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ x("div", {
|
|
843
860
|
className: "relative",
|
|
844
|
-
children: [/* @__PURE__ */
|
|
861
|
+
children: [/* @__PURE__ */ b("input", {
|
|
862
|
+
"aria-label": J(K.platform),
|
|
845
863
|
type: "text",
|
|
846
|
-
value:
|
|
847
|
-
onChange: (e) =>
|
|
848
|
-
placeholder:
|
|
864
|
+
value: B,
|
|
865
|
+
onChange: (e) => V(e.target.value),
|
|
866
|
+
placeholder: J(K.platform),
|
|
849
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"
|
|
850
|
-
}), /* @__PURE__ */
|
|
868
|
+
}), /* @__PURE__ */ b("div", {
|
|
851
869
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
852
|
-
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 })
|
|
853
871
|
})]
|
|
854
872
|
})] }),
|
|
855
|
-
|
|
873
|
+
K.platform === "EMAIL" && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
874
|
+
htmlFor: "channel-details-test-subject",
|
|
856
875
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
857
876
|
children: "Subject"
|
|
858
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ b("input", {
|
|
878
|
+
id: "channel-details-test-subject",
|
|
879
|
+
"aria-label": "Email subject",
|
|
859
880
|
type: "text",
|
|
860
|
-
value:
|
|
861
|
-
onChange: (e) =>
|
|
881
|
+
value: H,
|
|
882
|
+
onChange: (e) => Me(e.target.value),
|
|
862
883
|
placeholder: "Email subject",
|
|
863
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"
|
|
864
885
|
})] }),
|
|
865
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
887
|
+
htmlFor: "channel-details-test-message",
|
|
866
888
|
className: "block text-sm font-medium text-foreground mb-1.5",
|
|
867
889
|
children: "Message"
|
|
868
|
-
}), /* @__PURE__ */
|
|
869
|
-
|
|
870
|
-
|
|
890
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
891
|
+
id: "channel-details-test-message",
|
|
892
|
+
"aria-label": "Test message content",
|
|
893
|
+
value: U,
|
|
894
|
+
onChange: (e) => Ne(e.target.value),
|
|
871
895
|
placeholder: "Test message content",
|
|
872
896
|
rows: 3,
|
|
873
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"
|
|
874
898
|
})] }),
|
|
875
|
-
|
|
876
|
-
className: `p-3 rounded-lg ${
|
|
877
|
-
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", {
|
|
878
902
|
className: "flex items-start gap-2",
|
|
879
|
-
children: [
|
|
903
|
+
children: [W.success ? /* @__PURE__ */ b(d, {
|
|
880
904
|
size: 16,
|
|
881
905
|
className: "text-status-success-text mt-0.5"
|
|
882
|
-
}) : /* @__PURE__ */
|
|
906
|
+
}) : /* @__PURE__ */ b(y, {
|
|
883
907
|
size: 16,
|
|
884
908
|
className: "text-status-error-text mt-0.5"
|
|
885
|
-
}), /* @__PURE__ */
|
|
909
|
+
}), /* @__PURE__ */ x("div", {
|
|
886
910
|
className: "flex-1",
|
|
887
911
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
className: `text-sm font-medium ${
|
|
890
|
-
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")
|
|
891
915
|
}),
|
|
892
|
-
|
|
916
|
+
W.messageId && /* @__PURE__ */ x("p", {
|
|
893
917
|
className: "text-xs text-success-600 mt-1",
|
|
894
|
-
children: ["Message ID: ",
|
|
918
|
+
children: ["Message ID: ", W.messageId]
|
|
895
919
|
}),
|
|
896
|
-
|
|
920
|
+
W.externalId && /* @__PURE__ */ x("p", {
|
|
897
921
|
className: "text-xs text-muted-foreground mt-1",
|
|
898
|
-
children: ["External ID: ",
|
|
922
|
+
children: ["External ID: ", W.externalId]
|
|
899
923
|
}),
|
|
900
|
-
|
|
924
|
+
W.status && /* @__PURE__ */ x("p", {
|
|
901
925
|
className: "text-xs text-muted-foreground mt-1",
|
|
902
|
-
children: ["Status: ",
|
|
926
|
+
children: ["Status: ", W.status]
|
|
903
927
|
}),
|
|
904
|
-
|
|
928
|
+
W.error && /* @__PURE__ */ x("p", {
|
|
905
929
|
className: "text-xs text-status-error-text mt-1",
|
|
906
|
-
children: [
|
|
930
|
+
children: [W.error.message, W.error.retryable && /* @__PURE__ */ b("span", {
|
|
907
931
|
className: "text-warning-600 ml-1",
|
|
908
932
|
children: "(will retry)"
|
|
909
933
|
})]
|
|
910
934
|
}),
|
|
911
|
-
|
|
935
|
+
W.sentAt && /* @__PURE__ */ x("p", {
|
|
912
936
|
className: "text-xs text-muted-foreground mt-1",
|
|
913
|
-
children: ["Sent at: ", new Date(
|
|
937
|
+
children: ["Sent at: ", new Date(W.sentAt).toLocaleString()]
|
|
914
938
|
})
|
|
915
939
|
]
|
|
916
940
|
})]
|
|
917
941
|
})
|
|
918
942
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ x("div", {
|
|
920
944
|
className: "flex items-center gap-2 pt-2",
|
|
921
|
-
children: [/* @__PURE__ */
|
|
945
|
+
children: [/* @__PURE__ */ b(r, {
|
|
922
946
|
permission: i.CHANNEL_DELIVERY_SEND,
|
|
923
|
-
children: /* @__PURE__ */
|
|
924
|
-
|
|
925
|
-
|
|
947
|
+
children: /* @__PURE__ */ x("button", {
|
|
948
|
+
type: "button",
|
|
949
|
+
onClick: Je,
|
|
950
|
+
disabled: A === "send-test" || !B.trim(),
|
|
926
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",
|
|
927
|
-
children: [
|
|
952
|
+
children: [A === "send-test" ? /* @__PURE__ */ b(p, {
|
|
928
953
|
size: 16,
|
|
929
954
|
className: "animate-spin"
|
|
930
|
-
}) : /* @__PURE__ */
|
|
955
|
+
}) : /* @__PURE__ */ b(g, { size: 16 }), O("channel.sendTest", "Send Test")]
|
|
931
956
|
})
|
|
932
|
-
}), /* @__PURE__ */
|
|
933
|
-
|
|
957
|
+
}), /* @__PURE__ */ b("button", {
|
|
958
|
+
type: "button",
|
|
959
|
+
onClick: () => z(!1),
|
|
934
960
|
className: "px-4 py-2 text-sm text-muted-foreground hover:bg-muted rounded-lg transition-colors",
|
|
935
|
-
children:
|
|
961
|
+
children: O("channel.close", "Close")
|
|
936
962
|
})]
|
|
937
963
|
})
|
|
938
964
|
]
|
|
@@ -944,6 +970,6 @@ function O() {
|
|
|
944
970
|
});
|
|
945
971
|
}
|
|
946
972
|
//#endregion
|
|
947
|
-
export {
|
|
973
|
+
export { T as ChannelDetailsPage };
|
|
948
974
|
|
|
949
975
|
//# sourceMappingURL=ChannelDetailsPage.js.map
|