/* Metro module 14772; source: modules/notification_center/native/NotificationCenterPermissionNudge.tsx; dependencies: [57, 31, 27, 661, 1376, 11873, 33, 4501, 697, 683, 10629, 4573, 1244, 4578, 11874, 5278, 5312, 14773, 7013, 1365, 2] */
function _fun111501(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:6, offset: 0x023a4b4f, size: 597 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
const env0_4 = value.useCallback;
const env0_5 = value.useEffect;
const env0_6 = (require(27) /* metro dependency 27 */).View;
value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.NOOP;
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_10 = value.EventActionType;
const env0_11 = value.EventActionLocation;
const env0_12 = value.NotificationNudgeAnalyticsAction;
const env0_13 = value.NotificationNudgeSurface;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {'flexDirection': 'row', 'paddingLeft': 24, 'paddingRight': null, 'paddingVertical': null,
'backgroundColor': null, 'alignItems': 'flex-start', 'borderBottomWidth': 1};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingRight = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingVertical = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.gap = 16;
object3.container = object5;
object3.contentContainer = {flex: 1};
const object6 = {'width': 48, 'height': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object6.backgroundColor = BACKGROUND_MOD_STRONG;
object3.iconContainer = object6;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.ctaButton = {alignSelf: 'flex-start', marginTop: PX_12};
const env0_16 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudge.tsx');
exports.default = NotificationCenterPermissionNudge;
}
function NotificationCenterBannerImpl({onDismiss}) { // fn#111502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:922, offset: 0x023a4da4, size: 740 bytes, params: 2, frame: 32
const styles = useStyles();
useEffect(function() {
var defaultImport = importDefault(dependencyMap[9]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER});
}, []);
const BellSlashIcon = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
const items3 = [];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const G6YBna = (require(1244) /* metro dependency 1244: indexNative */).t.G6YBna;
const items2 = [{Reflect.apply(string, intl,
[G6YBna])}];
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
items2[1] = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9CoPDE'])};
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = ;
items3[1] = {items2};
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
items3[2] = ;
return (
{items3}
);
}
function NotificationCenterPermissionNudge() { // fn#111506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:2333, offset: 0x023a51b5, size: 276 bytes, params: 1, frame: 19
const defaultImport = importDefault(14773) /* metro dependency 14773: NotificationCenterPermissionNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterPermissionNudge'}]).enabled;
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const value3 = null;
let NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER : value3;
const value5 = env0_3(Reflect.apply(useSelectedTimeRecurringDismissibleContent, useSelectedDismissibleContentModule,
[NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER, {cooldownDurationMs: 604800000}]), 2);
const property = value5[0];
const value6 = useCallback(_fun111507, [value5[1]]);
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER;
return property !== NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER ? value3 : ;
}
function NotificationCenterBannerImplOnPress() { // fn#111504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:1695, owner: NotificationCenterBannerImpl.onPress, offset: 0x023a50d7, size: 132 bytes, params: 1, frame: 18
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const NOTIFICATION_CENTER = EventActionLocation.NOTIFICATION_CENTER;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
NOTIFICATION_CENTER, NOOP]);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
const NOTIFICATION_CENTER_BANNER = NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT,
prompt_type: NOTIFICATION_CENTER_BANNER}]);
}