61 lines
3.1 KiB
TypeScript
61 lines
3.1 KiB
TypeScript
// Module ID: 11620
|
|
// Function ID: 11621
|
|
// Name: GiftIconTrinketsAnimation
|
|
// Dependencies: [19, 17, 4295, 21, 4303, 4718, 1348, 4005, 712, 589, 1884, 500, 9386, 5268, 2]
|
|
|
|
// Module 11620 (GiftIconTrinketsAnimation)
|
|
import { View } from "get ActivityIndicator";
|
|
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
|
|
import { jsx } from "jsxProd";
|
|
import createCacheKey from "createCacheKey";
|
|
import importAllResult from "noop";
|
|
|
|
const require = arg1;
|
|
let closure_6 = createCacheKey.createStyles((width) => {
|
|
width = require(4718) /* MINIMUM_HIT_AREA */.SMALL_BUTTON_HEIGHT + require(4718) /* 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 = require("noop").memo((trinketsAnimationUrl) => {
|
|
trinketsAnimationUrl = trinketsAnimationUrl.trinketsAnimationUrl;
|
|
let APNGPlayer = require;
|
|
let obj = dependencyMap;
|
|
let obj1 = require(1348) /* useIsMobileVisualRefreshExperimentEnabled */;
|
|
const enabled = obj1.useMobileVisualRefreshConfig({ location: "GiftIconTrinketsAnimation" }).enabled;
|
|
const tmp2 = callback(require(4005) /* map */.useToken(importDefault(712).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE));
|
|
const obj3 = require(4005) /* map */;
|
|
const tmp = importDefault;
|
|
const items = [maybeApplyNoTextColorForLightCustomTheme];
|
|
const stateFromStores = require(589) /* initialize */.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
|
|
const tmp4 = enabled ? tmp2.trinketsRefresh : tmp2.trinkets;
|
|
const obj4 = require(589) /* 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 = APNGPlayer(9386).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(tmp(5268), obj);
|
|
}
|
|
obj[2] = tmp5Result;
|
|
tmp5Result = tmp5(View, obj);
|
|
APNGPlayerResult1 = APNGPlayer(500);
|
|
const tmp6 = View;
|
|
}
|
|
});
|
|
const result = require("maybeApplyNoTextColorForLightCustomTheme").fileFinishedImporting("modules/chat_input/native/GiftIconTrinketsAnimation.tsx");
|
|
|
|
export const GiftIconTrinketsAnimation = memoResult;
|