// Module ID: 15987 // Function ID: 15988 // Name: DeclarativeSystemNotifPermissionHelpers // Dependencies: [17, 14499, 14504, 4586, 1364, 5200, 2] // Exports: openSystemNotifSettings, refreshSystemNotifPermissions // Module 15987 (DeclarativeSystemNotifPermissionHelpers) import _mod17 from "module_17" /* 17 */; import ClientInfoUtilsAll from "ClientInfoUtils" /* 1364 */; import DeviceUtils from "DeviceUtils" /* 4586 */; import NativeDeviceSettingsModuleDefault from "NativeDeviceSettingsModule" /* 5200 */; import NotificationSettingsConstants from "NotificationSettingsConstants" /* 14499 */; import NativeNotifSettingsModuleDefault from "NativeNotifSettingsModule" /* 14504 */; import size from "module_2" /* 2 */; function refreshSystemNotifPermissions() { const tmp = NativeNotifSettingsModuleDefault; let androidNotifChannelStates; if (tmp != null) { const getAndroidNotifChannelStates = tmp.getAndroidNotifChannelStates; if (getAndroidNotifChannelStates != null) { androidNotifChannelStates = getAndroidNotifChannelStates(); } } if (null != androidNotifChannelStates) { const items = []; const _Set = Set; const set = new Set(); const iter = androidNotifChannelStates[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { if (0 === nextResult.importance) { let addResult = set.add(tmp11.channelId); } continue; } for (const item10036 of NOTIF_SETTINGS) { let tmp16 = item10036; if (set.has(item10036.string_id)) { let arr = items.push(tmp16.id); } continue; } const obj = { type: "DECLARATIVE_SYSTEM_NOTIF_PERMISSIONS_UPDATED", disabledSettings: items }; return obj; } } function openSystemNotifSettings(arg0) { for (const item10008 of NOTIF_SETTINGS) { if (item10008.id === arg0) { let string_id = item10008.string_id; obj.return(); break; } if (null != string_id) { let obj6 = DeviceUtils; if (obj6.getSystemVersionMajor() >= 26) { let entry = { key: "android.provider.extra.APP_PACKAGE", value: null }; let obj4 = ClientInfoUtilsAll; entry.value = obj4.getConstants().Identifier; let items = [entry, ]; let entry1 = { key: "android.provider.extra.CHANNEL_ID", value: string_id }; items[1] = entry1; let str = "android.settings.CHANNEL_NOTIFICATION_SETTINGS"; let sendIntentResult = Linking.sendIntent("android.settings.CHANNEL_NOTIFICATION_SETTINGS", items); } else { let obj2 = NativeDeviceSettingsModuleDefault; let result = obj2.openNotificationSettings(); } } } } const Linking = _mod17.Linking; const NOTIF_SETTINGS = NotificationSettingsConstants.NOTIF_SETTINGS; let result = size.fileFinishedImporting("modules/notifications/settings/DeclarativeSystemNotifPermissionHelpers.android.tsx"); export default { openSystemNotifSettings, refreshSystemNotifPermissions }; export { refreshSystemNotifPermissions }; export { openSystemNotifSettings };