decord/source/modules/chat_input/native/GiftIconTrinketsAnimation.tsx
2026-08-27 16:17:25 +00:00

69 lines
3.4 KiB
TypeScript

// Module ID: 11734
// Function ID: 11735
// Name: GiftIconTrinketsAnimation
// Dependencies: [19, 17, 4437, 21, 4445, 4885, 1367, 4165, 712, 589, 1903, 500, 8449, 5445, 2]
// Module 11734 (GiftIconTrinketsAnimation)
import set from "set" /* 500 */;
import initialize from "initialize" /* 589 */;
import ThemesDefault from "Themes" /* 712 */;
import useIsMobileVisualRefreshExperimentEnabled from "useIsMobileVisualRefreshExperimentEnabled" /* 1367 */;
import map from "map" /* 4165 */;
import MINIMUM_HIT_AREA from "MINIMUM_HIT_AREA" /* 4885 */;
import preloadDefault from "preload" /* 5445 */;
import useAPNGPlayerControls from "useAPNGPlayerControls" /* 8449 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_4 from "maybeApplyNoTextColorForLightCustomTheme" /* 4437 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4445 */;
import importAllResult from "noop" /* 19 */;
require = arg1;
let closure_6 = createCacheKey.createStyles((width) => {
width = MINIMUM_HIT_AREA.SMALL_BUTTON_HEIGHT + MINIMUM_HIT_AREA.SMALL_BUTTON_PADDING + 2;
const containerRefresh = { position: "absolute", top: 0, left: 0, width, height: width, overflow: "visible", marginLeft: 0, zIndex: 0 };
return { container: { position: "absolute", top: 0, left: 0, width, height: width, overflow: "visible", marginLeft: 4, zIndex: 0 }, containerRefresh, trinkets: { zIndex: 4, position: "absolute", pointerEvents: "none", width: "100%", height: "100%", top: 0, left: 0 }, trinketsRefresh: { zIndex: 4, position: "absolute", pointerEvents: "none", width: "175%", height: "175%", top: "-37.5%", left: "-37.5%" } };
});
const memoResult = importAllResult.memo((trinketsAnimationUrl) => {
trinketsAnimationUrl = trinketsAnimationUrl.trinketsAnimationUrl;
let APNGPlayer = require;
let obj = dependencyMap;
obj1 = useIsMobileVisualRefreshExperimentEnabled;
const enabled = obj1.useMobileVisualRefreshConfig({ location: "GiftIconTrinketsAnimation" }).enabled;
const tmp2 = callback(map.useToken(ThemesDefault.modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE));
const obj3 = map;
const tmp = importDefault;
const items = [closure_4];
const stateFromStores = initialize.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
const tmp4 = enabled ? tmp2.trinketsRefresh : tmp2.trinkets;
const obj4 = initialize;
if (APNGPlayerResult.isNullOrEmpty(trinketsAnimationUrl)) {
return null;
} else {
obj = { style: null, pointerEvents: "none", children: null };
obj[0] = enabled ? tmp2.containerRefresh : tmp2.container;
if (APNGPlayerResult1.isAndroid()) {
APNGPlayer = useAPNGPlayerControls.APNGPlayer;
obj = { url: null, autoplay: null, style: null };
obj[0] = trinketsAnimationUrl;
obj[1] = !stateFromStores;
obj[2] = tmp4;
let tmp5Result = tmp5(APNGPlayer, obj);
} else {
obj = { source: null, style: null, resizeMode: "contain", enableAnimation: null };
obj1 = { uri: null };
obj1[0] = trinketsAnimationUrl;
obj[0] = obj1;
obj[1] = tmp4;
obj[3] = !stateFromStores;
tmp5Result = tmp5(preloadDefault, obj);
}
obj[2] = tmp5Result;
tmp5Result = tmp5(View, obj);
APNGPlayerResult1 = set;
const tmp6 = View;
}
});
const result = require("set").fileFinishedImporting("modules/chat_input/native/GiftIconTrinketsAnimation.tsx");
export const GiftIconTrinketsAnimation = memoResult;