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

146 lines
6.7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 14354
// Function ID: 14355
2026-07-20 16:05:17 +00:00
// Name: FamilyCenterActivitySectionHeader
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 17, 7144, 21, 4380, 712, 7481, 7199, 14349, 4376, 11485, 1236, 2337, 14355, 4949, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 14354 (FamilyCenterActivitySectionHeader)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
2026-08-25 06:04:03 +00:00
import getEmptyActivityFormatter from "getEmptyActivityFormatter" /* 7199 */;
import useIsInAdultAgeGroupDefault from "useIsInAdultAgeGroup" /* 7481 */;
import useActionsForDisplayType from "useActionsForDisplayType" /* 14349 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import items from "items" /* 7144 */;
2026-08-24 06:08:38 +00:00
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
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function FamilyCenterActivitySectionHeader(displayType) {
displayType = displayType.displayType;
2026-08-24 06:08:38 +00:00
const tmp = callback3();
let flag = useIsInAdultAgeGroupDefault();
let obj = getEmptyActivityFormatter;
2026-07-20 16:05:17 +00:00
const activityTypeTextConfigs = obj.getActivityTypeTextConfigs();
const value = activityTypeTextConfigs.get(displayType);
2026-08-24 06:08:38 +00:00
const actionsForDisplayType = useActionsForDisplayType.useActionsForDisplayType(displayType);
const obj4 = useActionsForDisplayType;
const formattedTotalForDisplayType = useActionsForDisplayType.useFormattedTotalForDisplayType(displayType);
2026-07-20 16:05:17 +00:00
if (displayType === constants.PURCHASES) {
2026-07-29 08:29:29 +00:00
let length = formattedTotalForDisplayType;
2026-07-20 16:05:17 +00:00
let sectionHeaderResult;
2026-07-29 08:29:29 +00:00
if (value != null) {
2026-07-20 16:05:17 +00:00
sectionHeaderResult = value.sectionHeader(length);
}
let sectionDescription;
2026-07-29 08:29:29 +00:00
if (value != null) {
2026-07-20 16:05:17 +00:00
sectionDescription = value.sectionDescription;
}
2026-07-29 08:29:29 +00:00
let tmp10 = null;
2026-07-20 16:05:17 +00:00
if (undefined !== sectionDescription) {
let sectionDescriptionResult;
2026-07-29 08:29:29 +00:00
if (value != null) {
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
sectionDescriptionResult = value.sectionDescription(flag);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp10 = sectionDescriptionResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { variant: "text-sm/semibold", style: null, children: null };
obj[1] = tmp.header;
obj[2] = sectionHeaderResult;
2026-08-25 06:04:03 +00:00
const items = [callback2(tmp3(4376).Text, obj), ];
2026-07-29 08:29:29 +00:00
let tmp14Result = null;
if (null !== tmp10) {
obj = { variant: "text-sm/medium", color: "text-muted", style: null, children: null };
obj[2] = tmp.description;
obj[3] = tmp10;
2026-08-25 06:04:03 +00:00
tmp14Result = callback2(tmp3(4376).Text, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { children: null };
2026-07-29 08:29:29 +00:00
items[1] = tmp14Result;
obj1[0] = items;
return closure_10(closure_6, obj1);
2026-07-20 16:05:17 +00:00
}
length = actionsForDisplayType.length;
}
2026-07-29 08:29:29 +00:00
({ ActivityIndicator: c5, View: closure_6 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS: error, TeenActionDisplayType: closure_8 } = items);
2026-07-29 08:29:29 +00:00
({ jsx: c9, jsxs: c10 } = jsxProd);
createCacheKey = { header: null, description: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { marginBottom: ThemesDefault.space.PX_4 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { marginBottom: ThemesDefault.space.PX_8 };
let closure_11 = createCacheKey.createStyles(createCacheKey);
2026-07-29 08:29:29 +00:00
let obj2 = { container: { display: "flex" }, loadMoreContainer: { display: "flex", flexDirection: "row", flex: 1, alignItems: "center", justifyContent: "center", width: "100%" }, loadMore: null, loadMoreButton: null };
2026-08-24 06:08:38 +00:00
let obj1 = { marginBottom: ThemesDefault.space.PX_8 };
obj2[2] = { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", borderBottomRightRadius: ThemesDefault.radii.sm, borderBottomLeftRadius: ThemesDefault.radii.sm, backgroundColor: ThemesDefault.colors.BACKGROUND_MOD_SUBTLE, width: "60%" };
2026-07-29 08:29:29 +00:00
obj2[3] = { paddingVertical: 4 };
let closure_13 = createCacheKey.createStyles(obj2);
2026-08-24 06:08:38 +00:00
let obj3 = { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", borderBottomRightRadius: ThemesDefault.radii.sm, borderBottomLeftRadius: ThemesDefault.radii.sm, backgroundColor: ThemesDefault.colors.BACKGROUND_MOD_SUBTLE, width: "60%" };
const result = require("set").fileFinishedImporting("modules/parent_tools/native/FamilyCenterActivitySection.tsx");
2026-07-20 16:05:17 +00:00
export default function FamilyCenterActivitySection(displayType) {
displayType = displayType.displayType;
2026-07-29 08:29:29 +00:00
let loadMore;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
let loadMoreButton = callback4();
2026-08-25 06:04:03 +00:00
let obj = displayType(14349);
2026-07-20 16:05:17 +00:00
const actionsForDisplayType = obj.useActionsForDisplayType(displayType);
2026-08-25 06:04:03 +00:00
obj1 = displayType(14349);
2026-07-20 16:05:17 +00:00
const actionTotalsForDisplayType = obj1.useActionTotalsForDisplayType(displayType);
2026-08-25 06:04:03 +00:00
let obj2 = displayType(11485);
2026-07-20 16:05:17 +00:00
const familyCenterActions = obj2.useFamilyCenterActions({});
2026-07-29 08:29:29 +00:00
loadMore = familyCenterActions.loadMore;
const tmp6 = callback(React.useState(closure_7), 2);
dependencyMap = tmp6[1];
const substr = actionsForDisplayType.slice(0, tmp6[0]);
2026-07-20 16:05:17 +00:00
const items = [loadMore, displayType];
if (0 === actionsForDisplayType.length) {
return null;
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp(1236).intl;
obj = { pageSize: null };
2026-07-20 16:05:17 +00:00
const _Math = Math;
2026-07-29 08:29:29 +00:00
obj[0] = Math.min(actionTotalsForDisplayType - substr.length, closure_7);
2026-08-25 06:04:03 +00:00
const formatToPlainStringResult = intl.formatToPlainString(loadMore(2337)["7dMmJY"], obj);
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = loadMoreButton.container;
obj1 = { displayType: null };
obj1[0] = displayType;
2026-08-25 06:04:03 +00:00
const items1 = [callback2(FamilyCenterActivitySectionHeader, obj1), substr.map((action) => callback(loadMore(14355), { action }, action.event_id)), ];
2026-07-20 16:05:17 +00:00
if (substr.length >= actionTotalsForDisplayType) {
items1[2] = null;
2026-07-29 08:29:29 +00:00
obj[1] = items1;
return tmp15(tmp16, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj2 = { style: null, children: null };
obj2[0] = loadMoreButton.loadMoreContainer;
2026-07-20 16:05:17 +00:00
if (familyCenterActions.isMoreLoading) {
2026-07-29 08:29:29 +00:00
const obj3 = { style: null, children: null };
obj3[0] = loadMoreButton.loadMore;
2026-07-23 10:11:24 +00:00
const obj4 = { style: null, animating: true, color: "#fff", size: "small" };
2026-07-20 16:05:17 +00:00
loadMoreButton = loadMoreButton.loadMoreButton;
2026-07-29 08:29:29 +00:00
obj4[0] = loadMoreButton;
obj3[1] = tmp17(closure_5, obj4);
let tmp17Result = tmp17(tmp16, obj3);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj5 = { style: null, accessibilityLabel: null, accessibilityRole: "button", onPress: null, children: null };
obj5[0] = loadMoreButton.loadMore;
obj5[1] = formatToPlainStringResult;
obj5[3] = tmp7;
const obj6 = { style: null, variant: "text-xs/semibold", color: "text-overlay-light", children: null };
obj6[0] = loadMoreButton.loadMoreButton;
obj6[3] = formatToPlainStringResult;
2026-08-25 06:04:03 +00:00
obj5[4] = tmp17(tmp(4376).Text, obj6);
tmp17Result = tmp17(tmp(4949).PressableOpacity, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2[1] = tmp17Result;
tmp17Result = tmp17(tmp16, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = closure_10;
2026-07-20 16:05:17 +00:00
}
};