decord/source/modules/parent_tools/native/ParentalConsentWarningModal.tsx

155 lines
6.9 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 16808
// Function ID: 16809
2026-07-20 16:05:17 +00:00
// Name: ParentalConsentWarningModal
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 7143, 7144, 676, 1388, 21, 1377, 7145, 4235, 6125, 4614, 4380, 712, 1629, 1236, 2337, 698, 709, 1379, 4347, 4611, 16809, 2009, 5503, 4813, 6136, 4376, 4815, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 16808 (ParentalConsentWarningModal)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import closure_5 from "freshTeenActivityWithMap" /* 7143 */;
import items from "items" /* 7144 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
import { ContentDismissActionType } from "ContentDismissActionType" /* 1388 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
({ FamilyCenterSubPages: closure_6, UserLinkStatus: error, UserLinkType: closure_8 } = items);
2026-07-29 08:29:29 +00:00
({ AnalyticEvents: c9, UserSettingsSections: c10 } = ME);
({ jsx: closure_12, jsxs: map1 } = jsxProd);
const modal = "modal";
let closure_15 = require("DismissibleContent").DismissibleContent.PARENTAL_CONSENT_GRACE_WARNING;
createCacheKey = { container: null, illustration: null, title: null, body: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { paddingHorizontal: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { alignItems: "center", paddingTop: ThemesDefault.space.PX_12 };
2026-07-29 08:29:29 +00:00
createCacheKey[2] = { textAlign: "center" };
createCacheKey[3] = { textAlign: "center" };
2026-08-24 06:08:38 +00:00
let closure_16 = createCacheKey.createStyles(createCacheKey);
let obj1 = { alignItems: "center", paddingTop: ThemesDefault.space.PX_12 };
let result = require("set").fileFinishedImporting("modules/parent_tools/native/ParentalConsentWarningModal.tsx");
2026-07-20 16:05:17 +00:00
export default function ParentalConsentWarningModal(daysRemaining) {
daysRemaining = daysRemaining.daysRemaining;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-07-29 08:29:29 +00:00
let callback;
let callback1;
2026-08-24 06:08:38 +00:00
let tmp = callback3();
2026-07-23 10:11:24 +00:00
let obj = daysRemaining(callback[15]);
const syncMessages = obj.useSyncMessages(daysRemaining(callback[16]).messagesLoader);
const effect = callback1.useEffect(() => {
2026-07-20 16:05:17 +00:00
let obj = ref(callback[17]);
2026-08-24 06:08:38 +00:00
obj = { surface_type: closure_1_14, days_remaining: daysRemaining };
obj.track(closure_1_9.PARENTAL_CONSENT_WARNING_SURFACE_SHOWN, obj);
2026-07-20 16:05:17 +00:00
ref(callback[18]).dispatch({ type: "PARENTAL_CONSENT_WARNING_MODAL_SHOWN" });
}, []);
2026-07-29 08:29:29 +00:00
importDefault = callback1.useRef(false);
2026-07-23 10:11:24 +00:00
callback = callback1.useCallback(() => {
2026-07-29 08:29:29 +00:00
const current = ref.current;
let flag = !current;
if (!current) {
tmp.current = true;
2026-07-20 16:05:17 +00:00
let obj = daysRemaining(callback[19]);
2026-07-29 08:29:29 +00:00
obj = { dismissAction: null };
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_11.USER_DISMISS;
const result = obj.markTimeRecurringDismissibleContentAsDismissed(closure_1_15, obj);
2026-07-20 16:05:17 +00:00
flag = true;
}
return flag;
}, []);
const items = [daysRemaining, callback];
2026-07-23 10:11:24 +00:00
callback1 = callback1.useCallback(() => {
2026-07-20 16:05:17 +00:00
if (callback()) {
let obj = ref(callback[17]);
2026-07-29 08:29:29 +00:00
obj = { surface_type: null, days_remaining: null };
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_14;
2026-07-29 08:29:29 +00:00
obj[1] = daysRemaining;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_9.PARENTAL_CONSENT_WARNING_SURFACE_DISMISSED, obj);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [callback1];
const items2 = [callback];
2026-07-23 10:11:24 +00:00
const callback2 = callback1.useCallback(() => {
2026-07-20 16:05:17 +00:00
callback1();
ref(callback[20]).hideActionSheet();
}, items1);
2026-08-24 06:08:38 +00:00
callback3 = callback1.useCallback(() => {
2026-07-20 16:05:17 +00:00
callback();
2026-07-29 08:29:29 +00:00
let obj = ref(callback[20]);
obj.hideActionSheet();
2026-08-24 06:08:38 +00:00
const values = Object.values(closure_1_5.getLinkedUsers());
2026-07-29 08:29:29 +00:00
if (values.some((link_status) => {
let tmp = link_status.link_status === constants.PENDING;
if (tmp) {
tmp = link_status.link_type === constants2.PARENT;
}
return tmp;
})) {
let tmp2Result = tmp2(tmp3[8]);
2026-08-24 06:08:38 +00:00
const tab = tmp2Result.selectTab(closure_1_6.REQUESTS);
2026-07-29 08:29:29 +00:00
const rootNavigationRef = daysRemaining(tmp3[9]).getRootNavigationRef();
if (null != rootNavigationRef) {
if (rootNavigationRef.isReady()) {
obj = { screen: null };
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_10.FAMILY_CENTER;
2026-07-29 08:29:29 +00:00
tmp9(tmp3[10]).openUserSettings(obj);
const tmp9Result = tmp9(tmp3[10]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
tmp2Result = tmp2(tmp3[11]);
tmp2Result.enqueue(() => {
let obj = callback(table[10]);
obj = { screen: constants3.FAMILY_CENTER };
return obj.openUserSettings(obj);
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
const obj5 = daysRemaining(tmp3[9]);
tmp9 = daysRemaining;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp2(tmp3[21]).pushLazy(daysRemaining(tmp3[23])(tmp3[22], tmp3.paths));
const tmp2Result1 = tmp2(tmp3[21]);
2026-07-20 16:05:17 +00:00
}
}, items2);
2026-07-23 10:11:24 +00:00
const intl = daysRemaining(callback[15]).intl;
2026-07-20 16:05:17 +00:00
if (0 === daysRemaining) {
2026-07-29 08:29:29 +00:00
let stringResult = intl.string(tmp2(tmp3[16]).Zo5YZD);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { count: null };
obj[0] = daysRemaining;
stringResult = intl.formatToPlainString(tmp2(tmp3[16]).b4sYUn, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const intl2 = tmp4(tmp3[15]).intl;
2026-07-20 16:05:17 +00:00
if (0 === daysRemaining) {
2026-07-29 08:29:29 +00:00
let stringResult1 = intl2.string(tmp2(tmp3[16]).CRZBSY);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { count: null };
obj[0] = daysRemaining;
stringResult1 = intl2.formatToPlainString(tmp2(tmp3[16]).mQcGGY, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { startExpanded: true, onDismiss: callback1, children: null };
2026-07-29 08:29:29 +00:00
const obj2 = { style: items3, children: null };
2026-07-23 10:11:24 +00:00
items3 = [tmp.container, { paddingBottom: importDefault(callback[14])().bottom }];
2026-08-24 06:08:38 +00:00
const obj3 = { spacing: importDefault(callback[13]).space.PX_16, children: null };
2026-07-29 08:29:29 +00:00
const items4 = [callback(View, { style: tmp.illustration, children: callback(daysRemaining(callback[26]).FamilyKeysSpotIllustration, { accessible: false }) }), callback(daysRemaining(callback[27]).Text, { variant: "heading-lg/bold", color: "text-default", style: tmp.title, accessibilityRole: "header", children: stringResult }), callback(daysRemaining(callback[27]).Text, { variant: "text-md/medium", color: "text-default", style: tmp.body, children: stringResult1 }), ];
2026-08-24 06:08:38 +00:00
const obj7 = { spacing: importDefault(callback[13]).space.PX_8, children: null };
2026-07-29 08:29:29 +00:00
const obj8 = { size: "lg", variant: "primary", grow: true, text: null, onPress: null };
const intl3 = tmp4(tmp3[15]).intl;
obj8[3] = intl3.string(importDefault(callback[16]).Kp7sjX);
obj8[4] = callback3;
2026-07-23 10:11:24 +00:00
const items5 = [callback(daysRemaining(callback[28]).Button, obj8), ];
2026-07-29 08:29:29 +00:00
const obj9 = { size: "lg", variant: "secondary", grow: true, text: null, accessibilityHint: null, onPress: null };
const intl4 = tmp4(tmp3[15]).intl;
obj9[3] = intl4.string(importDefault(callback[16]).hST5o8);
const intl5 = tmp4(tmp3[15]).intl;
obj9[4] = intl5.string(importDefault(callback[16])["4fZtHa"]);
obj9[5] = callback2;
2026-07-23 10:11:24 +00:00
items5[1] = callback(daysRemaining(callback[28]).Button, obj9);
2026-07-29 08:29:29 +00:00
obj7[1] = items5;
2026-07-23 10:11:24 +00:00
items4[3] = callback2(daysRemaining(callback[25]).Stack, obj7);
2026-07-29 08:29:29 +00:00
obj3[1] = items4;
obj2[1] = callback2(daysRemaining(callback[25]).Stack, obj3);
obj1[2] = callback(View, obj2);
2026-07-23 10:11:24 +00:00
return callback(daysRemaining(callback[24]).BottomSheet, obj1);
2026-07-20 16:05:17 +00:00
};