be-components 7.4.3 → 7.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +0 -2
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/NotificationManager/api/index.js +448 -0
  4. package/lib/commonjs/NotificationManager/api/index.js.map +1 -0
  5. package/lib/commonjs/NotificationManager/index.js +1177 -0
  6. package/lib/commonjs/NotificationManager/index.js.map +1 -0
  7. package/lib/commonjs/index.js +20 -0
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/types.d.js.map +1 -1
  10. package/lib/module/ApiOverrides/index.js +0 -2
  11. package/lib/module/ApiOverrides/index.js.map +1 -1
  12. package/lib/module/NotificationManager/api/index.js +441 -0
  13. package/lib/module/NotificationManager/api/index.js.map +1 -0
  14. package/lib/module/NotificationManager/index.js +1158 -0
  15. package/lib/module/NotificationManager/index.js.map +1 -0
  16. package/lib/module/index.js +3 -1
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/module/types.d.js.map +1 -1
  19. package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
  20. package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts +804 -0
  21. package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts.map +1 -0
  22. package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts +818 -0
  23. package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts.map +1 -0
  24. package/lib/typescript/lib/commonjs/index.d.ts +803 -0
  25. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  26. package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
  27. package/lib/typescript/lib/module/NotificationManager/api/index.d.ts +803 -0
  28. package/lib/typescript/lib/module/NotificationManager/api/index.d.ts.map +1 -0
  29. package/lib/typescript/lib/module/NotificationManager/index.d.ts +19 -0
  30. package/lib/typescript/lib/module/NotificationManager/index.d.ts.map +1 -0
  31. package/lib/typescript/lib/module/index.d.ts +4 -1
  32. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  33. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  34. package/lib/typescript/src/NotificationManager/api/index.d.ts +822 -0
  35. package/lib/typescript/src/NotificationManager/api/index.d.ts.map +1 -0
  36. package/lib/typescript/src/NotificationManager/index.d.ts +21 -0
  37. package/lib/typescript/src/NotificationManager/index.d.ts.map +1 -0
  38. package/lib/typescript/src/index.d.ts +3 -1
  39. package/lib/typescript/src/index.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/ApiOverrides/index.ts +0 -2
  42. package/src/NotificationManager/api/index.ts +134 -0
  43. package/src/NotificationManager/index.tsx +917 -0
  44. package/src/index.tsx +6 -1
  45. package/src/types.d.ts +70 -0
