decord/alpha/source/modules/icymi/native/CardHeightMeasurer.tsx

74 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 16888
// Function ID: 16889
2026-07-20 16:05:17 +00:00
// Name: CardHeightMeasurer
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 17, 21, 558, 576, 16821, 8455, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 16888 (CardHeightMeasurer)
2026-10-03 08:58:59 +00:00
import react_native from "react-native" /* 17 */;
import Fragment from "Fragment" /* 21 */;
2026-10-09 10:00:15 +00:00
import ICYMIActionCreatorsDefault from "ICYMIActionCreators" /* 8455 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const View = react_native.View;
const jsx = Fragment.jsx;
const memo = react.memo;
2026-10-08 09:57:35 +00:00
const memoResult = memo(ReactCompilerGating.isReactCompilerEnabled() ? (function CardHeightMeasurer(itemId) {
2026-10-03 08:58:59 +00:00
let tmp2;
let tmp3;
let obj = itemId(576);
const cResult = obj.c(8);
itemId = itemId.itemId;
const children = itemId.children;
2026-10-09 10:00:15 +00:00
const width = react.useContext(itemId(16821).ICYMIContext).width;
2026-10-03 08:58:59 +00:00
if (cResult[0] !== itemId) {
2026-10-08 09:57:35 +00:00
const fn = function l(nativeEvent) {
2026-10-03 08:58:59 +00:00
const height = nativeEvent.nativeEvent.layout.height;
const obj = ICYMIActionCreatorsDefault;
obj.setCardHeight(itemId, height);
};
cResult[0] = itemId;
cResult[1] = fn;
tmp2 = fn;
} else {
tmp2 = cResult[1];
}
if (cResult[2] !== width) {
const obj2 = { width, alignSelf: "center" };
cResult[2] = width;
cResult[3] = obj2;
tmp3 = obj2;
} else {
tmp3 = cResult[3];
}
if (cResult[4] === children) {
if (cResult[5] === tmp2) {
let tmp4;
if (cResult[6] === tmp3) {
tmp4 = cResult[7];
}
return tmp4;
}
}
const tmp5 = <View onLayout={tmp2} pointerEvents="box-none" style={tmp3}>{children}</View>;
cResult[4] = children;
cResult[5] = tmp2;
cResult[6] = tmp3;
cResult[7] = tmp5;
tmp4 = tmp5;
2026-10-08 09:57:35 +00:00
}) : (function CardHeightMeasurer(itemId) {
2026-10-03 08:58:59 +00:00
itemId = itemId.itemId;
const children = itemId.children;
2026-07-20 16:05:17 +00:00
const items = [itemId];
2026-10-09 10:00:15 +00:00
const width = react.useContext(itemId(16821).ICYMIContext).width;
2026-10-03 08:58:59 +00:00
return <View onLayout={react.useCallback((nativeEvent) => {
const height = nativeEvent.nativeEvent.layout.height;
const obj = ICYMIActionCreatorsDefault;
obj.setCardHeight(itemId, height);
}, items)} pointerEvents="box-none" style={{ width, alignSelf: "center" }}>{children}</View>;
}));
const result = size.fileFinishedImporting("modules/icymi/native/CardHeightMeasurer.tsx");
export const CardHeightMeasurer = memoResult;