decord/source/modules/devtools/native/components/DevToolsContent.tsx

210 lines
8.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14015
// Function ID: 14016
2026-07-20 16:05:17 +00:00
// Name: DevToolsContentSortButtons
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 10677, 4292, 1212, 21, 4668, 712, 589, 11007, 14016, 4739, 5438, 4347, 14477, 15254, 1500, 1629, 6317, 6322, 4097, 14014, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 14015 (DevToolsContentSortButtons)
import ThemesDefault from "Themes" /* 712 */;
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1629 */;
import Text from "Text" /* 4739 */;
import PressableBase from "PressableBase" /* 5438 */;
import getSortedDevToolsScreensDefault from "getSortedDevToolsScreens" /* 14016 */;
import ArrowSmallUpIcon from "ArrowSmallUpIcon" /* 14477 */;
import ArrowSmallDownIcon from "ArrowSmallDownIcon" /* 15254 */;
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_7 from "getCurrentBuildOverride" /* 10677 */;
import closure_8 from "getHash" /* 4292 */;
import closure_9 from "initialize" /* 1212 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
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 DevToolsContentSortButtons(arg0) {
2026-07-23 10:11:24 +00:00
({ screenKey: require, start, end } = arg0);
const tmp = callback4();
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.sortingIcons, children: null };
2026-07-20 16:05:17 +00:00
obj = {
onPress() {
2026-08-24 06:08:38 +00:00
const result = closure_1_0(closure_1_2[14]).triggerHapticFeedback(closure_1_0(closure_1_2[14]).HapticFeedbackTypes.IMPACT_MEDIUM);
const obj = closure_1_0(closure_1_2[14]);
closure_1_0(closure_1_2[11]).updateSortOrder(closure_0, "up");
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
disabled: start,
style: null,
accessibilityRole: "button",
accessibilityLabel: "Shift up",
children: null
2026-07-20 16:05:17 +00:00
};
const items = [tmp.button, ];
if (start) {
start = tmp.disabledButton;
}
items[1] = start;
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-08-24 06:08:38 +00:00
obj[5] = closure_10(ArrowSmallUpIcon.ArrowSmallUpIcon, {});
const items1 = [closure_10(PressableBase.PressableOpacity, obj), ];
2026-07-20 16:05:17 +00:00
obj = {
onPress() {
2026-08-24 06:08:38 +00:00
const result = closure_1_0(closure_1_2[14]).triggerHapticFeedback(closure_1_0(closure_1_2[14]).HapticFeedbackTypes.IMPACT_MEDIUM);
const obj = closure_1_0(closure_1_2[14]);
closure_1_0(closure_1_2[11]).updateSortOrder(closure_0, "down");
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
disabled: end,
style: null,
accessibilityRole: "button",
accessibilityLabel: "Shift down",
children: null
2026-07-20 16:05:17 +00:00
};
const items2 = [tmp.button, ];
if (end) {
end = tmp.disabledButton;
}
items2[1] = end;
2026-07-29 08:29:29 +00:00
obj[2] = items2;
2026-08-24 06:08:38 +00:00
obj[5] = closure_10(ArrowSmallDownIcon.ArrowSmallDownIcon, {});
items1[1] = closure_10(PressableBase.PressableOpacity, obj);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-07-20 16:05:17 +00:00
return closure_11(closure_5, obj);
}
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
({ View: c5, ScrollView: closure_6 } = get_ActivityIndicator);
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
let obj = { devToolsContainer: null, sortingIcons: null, button: null, disabledButton: null };
2026-08-24 06:08:38 +00:00
obj = { backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, padding: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
createCacheKey = { flexDirection: "row", gap: ThemesDefault.space.PX_8 };
2026-07-29 08:29:29 +00:00
obj[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
obj[2] = { backgroundColor: ThemesDefault.colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT, width: ThemesDefault.space.PX_32, height: ThemesDefault.space.PX_32, borderRadius: ThemesDefault.radii.round, justifyContent: "center", alignItems: "center" };
2026-07-29 08:29:29 +00:00
obj[3] = { opacity: 0.5 };
let closure_12 = createCacheKey.createStyles(obj);
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo((arg0) => {
({ label, value } = arg0);
2026-07-29 08:29:29 +00:00
const obj = { variant: "text-xs/medium", color: "text-subtle", children: null };
2026-08-24 06:08:38 +00:00
const items = [label, callback2(Text.Text, { variant: "text-xs/semibold", children: value })];
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-08-24 06:08:38 +00:00
return callback3(Text.Text, obj);
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const obj2 = { backgroundColor: ThemesDefault.colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT, width: ThemesDefault.space.PX_32, height: ThemesDefault.space.PX_32, borderRadius: ThemesDefault.radii.round, justifyContent: "center", alignItems: "center" };
2026-07-20 16:05:17 +00:00
const memoResult1 = importAllResult.memo(function DevToolsContent(arg0) {
2026-07-29 08:29:29 +00:00
let _require;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let callback;
let arr5;
2026-07-20 16:05:17 +00:00
({ title, embedded } = arg0);
2026-08-15 05:55:55 +00:00
let obj = _require(1500);
2026-07-23 10:11:24 +00:00
_require = obj.useNavigation();
2026-07-29 08:29:29 +00:00
_require = undefined;
importDefault = undefined;
2026-07-23 10:11:24 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
const tmp3 = importDefault;
2026-08-24 06:08:38 +00:00
obj1 = _require(589);
const items = [closure_7];
2026-07-29 08:29:29 +00:00
_require = obj1.useStateFromStores(items, () => {
const overrides = currentBuildOverride.getCurrentBuildOverride().overrides;
let id;
if (overrides != null) {
const tmp4 = overrides[callback(undefined, _undefined[10]).DEVICE_FIELD];
if (tmp4 != null) {
id = tmp4.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
return id;
});
2026-08-24 06:08:38 +00:00
let tmp4 = useSafeAreaInsetsDefault();
const items1 = [closure_8];
2026-07-29 08:29:29 +00:00
const stateFromStores = _require(589).useStateFromStores(items1, () => Object.keys(allExperimentOverrideDescriptors.getAllExperimentOverrideDescriptors()).length);
const obj3 = _require(589);
2026-08-24 06:08:38 +00:00
const items2 = [closure_9];
2026-07-29 08:29:29 +00:00
importDefault = stateFromStores + _require(589).useStateFromStores(items2, () => Object.keys(clientOverrides.getClientOverrides()).length);
const obj4 = _require(589);
2026-08-24 06:08:38 +00:00
importDefault = getSortedDevToolsScreensDefault().map((arg0) => {
2026-07-29 08:29:29 +00:00
[tmp] = arg0;
if ("buildOverride" === tmp) {
let tmp7;
if (null != closure_0) {
let obj = { label: "Build override: ", value: null };
obj[1] = tmp5;
2026-08-24 06:08:38 +00:00
tmp7 = closure_1_10(closure_1_13, obj, tmp);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp7;
} else if ("experiments" === tmp) {
2026-07-20 16:05:17 +00:00
let tmp2;
2026-07-29 08:29:29 +00:00
if (closure_1 > 0) {
obj = { label: "Experiments overridden: ", value: null };
obj[1] = closure_1.toString();
2026-08-24 06:08:38 +00:00
tmp2 = closure_1_10(closure_1_13, obj, tmp);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
}
});
2026-08-24 06:08:38 +00:00
const arr4 = getSortedDevToolsScreensDefault();
2026-07-29 08:29:29 +00:00
[c2, c3] = callback(arr5.useState(false), 2);
2026-08-24 06:08:38 +00:00
arr5 = getSortedDevToolsScreensDefault();
obj = {
title,
hasIcons: true,
children: arr5.map((arg0, arg1) => {
[tmp, ] = arg0;
let obj = { label: tmp2, subLabel: table[arg1], icon: closure_1_10(callback(_undefined[20]).TableRow.Icon, { IconComponent: tmp3 }), arrow: !_undefined, trailing: null, onLongPress: null, onPress: null };
let tmp4Result;
if (_undefined) {
obj = { screenKey: null, start: null, end: null };
obj[0] = tmp;
obj[1] = 0 === arg1;
obj[2] = arg1 === arr5.length - 1;
tmp4Result = tmp4(closure_1_14, obj);
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
obj[4] = tmp4Result;
obj[5] = function onLongPress() {
let obj = closure_1_1(closure_1_2[21]);
let str = "sorting-enabled";
if (closure_2) {
str = "sorting-disabled";
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj = { key: str, content: null };
let str2 = "Sorting enabled";
if (closure_2) {
str2 = "Sorting disabled";
}
obj[1] = str2;
obj.open(obj);
const result = closure_1_0(closure_1_2[14]).triggerHapticFeedback(closure_1_0(tmp[14]).HapticFeedbackTypes.IMPACT_MEDIUM);
callback2((arg0) => !arg0);
};
obj[6] = function onPress() {
if (!closure_1_2) {
let arr = closure_1_0;
if (null != closure_1_0.push) {
arr = arr.push(callback);
} else {
let obj = callback(table[22]);
obj = { screenKey: null };
obj[0] = callback;
obj.navigateToDevTools(obj);
}
}
};
return closure_1_10(callback(_undefined[20]).TableRow, obj, tmp);
})
};
const tmp8 = callback2(_require(6317).TableRowGroup, obj);
2026-07-29 08:29:29 +00:00
let tmp7Result = tmp8;
2026-07-20 16:05:17 +00:00
if (!embedded) {
2026-07-29 08:29:29 +00:00
obj = { style: null, contentContainerStyle: null, children: null };
obj[0] = tmp.devToolsContainer;
obj1 = { paddingBottom: null };
2026-08-24 06:08:38 +00:00
obj1[0] = tmp4.bottom + ThemesDefault.space.PX_16;
2026-07-29 08:29:29 +00:00
obj[1] = obj1;
obj[2] = tmp8;
tmp7Result = callback2(closure_6, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp7Result;
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/devtools/native/components/DevToolsContent.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult1;
export const DevToolsContentSubLabel = memoResult;