decord/source/modules/notification_center/native/NotificationCenterPermissionNudge.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

112 lines
5.7 KiB
TypeScript

// Module ID: 16413
// Function ID: 16414
// Name: NotificationCenterBannerImpl
// Dependencies: [32, 19, 17, 1074, 1954, 12414, 21, 4560, 576, 1242, 9064, 4556, 1114, 4975, 12415, 5123, 5680, 15484, 7388, 1943, 2]
// Exports: default
// Module 16413 (NotificationCenterBannerImpl)
import ThemesDefault from "Themes" /* 576 */;
import apexExperimentDefault from "apexExperiment" /* 15484 */;
import closure_3 from "_slicedToArray" /* 32 */;
import noop from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import ME from "ME" /* 1074 */;
import { ContentDismissActionType } from "ContentDismissActionType" /* 1954 */;
import EventActionType from "EventActionType" /* 12414 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
const require = arg1;
function NotificationCenterBannerImpl(onDismiss) {
onDismiss = onDismiss.onDismiss;
const tmp = callback6();
callback3(() => {
let obj = callback(1242);
obj = { action: constants4.IMPRESSION, prompt_type: constants5.NOTIFICATION_CENTER_BANNER };
obj.track(constants.CONTEXTUAL_REMINDER_ACTION, obj);
}, []);
let obj = { style: tmp.container, children: null };
obj = { style: tmp.iconContainer, children: null };
obj = { size: "md", color: ThemesDefault.colors.ICON_STRONG };
obj[1] = callback4(onDismiss(9064).BellSlashIcon, obj);
const items = [callback4(View, obj), , ];
obj1 = { style: tmp.contentContainer, children: null };
const obj2 = { variant: "text-md/semibold", color: "text-default", children: null };
const intl = onDismiss(1114).intl;
obj2[2] = intl.string(onDismiss(1114).t.G6YBna);
const items1 = [callback4(onDismiss(4556).Text, obj2), , ];
const obj3 = { variant: "text-md/medium", color: "text-muted", style: { marginTop: ThemesDefault.space.PX_4 }, children: null };
const intl2 = onDismiss(1114).intl;
obj3[3] = intl2.string(onDismiss(1114).t["9CoPDE"]);
items1[1] = callback4(onDismiss(4556).Text, obj3);
const obj5 = { style: tmp.ctaButton, children: null };
const obj6 = { variant: "primary", size: "md", text: null, onPress: null };
const intl3 = onDismiss(1114).intl;
obj6[2] = intl3.string(onDismiss(1114).t.a4bgO0);
obj6[3] = function onPress() {
let obj = onDismiss(12415);
const pushNotificationPermission = obj.requestPushNotificationPermission(constants2.ALLOW_TO_REQUEST, constants3.NOTIFICATION_CENTER, closure_8);
obj = { action: constants4.ACCEPT, prompt_type: constants5.NOTIFICATION_CENTER_BANNER };
callback(1242).track(constants.CONTEXTUAL_REMINDER_ACTION, obj);
};
obj5[1] = callback4(onDismiss(4975).Button, obj6);
items1[2] = callback4(View, obj5);
obj1[1] = items1;
items[1] = callback5(View, obj1);
const obj7 = {
onPress() {
let obj = closure_1_1(closure_1_2[9]);
obj = { action: closure_1_12.DISMISS, prompt_type: closure_1_13.NOTIFICATION_CENTER_BANNER };
obj.track(closure_1_7.CONTEXTUAL_REMINDER_ACTION, obj);
onDismiss();
},
hitSlop: 8,
accessibilityRole: "button",
accessibilityLabel: null,
children: null
};
const intl4 = onDismiss(1114).intl;
obj7[3] = intl4.string(onDismiss(1114).t.WAI6xu);
obj7[4] = callback4(onDismiss(5680).XSmallIcon, { size: "sm", color: "icon-strong" });
items[2] = callback4(onDismiss(5123).PressableHighlight, obj7);
obj[1] = items;
return callback5(View, obj);
}
({ useCallback: c4, useEffect: c5 } = noop);
({ AnalyticEvents: error, NOOP: closure_8 } = ME);
({ EventActionType: c10, EventActionLocation: unpackModuleId, NotificationNudgeAnalyticsAction: closure_12, NotificationNudgeSurface: map1 } = EventActionType);
({ jsx: closure_14, jsxs: closure_15 } = jsxProd);
createCacheKey = { container: null, contentContainer: null, iconContainer: null, ctaButton: null };
createCacheKey = { flexDirection: "row", paddingLeft: 24, paddingRight: ThemesDefault.space.PX_12, paddingVertical: ThemesDefault.space.PX_16, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, alignItems: "flex-start", borderBottomWidth: 1, borderColor: ThemesDefault.colors.BORDER_SUBTLE, gap: 16 };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flex: 1 };
createCacheKey[2] = { width: 48, height: 48, borderRadius: ThemesDefault.radii.round, backgroundColor: ThemesDefault.colors.BACKGROUND_MOD_STRONG, alignItems: "center", justifyContent: "center" };
let obj1 = { width: 48, height: 48, borderRadius: ThemesDefault.radii.round, backgroundColor: ThemesDefault.colors.BACKGROUND_MOD_STRONG, alignItems: "center", justifyContent: "center" };
createCacheKey[3] = { alignSelf: "flex-start", marginTop: ThemesDefault.space.PX_12 };
let closure_16 = createCacheKey.createStyles(createCacheKey);
let obj2 = { alignSelf: "flex-start", marginTop: ThemesDefault.space.PX_12 };
const result = require("set").fileFinishedImporting("modules/notification_center/native/NotificationCenterPermissionNudge.tsx");
export default function NotificationCenterPermissionNudge() {
let obj = apexExperimentDefault;
const canSeePushNotificationNudge = _require(12415).useCanSeePushNotificationNudge();
const obj2 = _require(12415);
let prop = null;
if (!obj.useConfig({ location: "NotificationCenterPermissionNudge" }).inHoldout) {
prop = null;
if (canSeePushNotificationNudge) {
prop = tmp2(1943).DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER;
}
}
const tmp5 = callback(_require(7388).useSelectedTimeRecurringDismissibleContent(prop, { cooldownDurationMs: 604800000 }), 2);
_require = tmp6;
const items = [tmp5[1]];
const obj3 = _require(7388);
let tmp8 = null;
if (tmp5[0] === _require(1943).DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER) {
obj = { onDismiss: null };
obj[0] = tmp7;
tmp8 = callback4(NotificationCenterBannerImpl, obj);
}
return tmp8;
};