Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
88 lines
4.4 KiB
TypeScript
88 lines
4.4 KiB
TypeScript
// Module ID: 14993
|
|
// Function ID: 14994
|
|
// Name: FamilyCenterAcceptedLinks
|
|
// Dependencies: [19, 17, 7590, 21, 4605, 576, 8716, 8715, 11990, 1114, 2396, 4601, 14994, 14996, 5173, 4808, 14999, 1896, 1178, 15001, 2]
|
|
// Exports: default
|
|
|
|
// Module 14993 (FamilyCenterAcceptedLinks)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
|
|
import _modDef2396 from "module_2396" /* 2396 */;
|
|
import Text_Text from "Text/Text" /* 4601 */;
|
|
import ModalActionCreatorsDefault from "ModalActionCreators" /* 4808 */;
|
|
import useUserLinks from "useUserLinks" /* 8715 */;
|
|
import useIsInAdultAgeGroupDefault from "useIsInAdultAgeGroup" /* 8716 */;
|
|
import useAgeSpecificText from "useAgeSpecificText" /* 11990 */;
|
|
import FamilyCenterLinkRowDefault from "FamilyCenterLinkRow" /* 14996 */;
|
|
import _modDef15001 from "module_15001" /* 15001 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
function FamilyCenterAcceptedLinkRow(otherUser) {
|
|
const str = otherUser.otherUser;
|
|
let tmp4Result = null;
|
|
if (undefined !== str) {
|
|
const obj2 = { otherUser: str, actions: null };
|
|
const intl = str(1114).intl;
|
|
let str1;
|
|
if (str != null) {
|
|
str1 = str.toString();
|
|
}
|
|
const obj = { accessibilityRole: "button", accessibilityLabel: null, onPress: null, style: null, children: null };
|
|
const obj3 = { name: str1 };
|
|
obj.accessibilityLabel = intl.formatToPlainString(_modDef2396.T7DUoU, obj3);
|
|
obj.onPress = function onPress() {
|
|
ModalActionCreatorsDefault.pushLazy(asyncRequireImpl(14999, dependencyMap.paths), { otherUser: str });
|
|
};
|
|
obj.style = tmp.actionButton;
|
|
const obj4 = { size: str(1178).Icon.Sizes.SMALL, disableColor: true, source: _modDef15001 };
|
|
obj.children = closure_6(str(1178).Icon, obj4);
|
|
obj2.actions = closure_6(str(5173).PressableOpacity, obj);
|
|
tmp4Result = tmp4(FamilyCenterLinkRowDefault, obj2);
|
|
}
|
|
return tmp4Result;
|
|
}
|
|
const View = fn(17).View;
|
|
const FamilyCenterConstants = fn(7590);
|
|
({ MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS: closure_4, MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS: hasOwnProperty } = FamilyCenterConstants);
|
|
const jsxProd = fn(21);
|
|
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
|
|
let createStyles = fn(4605);
|
|
let obj2 = { container: { marginTop: 24 }, content: { display: "flex", justifyContent: "center", backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, borderRadius: nativeDefault.radii.md }, empty: { padding: 20, alignSelf: "center" }, header: { marginBottom: 10 } };
|
|
let closure_8 = createStyles.createStyles(obj2);
|
|
createStyles = fn(4605);
|
|
let obj5 = { actionButton: null };
|
|
let size = { backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, tintColor: nativeDefault.colors.INTERACTIVE_TEXT_DEFAULT, borderRadius: nativeDefault.radii.round, alignItems: "center", justifyContent: "center", height: 32, width: 32 };
|
|
obj5.actionButton = size;
|
|
let closure_9 = createStyles.createStyles(obj5);
|
|
size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/parent_tools/native/FamilyCenterAcceptedLinks.tsx");
|
|
|
|
export default function FamilyCenterAcceptedLinks() {
|
|
const tmp = closure_8();
|
|
const tmp4 = useIsInAdultAgeGroupDefault();
|
|
const activeLinkUsers = useUserLinks.useActiveLinkUsers();
|
|
const obj2 = { count: activeLinkUsers.length, max: tmp4 ? React4 : hasOwnProperty };
|
|
const intl = tmp5(1114).intl;
|
|
const tmp5Result = useAgeSpecificText;
|
|
const intl2 = tmp5(1114).intl;
|
|
const obj3 = { style: tmp.container, children: null };
|
|
const ageSpecificText = tmp5Result.useAgeSpecificText(intl.formatToPlainString(_modDef2396["+tnO34"], obj2), intl2.formatToPlainString(tmp2(2396)["pu6/U0"], obj2));
|
|
const items = [timestampProducer(Text_Text.Text, { style: tmp.header, variant: "eyebrow", color: "text-default", children: ageSpecificText }), ];
|
|
const obj5 = { style: tmp.content, children: null };
|
|
if (0 === activeLinkUsers.length) {
|
|
const obj6 = { style: tmp.empty, children: null };
|
|
const obj7 = { text: null };
|
|
const intl3 = tmp5(1114).intl;
|
|
obj7.text = intl3.string(tmp2(2396).C4ScLD);
|
|
obj6.children = tmp10(tmp2(14994), obj7);
|
|
let mapped = tmp10(tmp9, obj6);
|
|
const tmp2Result = tmp2(14994);
|
|
} else {
|
|
mapped = activeLinkUsers.map((otherUser) => closure_1_6(FamilyCenterAcceptedLinkRow, { otherUser }, "accepted-" + otherUser.id));
|
|
}
|
|
obj5.children = mapped;
|
|
items[1] = timestampProducer(View, obj5);
|
|
obj3.children = items;
|
|
return React5(View, obj3);
|
|
};
|