@@ -0,0 +1,1177 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "NotificationApi", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _api.NotificationApi;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "NotificationHelpers", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _api.NotificationHelpers;
16
+ }
17
+ });
18
+ exports.default = void 0;
19
+ var _react = _interopRequireWildcard(require("react"));
20
+ var _reactNative = require("react-native");
21
+ var _Themed = require("../Components/Themed");
22
+ var _useColors = require("../constants/useColors");
23
+ var _api = require("./api");
24
+ var _Components = require("../Components");
25
+ var _Dropdown = _interopRequireDefault(require("../Components/Dropdown"));
26
+ var _ConfirmAlert = require("../Components/ConfirmAlert");
27
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
28
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
29
+ const notification_types = [{
30
+ label: 'Order Notifications',
31
+ value: 'order_notifications'
32
+ }, {
33
+ label: 'Competition Notifications',
34
+ value: 'competition_notifications'
35
+ }, {
36
+ label: 'Social Notifications',
37
+ value: 'social_notifications'
38
+ }];
39
+ const sections = ['header', 'top_row', 'preview', 'second_row'];
40
+ const NotificationManager = ({
41
+ player_ids,
42
+ me,
43
+ float,
44
+ header_style,
45
+ footer_style,
46
+ notification_type,
47
+ default_path_name,
48
+ onFocusPosition,
49
+ default_params,
50
+ onComplete,
51
+ onClose
52
+ }) => {
53
+ const Colors = (0, _useColors.useColors)();
54
+ const [loading, setLoading] = (0, _react.useState)(false);
55
+ const [loadingGroups, setLoadingGroups] = (0, _react.useState)(false);
56
+ const [notificationGroups, setNotificationGroups] = (0, _react.useState)([]);
57
+ const [selectedGroup, setSelectedGroup] = (0, _react.useState)(null);
58
+ const [showGroupsModal, setShowGroupsModal] = (0, _react.useState)(false);
59
+ const [groupMemberIds, setGroupMemberIds] = (0, _react.useState)([]);
60
+ const [showEditCustomGroupModal, setShowEditCustomGroupModal] = (0, _react.useState)(false);
61
+ const [customGroupCsv, setCustomGroupCsv] = (0, _react.useState)('');
62
+ const [sendingProgress, setSendingProgress] = (0, _react.useState)(null);
63
+
64
+ // Create a custom group (always available, even if player_ids is empty)
65
+ const customGroup = {
66
+ notification_group_id: 'custom_group',
67
+ name: 'Custom Recipients',
68
+ description: player_ids.length > 0 ? `${player_ids.length} selected recipients` : 'Create custom recipient list',
69
+ status: 'active',
70
+ grouping_function: '',
71
+ player_count: player_ids.length,
72
+ create_datetime: new Date().toISOString(),
73
+ last_update_datetime: new Date().toISOString()
74
+ };
75
+
76
+ // Initialize selectedPath based on default_path_name if provided
77
+ const initialPath = default_path_name ? _api.NotificationHelpers.app_paths.find(p => p.path_name === default_path_name) || _api.NotificationHelpers.app_paths[0] : _api.NotificationHelpers.app_paths[0];
78
+ const [selectedPath, setSelectedPath] = (0, _react.useState)(initialPath);
79
+ const [customPathName, setCustomPathName] = (0, _react.useState)('');
80
+ const [pathParams, setPathParams] = (0, _react.useState)(default_params || {});
81
+ const [pathSearch, setPathSearch] = (0, _react.useState)('');
82
+ const [notification, setNotification] = (0, _react.useState)({
83
+ type: notification_type || 'order_notifications',
84
+ notify_body_type: 'custom',
85
+ title: '',
86
+ body: '',
87
+ status: 'pending',
88
+ expire_time: Date.now() + 7 * 24 * 60 * 60 * 1000 // 7 days from now
89
+ });
90
+ (0, _react.useEffect)(() => {
91
+ startUp();
92
+ // Auto-select custom group if initial player_ids provided
93
+ if (player_ids.length > 0) {
94
+ setSelectedGroup(customGroup);
95
+ setGroupMemberIds(player_ids);
96
+ }
97
+ }, []);
98
+ (0, _react.useEffect)(() => {
99
+ // Initialize pathParams when selectedPath changes, merging with default_params
100
+ const mergedParams = {
101
+ ...selectedPath?.params,
102
+ ...(default_params || {})
103
+ };
104
+ setPathParams(mergedParams);
105
+ }, [selectedPath]);
106
+ const startUp = () => {
107
+ _api.NotificationApi.setEnvironment();
108
+ };
109
+ const loadNotificationGroups = async () => {
110
+ setLoadingGroups(true);
111
+ const groups = await _api.NotificationApi.getActiveNotificationGroups();
112
+ setNotificationGroups(groups);
113
+ setLoadingGroups(false);
114
+ };
115
+ const handleSelectGroup = async group_id => {
116
+ setLoadingGroups(true);
117
+
118
+ // Check if it's the custom group
119
+ if (group_id === 'custom_group') {
120
+ // If custom group already selected with edited IDs, keep those IDs
121
+ // Otherwise use the initial player_ids
122
+ if (selectedGroup?.notification_group_id === 'custom_group' && groupMemberIds.length > 0) {
123
+ // Keep existing edited IDs
124
+ setSelectedGroup({
125
+ ...customGroup,
126
+ description: `${groupMemberIds.length} selected recipients`,
127
+ player_count: groupMemberIds.length
128
+ });
129
+ } else {
130
+ setSelectedGroup(customGroup);
131
+ setGroupMemberIds(player_ids);
132
+ }
133
+ setLoadingGroups(false);
134
+ setShowGroupsModal(false);
135
+ return;
136
+ }
137
+ const group = notificationGroups.find(g => g.notification_group_id === group_id);
138
+ setSelectedGroup(group || null);
139
+
140
+ // Fetch all members for this group
141
+ const members = await _api.NotificationApi.getNotificationGroupMembersByGroup(group_id);
142
+
143
+ // Flatten all player_ids arrays from all member objects
144
+ const memberPlayerIds = members.flatMap(m => m.player_ids);
145
+ setGroupMemberIds(memberPlayerIds);
146
+ setLoadingGroups(false);
147
+ setShowGroupsModal(false);
148
+ };
149
+ const handleRemoveGroup = () => {
150
+ setSelectedGroup(null);
151
+ setGroupMemberIds([]);
152
+ };
153
+ const handleOpenEditCustomGroup = () => {
154
+ // Populate CSV with current groupMemberIds
155
+ setCustomGroupCsv(groupMemberIds.join(','));
156
+ setShowEditCustomGroupModal(true);
157
+ };
158
+ const handleSaveCustomGroup = () => {
159
+ // Parse CSV and update groupMemberIds
160
+ const ids = customGroupCsv.split(',').map(id => id.trim()).filter(id => id.length > 0);
161
+ setGroupMemberIds(ids);
162
+
163
+ // Update the custom group description
164
+ if (customGroup && selectedGroup?.notification_group_id === 'custom_group') {
165
+ const updatedGroup = {
166
+ ...customGroup,
167
+ description: `${ids.length} selected recipients`,
168
+ player_count: ids.length
169
+ };
170
+ setSelectedGroup(updatedGroup);
171
+ }
172
+ setShowEditCustomGroupModal(false);
173
+ };
174
+
175
+ // Filter and sort paths: primary first (alphabetically), then others (alphabetically), limited by search
176
+ const filteredPaths = (0, _react.useMemo)(() => {
177
+ let filtered = _api.NotificationHelpers.app_paths;
178
+
179
+ // Apply search filter
180
+ if (pathSearch) {
181
+ filtered = filtered.filter(path => path.label.toLowerCase().includes(pathSearch.toLowerCase()) || path.path_name.toLowerCase().includes(pathSearch.toLowerCase()));
182
+ }
183
+
184
+ // Sort: primary paths first (alphabetically), then non-primary (alphabetically)
185
+ const sorted = [...filtered].sort((a, b) => {
186
+ if (a.primary && !b.primary) return -1;
187
+ if (!a.primary && b.primary) return 1;
188
+ return a.label.localeCompare(b.label);
189
+ });
190
+
191
+ // Limit to 15 results
192
+ return sorted.slice(0, 15);
193
+ }, [pathSearch]);
194
+ const isValid = () => {
195
+ const errors = [];
196
+ if (!notification.title || notification.title.trim() === '') {
197
+ errors.push('Notification title is required');
198
+ }
199
+ if (!notification.body || notification.body.trim() === '') {
200
+ errors.push('Notification body is required');
201
+ }
202
+ if (groupMemberIds.length === 0) {
203
+ errors.push('At least one recipient is required');
204
+ }
205
+
206
+ // Check required params
207
+ if (selectedPath?.requiredParams && selectedPath.requiredParams.length > 0) {
208
+ selectedPath.requiredParams.forEach(paramKey => {
209
+ if (!pathParams[paramKey] || pathParams[paramKey].trim() === '') {
210
+ errors.push(`Required parameter "${paramKey}" is missing`);
211
+ }
212
+ });
213
+ }
214
+
215
+ // Check custom path name
216
+ if (selectedPath?.path_name === 'custom' && (!customPathName || customPathName.trim() === '')) {
217
+ errors.push('Custom path name is required');
218
+ }
219
+ return errors;
220
+ };
221
+ const confirmSendNotification = options => {
222
+ const errors = isValid();
223
+ if (errors.length > 0) {
224
+ const errorMessage = 'Please fix the following errors:\n\n' + errors.map((err, idx) => `${idx + 1}. ${err}`).join('\n');
225
+ alert(errorMessage);
226
+ return;
227
+ }
228
+ (0, _ConfirmAlert.showConfirmAlert)('Are you sure?', options?.test ? 'This will send a test notification to you only' : 'This will send a notification to all users selected', () => handleSendNotification(options), () => console.log('Done'));
229
+ };
230
+ const handleSendNotification = async options => {
231
+ // Use only group member IDs (no individual player_ids)
232
+ let player_ids_to_send = [...groupMemberIds];
233
+ if (options?.test) {
234
+ //Change to the admin
235
+ player_ids_to_send = [me.player_id];
236
+ }
237
+ setLoading(true);
238
+ try {
239
+ // Determine final path_name
240
+ const finalPathName = selectedPath?.path_name === 'custom' ? customPathName : selectedPath?.path_name;
241
+
242
+ // Construct the complete notification object with all required fields
243
+ const completeNotification = {
244
+ player_notification_id: '',
245
+ // Will be generated by backend
246
+ player_id: me.player_id,
247
+ type: notification.type,
248
+ notify_body_type: notification.notify_body_type || 'custom',
249
+ title: notification.title,
250
+ body: notification.body,
251
+ options: {
252
+ id: Date.now().toString(),
253
+ body: notification.body,
254
+ icon: 'default',
255
+ type: notification.type || 'order_notifications',
256
+ data: {
257
+ id: Date.now().toString(),
258
+ player_id: me.player_id,
259
+ pageStack: 'MainStack',
260
+ page: 'Notifications',
261
+ pageParams: {},
262
+ url: notification.link_override,
263
+ path_name: finalPathName,
264
+ params: pathParams
265
+ }
266
+ },
267
+ status: 'unread',
268
+ link_override: notification.link_override,
269
+ expire_time: 0,
270
+ create_datetime: new Date().toISOString(),
271
+ last_update_datetime: new Date().toISOString()
272
+ };
273
+
274
+ // Split into batches of 500
275
+ const BATCH_SIZE = 500;
276
+ const batches = [];
277
+ for (let i = 0; i < player_ids_to_send.length; i += BATCH_SIZE) {
278
+ batches.push(player_ids_to_send.slice(i, i + BATCH_SIZE));
279
+ }
280
+
281
+ // Send notifications in batches
282
+ for (let i = 0; i < batches.length; i++) {
283
+ const batch = batches[i];
284
+ if (!batch) continue;
285
+ setSendingProgress({
286
+ current: i + 1,
287
+ total: batches.length
288
+ });
289
+ await _api.NotificationApi.broadcastNotifications(completeNotification, batch);
290
+ }
291
+ setSendingProgress(null);
292
+ if (onComplete) {
293
+ onComplete(completeNotification);
294
+ }
295
+
296
+ // Only reset form if not a test send
297
+ if (!options?.test) {
298
+ setNotification({
299
+ type: 'order_notifications',
300
+ notify_body_type: 'custom',
301
+ title: '',
302
+ body: '',
303
+ status: 'pending',
304
+ expire_time: Date.now() + 7 * 24 * 60 * 60 * 1000
305
+ });
306
+ }
307
+ const recipientCount = options?.test ? 1 : groupMemberIds.length;
308
+ const recipientMessage = options?.test ? 'Test notification sent to you!' : `Notification sent successfully to ${recipientCount} user${recipientCount !== 1 ? 's' : ''}!`;
309
+ alert(recipientMessage);
310
+ } catch (error) {
311
+ console.error('Error sending notification:', error);
312
+ alert('Failed to send notification. Please try again.');
313
+ }
314
+ setLoading(false);
315
+ };
316
+ const renderSections = data => {
317
+ switch (data.item) {
318
+ case 'header':
319
+ const headerTotalRecipients = groupMemberIds.length;
320
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
321
+ type: "header",
322
+ style: {
323
+ flexDirection: 'row',
324
+ alignItems: 'center',
325
+ padding: 10,
326
+ ...header_style
327
+ }
328
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
329
+ transparent: true,
330
+ style: {
331
+ flex: 1
332
+ }
333
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
334
+ theme: "h1"
335
+ }, "Send Notification"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
336
+ theme: "description",
337
+ style: {
338
+ marginTop: 3
339
+ }
340
+ }, "Sending to ", headerTotalRecipients, " users")), onClose && /*#__PURE__*/_react.default.createElement(_Themed.Button, {
341
+ transparent: true,
342
+ onPress: onClose
343
+ }, /*#__PURE__*/_react.default.createElement(_Components.Icons.CloseIcon, {
344
+ size: 16,
345
+ color: Colors.text.h1
346
+ })));
347
+ case 'preview':
348
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
349
+ float: true,
350
+ style: {
351
+ margin: 5
352
+ }
353
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
354
+ type: "header",
355
+ style: {
356
+ flexDirection: 'row',
357
+ alignItems: 'center',
358
+ padding: 10,
359
+ borderTopRightRadius: 8,
360
+ borderTopLeftRadius: 8
361
+ }
362
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
363
+ transparent: true,
364
+ style: {
365
+ flex: 1
366
+ }
367
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
368
+ theme: "h1"
369
+ }, "Preview"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
370
+ theme: "description",
371
+ style: {
372
+ marginTop: 3
373
+ }
374
+ }, "What will this notification look like?"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
375
+ float: true,
376
+ style: {
377
+ padding: 15,
378
+ margin: 10,
379
+ borderRadius: 8,
380
+ borderWidth: 1,
381
+ borderColor: Colors.borders.light
382
+ }
383
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
384
+ transparent: true,
385
+ style: {
386
+ flexDirection: 'row',
387
+ alignItems: 'center'
388
+ }
389
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
390
+ style: {
391
+ width: 40,
392
+ height: 40,
393
+ borderRadius: 8,
394
+ justifyContent: 'center',
395
+ alignItems: 'center',
396
+ marginRight: 12
397
+ }
398
+ }, /*#__PURE__*/_react.default.createElement(_Components.Icons.NotificationIcon, {
399
+ size: 20,
400
+ color: Colors.text.h1
401
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
402
+ transparent: true,
403
+ style: {
404
+ flex: 1
405
+ }
406
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
407
+ theme: "h1"
408
+ }, notification.title || 'Notification Title'), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
409
+ theme: "description",
410
+ style: {
411
+ marginTop: 4
412
+ }
413
+ }, notification.body || 'Notification message will appear here')))));
414
+ case 'top_row':
415
+ const totalRecipients = groupMemberIds.length;
416
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
417
+ style: {
418
+ flexDirection: 'row',
419
+ flexWrap: 'wrap'
420
+ }
421
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
422
+ float: true,
423
+ style: {
424
+ flexGrow: 1,
425
+ minWidth: 300,
426
+ padding: 10,
427
+ margin: 5
428
+ }
429
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
430
+ transparent: true,
431
+ style: {
432
+ flexDirection: 'row',
433
+ alignItems: 'center',
434
+ justifyContent: 'space-between',
435
+ marginBottom: 10
436
+ }
437
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
438
+ transparent: true,
439
+ style: {
440
+ flex: 1
441
+ }
442
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
443
+ theme: "h2"
444
+ }, "Recipients (", totalRecipients, ")"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
445
+ theme: "description",
446
+ style: {
447
+ marginTop: 4
448
+ }
449
+ }, totalRecipients === 0 ? 'No recipients selected' : 'Selected group')), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
450
+ type: "action",
451
+ onPress: () => {
452
+ loadNotificationGroups();
453
+ setShowGroupsModal(true);
454
+ },
455
+ style: {
456
+ padding: 8
457
+ }
458
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
459
+ theme: "h1",
460
+ color: Colors.text.white
461
+ }, "Select Group"))), selectedGroup && /*#__PURE__*/_react.default.createElement(_Themed.View, {
462
+ float: true,
463
+ style: {
464
+ flexDirection: 'row',
465
+ alignItems: 'center',
466
+ justifyContent: 'space-between',
467
+ padding: 12,
468
+ borderRadius: 8,
469
+ marginTop: 5
470
+ }
471
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
472
+ transparent: true,
473
+ style: {
474
+ flex: 1
475
+ }
476
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
477
+ theme: "h1"
478
+ }, selectedGroup.name), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
479
+ theme: "description",
480
+ style: {
481
+ marginTop: 2
482
+ }
483
+ }, groupMemberIds.length, " members")), /*#__PURE__*/_react.default.createElement(_Themed.View, {
484
+ transparent: true,
485
+ style: {
486
+ flexDirection: 'row'
487
+ }
488
+ }, selectedGroup.notification_group_id === 'custom_group' && /*#__PURE__*/_react.default.createElement(_Themed.Button, {
489
+ type: "action",
490
+ onPress: handleOpenEditCustomGroup,
491
+ style: {
492
+ padding: 8,
493
+ marginRight: 8
494
+ }
495
+ }, /*#__PURE__*/_react.default.createElement(_Components.Icons.EditIcon, {
496
+ size: 16,
497
+ color: Colors.text.white
498
+ })), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
499
+ type: "error",
500
+ onPress: handleRemoveGroup,
501
+ style: {
502
+ padding: 8
503
+ }
504
+ }, /*#__PURE__*/_react.default.createElement(_Components.Icons.CloseIcon, {
505
+ size: 16,
506
+ color: Colors.text.white
507
+ }))))));
508
+ case 'second_row':
509
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
510
+ style: {
511
+ flexDirection: 'row',
512
+ flexWrap: 'wrap'
513
+ }
514
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
515
+ float: true,
516
+ style: {
517
+ minWidth: 300,
518
+ flexGrow: 1,
519
+ margin: 5
520
+ }
521
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
522
+ type: "header",
523
+ style: {
524
+ flexDirection: 'row',
525
+ alignItems: 'center',
526
+ padding: 10,
527
+ borderTopRightRadius: 8,
528
+ borderTopLeftRadius: 8
529
+ }
530
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
531
+ transparent: true,
532
+ style: {
533
+ flex: 1
534
+ }
535
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
536
+ theme: "h1"
537
+ }, "Notification Message"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
538
+ theme: "description",
539
+ style: {
540
+ marginTop: 3
541
+ }
542
+ }, "Update notification message below"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
543
+ transparent: true,
544
+ type: "body"
545
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
546
+ transparent: true,
547
+ style: {
548
+ padding: 10
549
+ }
550
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
551
+ theme: "h2",
552
+ style: {
553
+ marginBottom: 10
554
+ }
555
+ }, "Notification Title"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
556
+ value: notification.title,
557
+ onFocusPosition: onFocusPosition,
558
+ placeholder: "Enter notification title",
559
+ onChangeText: title => setNotification({
560
+ ...notification,
561
+ title
562
+ })
563
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
564
+ transparent: true,
565
+ style: {
566
+ padding: 10
567
+ }
568
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
569
+ theme: "h2",
570
+ style: {
571
+ marginBottom: 10
572
+ }
573
+ }, "Notification Body"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
574
+ value: notification.body,
575
+ onFocusPosition: onFocusPosition,
576
+ placeholder: "Enter notification message",
577
+ onChangeText: body => setNotification({
578
+ ...notification,
579
+ body
580
+ }),
581
+ multiline: true,
582
+ numberOfLines: 6,
583
+ style: {
584
+ padding: 12,
585
+ borderRadius: 8,
586
+ minHeight: 120
587
+ }
588
+ })))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
589
+ float: true,
590
+ style: {
591
+ flexGrow: 1,
592
+ minWidth: 300,
593
+ margin: 5
594
+ }
595
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
596
+ type: "header",
597
+ style: {
598
+ flexDirection: 'row',
599
+ alignItems: 'center',
600
+ padding: 10,
601
+ borderTopRightRadius: 8,
602
+ borderTopLeftRadius: 8
603
+ }
604
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
605
+ transparent: true,
606
+ style: {
607
+ flex: 1
608
+ }
609
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
610
+ theme: "h1"
611
+ }, "Notification Settings"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
612
+ theme: "description",
613
+ style: {
614
+ marginTop: 3
615
+ }
616
+ }, "Manage settigns below"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
617
+ transparent: true,
618
+ type: "body"
619
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
620
+ type: "row",
621
+ style: {
622
+ padding: 10
623
+ }
624
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
625
+ theme: "h2",
626
+ style: {
627
+ flex: 1
628
+ }
629
+ }, "Notification Type"), /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
630
+ selected_value: notification_types.find(t => t.value === notification.type)?.label ?? '',
631
+ dropdown_options: [{
632
+ value: 'type',
633
+ eligible_options: notification_types.map(t => t.label)
634
+ }],
635
+ onOptionSelect: selected => {
636
+ const type = notification_types.find(t => t.label === selected)?.value;
637
+ setNotification({
638
+ ...notification,
639
+ type: type
640
+ });
641
+ }
642
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
643
+ transparent: true,
644
+ style: {
645
+ padding: 10
646
+ }
647
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
648
+ theme: "h2",
649
+ style: {
650
+ marginBottom: 10
651
+ }
652
+ }, "Link Override (Optional)"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
653
+ value: notification.link_override || '',
654
+ onFocusPosition: onFocusPosition,
655
+ placeholder: "https://example.com",
656
+ onChangeText: link_override => setNotification({
657
+ ...notification,
658
+ link_override
659
+ }),
660
+ style: {
661
+ padding: 12,
662
+ borderRadius: 8
663
+ }
664
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
665
+ transparent: true,
666
+ style: {
667
+ padding: 10
668
+ }
669
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
670
+ theme: "h2",
671
+ style: {
672
+ marginBottom: 10
673
+ }
674
+ }, "Deep Link Path"), /*#__PURE__*/_react.default.createElement(_Themed.View, {
675
+ type: "header",
676
+ style: {
677
+ padding: 12,
678
+ borderRadius: 8,
679
+ marginBottom: 8,
680
+ flexDirection: 'row',
681
+ alignItems: 'center',
682
+ justifyContent: 'space-between'
683
+ }
684
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
685
+ transparent: true,
686
+ style: {
687
+ flex: 1
688
+ }
689
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
690
+ theme: "h1",
691
+ style: {
692
+ marginBottom: 2
693
+ }
694
+ }, selectedPath?.label), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
695
+ theme: "description",
696
+ style: {
697
+ fontSize: 12
698
+ }
699
+ }, selectedPath?.path_name)), selectedPath?.primary && /*#__PURE__*/_react.default.createElement(_Themed.View, {
700
+ transparent: true,
701
+ style: {
702
+ paddingHorizontal: 8,
703
+ paddingVertical: 4,
704
+ borderRadius: 4
705
+ }
706
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
707
+ theme: "description",
708
+ color: Colors.text.white,
709
+ style: {
710
+ fontSize: 10
711
+ }
712
+ }, "Primary"))), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
713
+ value: pathSearch,
714
+ placeholder: "Search paths to change...",
715
+ onFocusPosition: onFocusPosition,
716
+ onChangeText: setPathSearch,
717
+ style: {
718
+ padding: 12,
719
+ borderRadius: 8,
720
+ marginBottom: 8
721
+ }
722
+ }), pathSearch && /*#__PURE__*/_react.default.createElement(_Themed.View, {
723
+ float: true,
724
+ style: {
725
+ maxHeight: 300,
726
+ borderRadius: 8,
727
+ borderWidth: 1,
728
+ borderColor: Colors.borders.light
729
+ }
730
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
731
+ data: filteredPaths,
732
+ keyExtractor: item => item.path_name,
733
+ renderItem: ({
734
+ item
735
+ }) => /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
736
+ onPress: () => {
737
+ setSelectedPath(item);
738
+ setPathSearch('');
739
+ },
740
+ style: {
741
+ padding: 12,
742
+ borderBottomWidth: 1,
743
+ borderColor: Colors.borders.light
744
+ }
745
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
746
+ transparent: true,
747
+ style: {
748
+ flexDirection: 'row',
749
+ alignItems: 'center',
750
+ justifyContent: 'space-between'
751
+ }
752
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
753
+ transparent: true,
754
+ style: {
755
+ flex: 1
756
+ }
757
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
758
+ theme: "h2",
759
+ style: {
760
+ marginBottom: 2
761
+ }
762
+ }, item.label), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
763
+ theme: "description",
764
+ style: {
765
+ fontSize: 11
766
+ }
767
+ }, item.path_name)), item.primary && /*#__PURE__*/_react.default.createElement(_Themed.View, {
768
+ transparent: true,
769
+ style: {
770
+ paddingHorizontal: 6,
771
+ paddingVertical: 2,
772
+ borderRadius: 4,
773
+ marginLeft: 8
774
+ }
775
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
776
+ theme: "description",
777
+ color: Colors.text.white,
778
+ style: {
779
+ fontSize: 9
780
+ }
781
+ }, "Primary")))),
782
+ ListEmptyComponent: /*#__PURE__*/_react.default.createElement(_Themed.View, {
783
+ style: {
784
+ padding: 20,
785
+ alignItems: 'center'
786
+ }
787
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
788
+ theme: "description"
789
+ }, "No paths found"))
790
+ }))), Object.keys(selectedPath?.params ?? {}).length > 0 && /*#__PURE__*/_react.default.createElement(_Themed.View, {
791
+ style: {
792
+ padding: 10
793
+ }
794
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
795
+ theme: "h2",
796
+ style: {
797
+ marginBottom: 8
798
+ }
799
+ }, "Path Parameters"), /*#__PURE__*/_react.default.createElement(_Themed.View, {
800
+ type: "header",
801
+ style: {
802
+ padding: 12,
803
+ borderRadius: 8
804
+ }
805
+ }, Object.keys(selectedPath?.params ?? {}).map(paramKey => {
806
+ const isRequired = selectedPath?.requiredParams.includes(paramKey);
807
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
808
+ key: paramKey,
809
+ transparent: true,
810
+ style: {
811
+ marginBottom: 12
812
+ }
813
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
814
+ transparent: true,
815
+ style: {
816
+ flexDirection: 'row',
817
+ alignItems: 'center',
818
+ marginBottom: 4
819
+ }
820
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
821
+ theme: "description"
822
+ }, paramKey), isRequired ? /*#__PURE__*/_react.default.createElement(_Themed.View, {
823
+ transparent: true,
824
+ style: {
825
+ marginLeft: 4,
826
+ paddingHorizontal: 6,
827
+ paddingVertical: 2,
828
+ backgroundColor: Colors.text.error,
829
+ borderRadius: 4
830
+ }
831
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
832
+ theme: "description",
833
+ color: Colors.text.white,
834
+ style: {
835
+ fontSize: 10
836
+ }
837
+ }, "Required")) : /*#__PURE__*/_react.default.createElement(_Themed.View, {
838
+ transparent: true,
839
+ style: {
840
+ marginLeft: 4,
841
+ paddingHorizontal: 6,
842
+ paddingVertical: 2,
843
+ backgroundColor: Colors.borders.light,
844
+ borderRadius: 4
845
+ }
846
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
847
+ theme: "description",
848
+ style: {
849
+ fontSize: 10
850
+ }
851
+ }, "Optional"))), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
852
+ value: pathParams[paramKey] || '',
853
+ onFocusPosition: onFocusPosition,
854
+ placeholder: `Enter ${paramKey}${isRequired ? ' (required)' : ' (optional)'}`,
855
+ onChangeText: value => setPathParams({
856
+ ...pathParams,
857
+ [paramKey]: value
858
+ }),
859
+ style: {
860
+ padding: 10,
861
+ borderRadius: 8,
862
+ borderWidth: isRequired ? 2 : 1,
863
+ borderColor: isRequired && !pathParams[paramKey] ? Colors.text.error : Colors.borders.light
864
+ }
865
+ }));
866
+ })))), selectedPath?.path_name === 'custom' && /*#__PURE__*/_react.default.createElement(_Themed.View, {
867
+ style: {
868
+ marginBottom: 20
869
+ }
870
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
871
+ theme: "h2",
872
+ style: {
873
+ marginBottom: 8
874
+ }
875
+ }, "Custom Path Name"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
876
+ value: customPathName,
877
+ onFocusPosition: onFocusPosition,
878
+ placeholder: "/your/custom/path",
879
+ onChangeText: setCustomPathName,
880
+ style: {
881
+ padding: 12,
882
+ borderRadius: 8
883
+ }
884
+ }))));
885
+ default:
886
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
887
+ }
888
+ };
889
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
890
+ float: float,
891
+ style: {
892
+ flex: 1
893
+ }
894
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
895
+ transparent: true,
896
+ style: {
897
+ flex: 1
898
+ }
899
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
900
+ data: sections,
901
+ keyExtractor: item => item,
902
+ key: 'notification_manager_list',
903
+ renderItem: renderSections
904
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
905
+ type: "footer",
906
+ style: {
907
+ flexDirection: 'row',
908
+ alignItems: 'center',
909
+ padding: 10,
910
+ ...footer_style
911
+ }
912
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
913
+ type: "action",
914
+ disabled: loading,
915
+ loading: loading,
916
+ onPress: () => confirmSendNotification({
917
+ test: true
918
+ }),
919
+ style: {
920
+ flex: 1,
921
+ opacity: loading || isValid().length > 0 ? 0.5 : 1
922
+ }
923
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
924
+ textAlign: "center",
925
+ theme: "h1",
926
+ color: Colors.text.white
927
+ }, loading ? sendingProgress ? `Sending ${sendingProgress.current}/${sendingProgress.total}` : 'Sending...' : 'Send Test')), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
928
+ type: "success",
929
+ disabled: loading,
930
+ loading: loading,
931
+ onPress: () => confirmSendNotification(),
932
+ style: {
933
+ flex: 2,
934
+ marginLeft: 5,
935
+ opacity: loading || isValid().length > 0 ? 0.5 : 1
936
+ }
937
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
938
+ textAlign: "center",
939
+ theme: "h1",
940
+ color: Colors.text.white
941
+ }, loading ? sendingProgress ? `Sending batch ${sendingProgress.current} of ${sendingProgress.total}` : 'Sending...' : 'Send Notification'))), showGroupsModal && /*#__PURE__*/_react.default.createElement(_Themed.View, {
942
+ type: "blur",
943
+ style: {
944
+ position: 'absolute',
945
+ top: 0,
946
+ left: 0,
947
+ right: 0,
948
+ bottom: 0,
949
+ padding: 20
950
+ }
951
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
952
+ float: true,
953
+ style: {
954
+ flex: 1
955
+ }
956
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
957
+ type: "header",
958
+ style: {
959
+ flexDirection: 'row',
960
+ alignItems: 'center',
961
+ padding: 10,
962
+ borderTopRightRadius: 8,
963
+ borderTopLeftRadius: 8
964
+ }
965
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
966
+ transparent: true,
967
+ style: {
968
+ flex: 1
969
+ }
970
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
971
+ theme: "h1"
972
+ }, "Notification Groups"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
973
+ theme: "description",
974
+ style: {
975
+ marginTop: 3
976
+ }
977
+ }, "Select a group to send to"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
978
+ style: {
979
+ flex: 1
980
+ }
981
+ }, loadingGroups ? /*#__PURE__*/_react.default.createElement(_Themed.View, {
982
+ style: {
983
+ padding: 40,
984
+ alignItems: 'center'
985
+ }
986
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
987
+ size: "large",
988
+ color: Colors.text.action
989
+ })) : /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
990
+ data: [
991
+ // Show custom group with current member count
992
+ selectedGroup?.notification_group_id === 'custom_group' && groupMemberIds.length > 0 ? {
993
+ ...customGroup,
994
+ description: `${groupMemberIds.length} selected recipients`,
995
+ player_count: groupMemberIds.length
996
+ } : customGroup, ...notificationGroups],
997
+ keyExtractor: item => item.notification_group_id,
998
+ renderItem: ({
999
+ item
1000
+ }) => /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
1001
+ onPress: () => handleSelectGroup(item.notification_group_id),
1002
+ style: {
1003
+ padding: 15,
1004
+ borderBottomWidth: 1,
1005
+ borderColor: Colors.borders.light
1006
+ }
1007
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1008
+ transparent: true
1009
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1010
+ transparent: true,
1011
+ style: {
1012
+ flexDirection: 'row',
1013
+ alignItems: 'center',
1014
+ justifyContent: 'space-between'
1015
+ }
1016
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1017
+ transparent: true,
1018
+ style: {
1019
+ flexDirection: 'row',
1020
+ alignItems: 'center',
1021
+ flex: 1
1022
+ }
1023
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1024
+ theme: "h1"
1025
+ }, item.name), item.notification_group_id === 'custom_group' && /*#__PURE__*/_react.default.createElement(_Themed.View, {
1026
+ transparent: true,
1027
+ style: {
1028
+ marginLeft: 8,
1029
+ paddingHorizontal: 6,
1030
+ paddingVertical: 2,
1031
+ backgroundColor: Colors.buttons.background.action,
1032
+ borderRadius: 4
1033
+ }
1034
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1035
+ theme: "description",
1036
+ color: Colors.text.white,
1037
+ style: {
1038
+ fontSize: 10
1039
+ }
1040
+ }, "CUSTOM"))), item.player_count !== undefined && /*#__PURE__*/_react.default.createElement(_Themed.View, {
1041
+ transparent: true,
1042
+ style: {
1043
+ marginLeft: 8,
1044
+ paddingHorizontal: 8,
1045
+ paddingVertical: 4,
1046
+ backgroundColor: Colors.views.header,
1047
+ borderRadius: 4
1048
+ }
1049
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1050
+ theme: "description",
1051
+ style: {
1052
+ fontSize: 12,
1053
+ fontWeight: '600'
1054
+ }
1055
+ }, item.player_count.toLocaleString(), " users"))), item.description && /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1056
+ theme: "description",
1057
+ style: {
1058
+ marginTop: 4
1059
+ }
1060
+ }, item.description))),
1061
+ ListEmptyComponent: /*#__PURE__*/_react.default.createElement(_Themed.View, {
1062
+ style: {
1063
+ padding: 40,
1064
+ alignItems: 'center'
1065
+ }
1066
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1067
+ theme: "description"
1068
+ }, "No groups found"))
1069
+ })), /*#__PURE__*/_react.default.createElement(_Themed.View, {
1070
+ type: "footer",
1071
+ style: {
1072
+ flexDirection: 'row',
1073
+ alignItems: 'center',
1074
+ padding: 10,
1075
+ borderBottomRightRadius: 8,
1076
+ borderBottomLeftRadius: 8
1077
+ }
1078
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
1079
+ style: {
1080
+ flex: 1
1081
+ },
1082
+ type: "close",
1083
+ title: "CLOSE",
1084
+ onPress: () => setShowGroupsModal(false)
1085
+ })))), showEditCustomGroupModal && /*#__PURE__*/_react.default.createElement(_Themed.View, {
1086
+ type: "blur",
1087
+ style: {
1088
+ position: 'absolute',
1089
+ top: 0,
1090
+ left: 0,
1091
+ right: 0,
1092
+ bottom: 0,
1093
+ padding: 20
1094
+ }
1095
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1096
+ float: true,
1097
+ style: {
1098
+ maxHeight: '80%',
1099
+ minHeight: 400
1100
+ }
1101
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1102
+ type: "header",
1103
+ style: {
1104
+ flexDirection: 'row',
1105
+ alignItems: 'center',
1106
+ padding: 10,
1107
+ borderTopRightRadius: 8,
1108
+ borderTopLeftRadius: 8
1109
+ }
1110
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
1111
+ transparent: true,
1112
+ style: {
1113
+ flex: 1
1114
+ }
1115
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1116
+ theme: "h1"
1117
+ }, "Edit Custom Recipients"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1118
+ theme: "description",
1119
+ style: {
1120
+ marginTop: 3
1121
+ }
1122
+ }, "Paste comma-separated player IDs"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
1123
+ style: {
1124
+ flex: 1,
1125
+ padding: 15
1126
+ }
1127
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1128
+ theme: "h2",
1129
+ style: {
1130
+ marginBottom: 10
1131
+ }
1132
+ }, "Player IDs (CSV format)"), /*#__PURE__*/_react.default.createElement(_Themed.TextInput, {
1133
+ value: customGroupCsv,
1134
+ onFocusPosition: onFocusPosition,
1135
+ placeholder: "98,100,2485,etc",
1136
+ onChangeText: setCustomGroupCsv,
1137
+ multiline: true,
1138
+ numberOfLines: 10,
1139
+ style: {
1140
+ padding: 12,
1141
+ borderRadius: 8,
1142
+ minHeight: 200,
1143
+ textAlignVertical: 'top'
1144
+ }
1145
+ }), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
1146
+ theme: "description",
1147
+ style: {
1148
+ marginTop: 8
1149
+ }
1150
+ }, "Current count: ", customGroupCsv.split(',').filter(id => id.trim().length > 0).length, " IDs")), /*#__PURE__*/_react.default.createElement(_Themed.View, {
1151
+ type: "footer",
1152
+ style: {
1153
+ flexDirection: 'row',
1154
+ alignItems: 'center',
1155
+ padding: 10,
1156
+ borderBottomRightRadius: 8,
1157
+ borderBottomLeftRadius: 8
1158
+ }
1159
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
1160
+ style: {
1161
+ flex: 1,
1162
+ marginRight: 5
1163
+ },
1164
+ type: "close",
1165
+ title: "CANCEL",
1166
+ onPress: () => setShowEditCustomGroupModal(false)
1167
+ }), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
1168
+ style: {
1169
+ flex: 1
1170
+ },
1171
+ type: "success",
1172
+ title: "SAVE",
1173
+ onPress: handleSaveCustomGroup
1174
+ })))));
1175
+ };
1176
+ var _default = exports.default = NotificationManager;
1177
+ //# sourceMappingURL=index.js.map