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

158 lines
6.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16313
// Function ID: 16314
2026-07-20 16:05:17 +00:00
// Name: StyleSheet
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 5302, 676, 21, 712, 4668, 1629, 14291, 14290, 16314, 12549, 4100, 5316, 698, 5303, 7398, 4739, 4761, 1236, 2336, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16313 (StyleSheet)
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { FamilyCenterSubPages } from "items" /* 5302 */;
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
const require = arg1;
({ Pressable: c4, StyleSheet } = get_ActivityIndicator);
2026-07-23 10:11:24 +00:00
const View = get_ActivityIndicator.View;
2026-08-24 06:08:38 +00:00
({ AnalyticEvents: closure_8, UserSettingsSections: c9, VerticalGradient: c10 } = ME);
2026-07-29 08:29:29 +00:00
({ jsx: unpackModuleId, jsxs: closure_12, Fragment: map1 } = jsxProd);
2026-08-24 06:08:38 +00:00
let closure_14 = 28 + ThemesDefault.space.PX_16;
2026-07-23 10:11:24 +00:00
let closure_15 = [0.5875, 1];
2026-07-29 08:29:29 +00:00
createCacheKey = { strip: null, pressable: null, label: null, link: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { position: "absolute", top: 0, left: 0, right: 0, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-07-23 10:11:24 +00:00
let obj1 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(StyleSheet.absoluteFillObject);
2026-07-29 08:29:29 +00:00
obj1.flexDirection = "row";
obj1.alignItems = "center";
obj1.justifyContent = "center";
2026-08-24 06:08:38 +00:00
obj1.paddingHorizontal = ThemesDefault.space.PX_12;
obj1.paddingBottom = ThemesDefault.space.PX_16;
2026-07-29 08:29:29 +00:00
createCacheKey[1] = obj1;
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { paddingRight: ThemesDefault.space.PX_8 };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { textDecorationLine: "underline" };
2026-08-24 06:08:38 +00:00
let closure_16 = createCacheKey.createStyles(createCacheKey);
let obj2 = { paddingRight: ThemesDefault.space.PX_8 };
const result = require("set").fileFinishedImporting("modules/parent_tools/native/ParentalConsentWarningBanner.tsx");
2026-07-20 16:05:17 +00:00
export default function ParentalConsentWarningBanner(children) {
2026-07-29 08:29:29 +00:00
let _require;
let token;
2026-07-20 16:05:17 +00:00
let daysRemaining;
2026-08-24 06:08:38 +00:00
const tmp = callback();
2026-07-29 08:29:29 +00:00
_require = tmp;
let Gfqlpa = token;
let obj = daysRemaining;
const tmp2 = token(daysRemaining[7])();
let intl = _require;
2026-08-24 06:08:38 +00:00
obj1 = _require(daysRemaining[8]);
2026-07-29 08:29:29 +00:00
const parentalConsentWarning = obj1.useParentalConsentWarning();
let obj2 = _require(daysRemaining[9]);
const isParentalConsentBannerActive = obj2.useIsParentalConsentBannerActive();
let obj3 = _require(daysRemaining[10]);
let isOnMainSurface = obj3.useIsOnMainSurface();
let obj4 = _require(daysRemaining[11]);
let obj5 = _require(daysRemaining[12]);
token = obj5.useToken(token(daysRemaining[5]).colors.BACKGROUND_FEEDBACK_WARNING);
let items = [token];
daysRemaining = undefined;
2026-07-20 16:05:17 +00:00
const memo = React.useMemo(() => {
const items = [token, ];
2026-07-29 08:29:29 +00:00
const obj = token(daysRemaining[13])(token);
items[1] = token(daysRemaining[13])(token).setAlpha(0).toRgbString();
2026-07-20 16:05:17 +00:00
return items;
}, items);
2026-07-29 08:29:29 +00:00
if (parentalConsentWarning != null) {
2026-07-20 16:05:17 +00:00
daysRemaining = parentalConsentWarning.daysRemaining;
}
2026-07-29 08:29:29 +00:00
if (daysRemaining == null) {
daysRemaining = null;
2026-07-20 16:05:17 +00:00
}
if (isOnMainSurface) {
2026-07-29 08:29:29 +00:00
isOnMainSurface = isParentalConsentBannerActive;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (isOnMainSurface) {
isOnMainSurface = !obj4.useGlobalStatusIndicatorState().isVisible;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (isOnMainSurface) {
isOnMainSurface = null != daysRemaining;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (isOnMainSurface) {
isOnMainSurface = daysRemaining >= 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [daysRemaining];
2026-07-20 16:05:17 +00:00
const sum = tmp2.top + closure_14;
const items2 = [tmp.link];
2026-08-24 06:08:38 +00:00
callback = obj7.useCallback(() => {
2026-07-29 08:29:29 +00:00
let obj = token(daysRemaining[14]);
obj = { days_remaining: daysRemaining };
2026-08-24 06:08:38 +00:00
obj.track(closure_1_8.PARENTAL_CONSENT_WARNING_BANNER_TAPPED, obj);
const tab = token(daysRemaining[15]).selectTab(closure_1_7.REQUESTS);
2026-07-29 08:29:29 +00:00
const obj3 = token(daysRemaining[15]);
2026-08-24 06:08:38 +00:00
obj = { screen: closure_1_9.FAMILY_CENTER };
lib(daysRemaining[16]).openUserSettings(obj);
2026-07-20 16:05:17 +00:00
}, items1);
2026-08-24 06:08:38 +00:00
const callback1 = obj7.useCallback((children) => closure_1_11(lib(daysRemaining[17]).Text, { variant: "text-sm/medium", color: "text-strong", style: lib.link, children }, arg1), items2);
2026-07-20 16:05:17 +00:00
const items3 = [StyleSheet.absoluteFill, ];
let num2 = 0;
2026-07-29 08:29:29 +00:00
if (isOnMainSurface) {
2026-07-20 16:05:17 +00:00
num2 = closure_14;
}
2026-07-29 08:29:29 +00:00
items3[1] = { marginTop: num2 };
children = [closure_11(View, { style: items3, children: children.children }), ];
2026-07-20 16:05:17 +00:00
let tmp18 = null;
2026-07-29 08:29:29 +00:00
if (isOnMainSurface) {
2026-07-20 16:05:17 +00:00
tmp18 = null;
2026-07-29 08:29:29 +00:00
if (null != daysRemaining) {
obj = { style: null, pointerEvents: "box-none", children: null };
2026-07-20 16:05:17 +00:00
const items5 = [tmp.strip, ];
2026-07-29 08:29:29 +00:00
obj = { height: null };
obj[0] = sum;
items5[1] = obj;
obj[0] = items5;
obj1 = { pointerEvents: "none", style: null, colors: null, locations: null, start: null, end: null };
obj1[1] = StyleSheet.absoluteFill;
obj1[2] = memo;
obj1[3] = closure_15;
({ START: obj10[4], END: obj10[5] } = closure_10);
const items6 = [tmp15(Gfqlpa(obj[18]), obj1), ];
obj2 = { accessibilityRole: "button", accessibilityHint: null, onPress: null, style: null, children: null };
const intl2 = intl(obj[19]).intl;
obj2[1] = intl2.string(Gfqlpa(obj[20]).O2HKdA);
obj2[2] = callback;
2026-07-20 16:05:17 +00:00
const items7 = [tmp.pressable, ];
2026-07-29 08:29:29 +00:00
obj3 = { paddingTop: null };
obj3[0] = tmp2.top + 8;
items7[1] = obj3;
obj2[3] = items7;
obj4 = { variant: "text-sm/medium", color: "text-strong", lineClamp: 1, style: null, children: null };
obj4[3] = tmp.label;
if (0 === daysRemaining) {
intl = intl(obj[19]).intl;
Gfqlpa = Gfqlpa(obj[20]).Gfqlpa;
obj = { connectHook: null };
obj[0] = callback1;
let formatResult = intl.format(Gfqlpa, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl3 = intl(obj[19]).intl;
obj5 = { count: null, connectHook: null };
obj5[0] = daysRemaining;
obj5[1] = callback1;
formatResult = intl3.format(Gfqlpa(obj[20]).ZBK5mM, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj4[4] = formatResult;
obj4 = tmp15(intl(obj[17]).Text, obj4);
obj2[4] = obj4;
obj2 = tmp15(closure_4, obj2);
items6[1] = obj2;
obj[2] = items6;
tmp13(tmp16, obj);
const tmp21 = closure_4;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
children[1] = tmp18;
return closure_12(closure_13, { children });
2026-07-20 16:05:17 +00:00
};