decord/source/modules/stickers/native/StickerPackDetailActionSheet.tsx

115 lines
5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10264
// Function ID: 10265
// Dependencies: [32, 19, 10226, 676, 6989, 21, 4668, 1494, 1629, 12, 698, 6988, 10265, 10269, 7162, 6990, 10270, 5438, 10158, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 10264
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import PADDING_HORIZONTAL from "PADDING_HORIZONTAL" /* 10226 */;
import { AnalyticEvents } from "ME" /* 676 */;
import { ACTION_SHEET_MAX_WIDTH } from "ACTION_SHEET_START_HEIGHT_RATIO" /* 6989 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
({ MIN_MARGIN: c5, STICKER_SIZE: closure_6 } = PADDING_HORIZONTAL);
({ jsx: c9, Fragment: c10, jsxs: unpackModuleId } = jsxProd);
2026-08-24 06:08:38 +00:00
let closure_12 = createCacheKey.createStyles({ focusedStickerPreviewContainer: { position: "absolute", left: 0, top: 0, height: "100%", width: "100%", alignItems: "center", justifyContent: "center", backgroundColor: "rgba(0, 0, 0, 0.85)" }, header: { marginHorizontal: 16, marginVertical: 8, backgroundColor: "transparent", height: "create" }, stickers: { paddingHorizontal: 16, marginBottom: 16 }, popoutContainer: { position: "absolute", bottom: 50 } });
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function StickerPackDetailActionSheet(stickerPack) {
stickerPack = stickerPack.stickerPack;
const analyticsPopoutType = stickerPack.analyticsPopoutType;
const onClose = stickerPack.onClose;
let callback;
2026-07-29 08:29:29 +00:00
let first;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
closure_6 = undefined;
2026-07-29 08:29:29 +00:00
let rounded;
2026-08-24 06:08:38 +00:00
closure_8 = undefined;
2026-07-29 08:29:29 +00:00
function onPressSticker(arg0) {
_undefined(arg0);
2026-07-20 16:05:17 +00:00
}
function toggleDisplayingPackDetails() {
if (null != ref.current) {
const _clearTimeout = clearTimeout;
2026-07-29 08:29:29 +00:00
clearTimeout(tmp.current);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
callback(!first);
if (!first) {
2026-07-20 16:05:17 +00:00
const _setTimeout = setTimeout;
2026-07-29 08:29:29 +00:00
tmp.current = setTimeout(() => callback(false), 4000);
2026-07-20 16:05:17 +00:00
}
}
const tmp = callback2();
2026-07-29 08:29:29 +00:00
[tmp5, c3] = callback(first.useState(null), 2);
const tmp6 = callback(first.useState(false), 2);
first = tmp6[0];
closure_5 = tmp6[1];
closure_6 = first.useRef(null);
rounded = Math.floor(Math.min(closure_8, analyticsPopoutType(onClose[7])().width) / (closure_6 + closure_5));
2026-07-23 10:11:24 +00:00
let obj = analyticsPopoutType(onClose[9]);
2026-07-29 08:29:29 +00:00
const tmp4 = callback(first.useState(null), 2);
closure_8 = first.useRef(onClose);
2026-07-20 16:05:17 +00:00
const items = [onClose];
2026-07-29 08:29:29 +00:00
const effect = first.useEffect(() => {
2026-07-20 16:05:17 +00:00
closure_8.current = onClose;
}, items);
2026-07-29 08:29:29 +00:00
const effect1 = first.useEffect(() => () => {
const current = ref.current;
2026-07-20 16:05:17 +00:00
let currentResult;
2026-07-29 08:29:29 +00:00
if (current != null) {
currentResult = current();
2026-07-20 16:05:17 +00:00
}
return currentResult;
}, []);
const items1 = [analyticsPopoutType, stickerPack.id];
2026-07-29 08:29:29 +00:00
const effect2 = first.useEffect(() => {
2026-07-20 16:05:17 +00:00
let obj = analyticsPopoutType(onClose[10]);
obj = { type: analyticsPopoutType, sticker_pack_id: stickerPack.id };
obj.track(rounded.OPEN_POPOUT, obj);
}, items1);
2026-07-29 08:29:29 +00:00
obj = { stickerPack, style: tmp.header, onPress: null, withBanner: true, withDescription: true };
2026-07-20 16:05:17 +00:00
const chunkResult = obj.chunk(stickerPack.stickers, rounded);
2026-07-29 08:29:29 +00:00
let obj2 = stickerPack(onClose[13]);
let tmp17;
if (obj2.doesStickerPackHavePopoutInformation(stickerPack)) {
tmp17 = toggleDisplayingPackDetails;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { scrollable: true, startExpanded: true, handleDisabled: true, header: null, children: null };
2026-08-24 06:08:38 +00:00
obj1 = { children: null };
2026-07-29 08:29:29 +00:00
obj[2] = tmp17;
const items2 = [onPressSticker(analyticsPopoutType(onClose[12]), obj), onPressSticker(stickerPack(onClose[14]).ActionSheetHeaderBar, { variant: "floating" })];
obj1[0] = items2;
obj[3] = closure_11(closure_10, obj1);
obj2 = { style: tmp.stickers, contentContainerStyle: obj3, children: null };
const tmp16 = analyticsPopoutType(onClose[12]);
obj2[2] = chunkResult.map((stickers) => onPressSticker(analyticsPopoutType(onClose[16]), { containerWidth: rounded, stickers, rowSize: rounded, onPressSticker, nativeRow: false }, arg1));
obj[4] = onPressSticker(stickerPack(onClose[15]).BottomSheetScrollView, obj2);
const children = [onPressSticker(stickerPack(onClose[11]).BottomSheet, obj), , ];
let tmp14Result = null != tmp5;
if (tmp14Result) {
const obj4 = { accessibilityRole: "none", style: null, onPress: null, children: null };
obj4[1] = tmp.focusedStickerPreviewContainer;
obj4[2] = function onPress() {
return _undefined(null);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const obj5 = { sticker: null, size: 128 };
obj5[0] = tmp5;
obj4[3] = tmp14(tmp2(tmp3[18]), obj5);
tmp14Result = tmp14(tmp15(tmp3[17]).PressableOpacity, obj4);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
children[1] = tmp14Result;
if (first) {
const obj6 = { stickerPack: null, style: null, onClose: null };
obj6[0] = stickerPack;
obj6[1] = tmp.popoutContainer;
obj6[2] = toggleDisplayingPackDetails;
first = tmp14(tmp2(tmp3[13]), obj6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
children[2] = first;
return closure_11(closure_10, { children });
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/stickers/native/StickerPackDetailActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;