decord/source/modules/chat/native/placeholder/ChatPlaceholder.tsx

76 lines
3 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 11667
// Function ID: 90480
// Dependencies: [31, 27, 9242, 33, 4131, 689, 1557, 5159, 1450, 11668, 11669, 11670, 3992, 2]
2026-07-23 10:11:24 +00:00
2026-07-27 11:26:19 +00:00
// Module 11667
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
import { useChatInputContainerHeight as closure_3 } from "getChatInputContainerHeight";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
2026-07-20 16:05:17 +00:00
let obj = {};
obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(require("get ActivityIndicator").StyleSheet.absoluteFillObject);
obj["paddingBottom"] = require("_createForOfIteratorHelperLoose").space.PX_24;
2026-07-20 16:05:17 +00:00
obj["flexDirection"] = "column-reverse";
obj["overflow"] = "hidden";
obj.placeholder = obj;
2026-07-23 10:11:24 +00:00
let closure_5 = _createForOfIteratorHelperLoose.createStyles(obj);
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function ChatPlaceholder(screenIndex) {
2026-07-23 10:11:24 +00:00
let tmp2 = windowVerticalInset(screenIndex.screenIndex);
2026-07-20 16:05:17 +00:00
const importDefault = tmp2;
2026-07-23 10:11:24 +00:00
height = importDefault(height[8])().height;
const rect = importDefault(height[6])();
const insets = importDefault(height[7])({ isKeyboardAwareOnAndroid: false, includeKeyboardHeight: true }).insets;
let obj = { containerBottomInset: insets.bottom - rect.bottom, windowVerticalInset: rect.top + insets.bottom };
2026-07-20 16:05:17 +00:00
const containerBottomInset = obj.containerBottomInset;
2026-07-23 10:11:24 +00:00
windowVerticalInset = obj.windowVerticalInset;
let items = [tmp2, containerBottomInset];
const memo = containerBottomInset.useMemo(() => ({ marginBottom: closure_0 + containerBottomInset }), items);
let tmp4 = (function useLinesForRowIndexCallback() {
2026-07-20 16:05:17 +00:00
let closure_0 = containerBottomInset.useRef([]);
return containerBottomInset.useCallback((arg0) => {
let tmp = ref.current[arg0];
if (null == tmp) {
const _Math = Math;
const _Math2 = Math;
const sum = Math.floor(3 * Math.random()) + 1;
ref.current[arg0] = sum;
tmp = sum;
}
return tmp;
}, []);
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
const jsx = tmp4;
const items1 = [height, windowVerticalInset, tmp2, tmp4];
2026-07-23 10:11:24 +00:00
let tmp = callback();
const children = containerBottomInset.useMemo(() => {
2026-07-20 16:05:17 +00:00
let diff;
const items = [];
let num = 0;
let num2 = 0;
do {
2026-07-23 10:11:24 +00:00
let tmp = tmp4;
let tmp2 = tmp4(num2);
let tmp3 = tmp2;
tmp4 = height;
num = num + tmp2(height[10])(tmp2);
let tmp5 = tmp4;
2026-07-20 16:05:17 +00:00
let obj = { lines: tmp2 };
let tmp6 = +num2;
num2 = tmp6 + 1;
2026-07-23 10:11:24 +00:00
let arr = items.push(tmp4(tmp2(height[11]), obj, tmp6));
let tmp8 = height;
let tmp9 = tmp2;
let tmp10 = windowVerticalInset;
diff = height - tmp2 - windowVerticalInset;
2026-07-20 16:05:17 +00:00
} while (num < diff);
return items;
}, items1);
2026-07-23 10:11:24 +00:00
const style = [tmp.placeholder, memo, importDefault(height[9])({ visible: true, animated: true })];
return jsx(importDefault(height[12]).View, { style, pointerEvents: "none", children });
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const result = require("getChatInputContainerHeight").fileFinishedImporting("modules/chat/native/placeholder/ChatPlaceholder.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;