decord/source/modules/parent_tools/native/ParentalConsentWarningBanner.tsx
2026-07-30 10:14:41 +00:00

164 lines
6.1 KiB
TypeScript

// Module ID: 15817
// Function ID: 15818
// Name: StyleSheet
// Dependencies: [19, 17, 5794, 676, 21, 712, 4189, 1581, 13892, 13891, 15818, 10683, 3893, 5808, 698, 5795, 6608, 4185, 4611, 1236, 2223, 2]
// Exports: default
// Module 15817 (StyleSheet)
import getSystemLocale from "getSystemLocale";
import get_ActivityIndicator from "Text";
import { FamilyCenterSubPages } from "items";
import ME from "ME";
import jsxProd from "set";
import createCacheKey from "createCacheKey";
let StyleSheet;
let c10;
let c4;
let c9;
let closure_12;
let map1;
let metroImportAll;
let unpackModuleId;
const require = arg1;
({ Pressable: c4, StyleSheet } = get_ActivityIndicator);
const View = get_ActivityIndicator.View;
({ AnalyticEvents: metroImportAll, UserSettingsSections: c9, VerticalGradient: c10 } = ME);
({ jsx: unpackModuleId, jsxs: closure_12, Fragment: map1 } = jsxProd);
let closure_14 = 28 + require("Themes").space.PX_16;
let closure_15 = [0.5875, 1];
createCacheKey = { strip: null, pressable: null, label: null, link: null };
createCacheKey = { position: "absolute", top: 0, left: 0, right: 0, backgroundColor: require("Themes").colors.BACKGROUND_BASE_LOWEST };
createCacheKey[0] = createCacheKey;
let obj1 = {};
const merged = Object.assign(StyleSheet.absoluteFillObject);
obj1.flexDirection = "row";
obj1.alignItems = "center";
obj1.justifyContent = "center";
obj1.paddingHorizontal = require("Themes").space.PX_12;
obj1.paddingBottom = require("Themes").space.PX_16;
createCacheKey[1] = obj1;
createCacheKey[2] = { paddingRight: require("Themes").space.PX_8 };
createCacheKey[3] = { textDecorationLine: "underline" };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj2 = { paddingRight: require("Themes").space.PX_8 };
const result = require("items").fileFinishedImporting("modules/parent_tools/native/ParentalConsentWarningBanner.tsx");
export default function ParentalConsentWarningBanner(children) {
let _require;
let token;
let daysRemaining;
const tmp = createCacheKey();
_require = tmp;
let Gfqlpa = token;
let obj = daysRemaining;
const tmp2 = token(daysRemaining[7])();
let intl = _require;
let obj1 = _require(daysRemaining[8]);
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;
const memo = React.useMemo(() => {
const items = [token, ];
const obj = token(daysRemaining[13])(token);
items[1] = token(daysRemaining[13])(token).setAlpha(0).toRgbString();
return items;
}, items);
if (parentalConsentWarning != null) {
daysRemaining = parentalConsentWarning.daysRemaining;
}
if (daysRemaining == null) {
daysRemaining = null;
}
if (isOnMainSurface) {
isOnMainSurface = isParentalConsentBannerActive;
}
if (isOnMainSurface) {
isOnMainSurface = !obj4.useGlobalStatusIndicatorState().isVisible;
}
if (isOnMainSurface) {
isOnMainSurface = null != daysRemaining;
}
if (isOnMainSurface) {
isOnMainSurface = daysRemaining >= 0;
}
const items1 = [daysRemaining];
const sum = tmp2.top + closure_14;
const items2 = [tmp.link];
const callback = obj7.useCallback(() => {
let obj = token(daysRemaining[14]);
obj = { days_remaining: daysRemaining };
obj.track(outer1_8.PARENTAL_CONSENT_WARNING_BANNER_TAPPED, obj);
const tab = token(daysRemaining[15]).selectTab(outer1_7.REQUESTS);
const obj3 = token(daysRemaining[15]);
obj = { screen: outer1_9.FAMILY_CENTER };
_undefined(daysRemaining[16]).openUserSettings(obj);
}, items1);
const callback1 = obj7.useCallback((children) => outer1_11(_undefined(daysRemaining[17]).Text, { variant: "text-sm/medium", color: "text-strong", style: _undefined.link, children }, arg1), items2);
const items3 = [StyleSheet.absoluteFill, ];
let num2 = 0;
if (isOnMainSurface) {
num2 = closure_14;
}
items3[1] = { marginTop: num2 };
children = [closure_11(View, { style: items3, children: children.children }), ];
let tmp18 = null;
if (isOnMainSurface) {
tmp18 = null;
if (null != daysRemaining) {
obj = { style: null, pointerEvents: "box-none", children: null };
const items5 = [tmp.strip, ];
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;
const items7 = [tmp.pressable, ];
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);
} else {
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);
}
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;
}
}
children[1] = tmp18;
return closure_12(closure_13, { children });
};