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

104 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 14253
// Function ID: 14254
2026-07-20 16:05:17 +00:00
// Name: ScheduleRuleRow
2026-08-13 07:00:46 +00:00
// Dependencies: [17, 676, 21, 4342, 712, 9805, 5414, 4338, 1236, 2303, 14214, 1499, 5807, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-13 07:00:46 +00:00
// Module 14253 (ScheduleRuleRow)
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { UserSettingsSections } from "ME";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-20 16:05:17 +00:00
function ScheduleRuleRow(rule) {
2026-07-23 10:11:24 +00:00
let dependencyMap;
let importDefault;
2026-07-20 16:05:17 +00:00
let readOnly;
rule = rule.rule;
2026-07-23 10:11:24 +00:00
({ teenId: importDefault, navigation: dependencyMap, readOnly } = rule);
2026-07-20 16:05:17 +00:00
if (readOnly === undefined) {
readOnly = false;
}
2026-08-13 07:00:46 +00:00
let obj = rule(9805);
2026-07-20 16:05:17 +00:00
const scheduleRuleDateRange = obj.getScheduleRuleDateRange(rule);
2026-08-13 07:00:46 +00:00
const obj2 = rule(9805);
obj = { label: scheduleRuleDateRange, subLabel: rule(9805).formatDays(rule.days), trailing: null, arrow: null, onPress: null };
2026-07-29 08:29:29 +00:00
const intl = rule(1236).intl;
2026-07-20 16:05:17 +00:00
const string = intl.string;
2026-08-11 06:20:06 +00:00
const tmp4 = importDefault(2303);
2026-07-20 16:05:17 +00:00
if (rule.enabled) {
2026-07-29 08:29:29 +00:00
let stringResult = string(tmp4["8vDHRq"]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
stringResult = string(tmp4["4z9fN+"]);
2026-07-20 16:05:17 +00:00
}
2026-08-13 07:00:46 +00:00
obj[2] = closure_5(rule(4338).Text, { variant: "text-sm/medium", color: "text-subtle", children: stringResult });
2026-07-29 08:29:29 +00:00
obj[3] = !readOnly;
2026-07-20 16:05:17 +00:00
let fn;
if (!readOnly) {
fn = () => {
2026-07-29 08:29:29 +00:00
let obj = { teenId: closure_1, rule: null };
2026-07-20 16:05:17 +00:00
obj = {};
const merged = Object.assign(rule);
2026-07-29 08:29:29 +00:00
obj[1] = obj;
2026-07-23 10:11:24 +00:00
return navigation.navigate(outer1_4.FAMILY_CENTER_SCHEDULE_DOWNTIME, obj);
2026-07-20 16:05:17 +00:00
};
}
2026-07-29 08:29:29 +00:00
obj[4] = fn;
2026-08-13 07:00:46 +00:00
return closure_5(rule(5414).TableRow, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
let obj = { header: null, container: null };
obj = { paddingTop: require("Themes").space.PX_24 };
obj[0] = obj;
obj[1] = { paddingHorizontal: require("Themes").space.PX_16, gap: require("Themes").space.PX_8 };
let closure_7 = createCacheKey.createStyles(obj);
let obj1 = { paddingHorizontal: require("Themes").space.PX_16, gap: require("Themes").space.PX_8 };
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("modules/parent_tools/native/FamilyCenterParentalControlsScreenTime.tsx");
2026-07-20 16:05:17 +00:00
export default function FamilyCenterParentalControlsScreenTime(readOnly) {
let flag = readOnly.readOnly;
if (flag === undefined) {
flag = false;
}
let importDefault;
2026-07-23 10:11:24 +00:00
let id;
2026-07-20 16:05:17 +00:00
const tmp = callback3();
2026-07-23 10:11:24 +00:00
let obj = flag(id[10]);
2026-07-20 16:05:17 +00:00
const selectedTeenUser = obj.useSelectedTeenUser();
2026-07-23 10:11:24 +00:00
let obj1 = flag(id[11]);
2026-07-20 16:05:17 +00:00
importDefault = obj1.useNavigation();
2026-07-23 10:11:24 +00:00
id = undefined;
2026-07-29 08:29:29 +00:00
if (selectedTeenUser != null) {
2026-07-20 16:05:17 +00:00
id = selectedTeenUser.id;
}
let rules;
2026-07-29 08:29:29 +00:00
if (selectedTeenUser != null) {
2026-07-20 16:05:17 +00:00
const restrictedSchedule = selectedTeenUser.restrictedSchedule;
2026-07-29 08:29:29 +00:00
if (restrictedSchedule != null) {
2026-07-20 16:05:17 +00:00
rules = restrictedSchedule.rules;
}
}
2026-07-29 08:29:29 +00:00
if (rules == null) {
2026-07-20 16:05:17 +00:00
rules = [];
}
2026-07-29 08:29:29 +00:00
const tmp2Result = flag(id[5]);
let tmp6 = null;
2026-07-20 16:05:17 +00:00
if (null != id) {
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.container;
obj = { variant: "text-sm/semibold", color: "text-subtle", style: null, children: null };
obj[2] = tmp.header;
const intl = tmp2(tmp3[8]).intl;
obj[3] = intl.string(importDefault(tmp3[9])["72CmJd"]);
const items = [callback(tmp2(tmp3[7]).Text, obj), ];
obj1 = { hasIcons: false, children: null };
obj1[1] = sortRulesByStartTimeResult.map((rule) => outer1_5(outer1_8, { rule, teenId: id, navigation: closure_1, readOnly: flag }, rule.ruleId));
items[1] = callback(tmp2(tmp3[12]).TableRowGroup, obj1);
obj[1] = items;
tmp6 = callback2(View, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp6;
2026-07-20 16:05:17 +00:00
};