128 lines
5.9 KiB
TypeScript
128 lines
5.9 KiB
TypeScript
// Module ID: 14129
|
|
// Function ID: 14130
|
|
// Name: BountiesScrollPromptFooterContent
|
|
// Dependencies: [19, 17, 4247, 5113, 21, 4255, 712, 4256, 4259, 589, 1581, 4116, 3967, 14130, 14131, 8553, 2]
|
|
// Exports: default
|
|
|
|
// Module 14129 (BountiesScrollPromptFooterContent)
|
|
import noop from "noop";
|
|
import { StyleSheet } from "get ActivityIndicator";
|
|
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
|
|
import { QuestsExperimentLocations } from "QuestsExperimentLocations";
|
|
import jsxProd from "jsxProd";
|
|
import createCacheKey from "createCacheKey";
|
|
|
|
let error;
|
|
let metroImportAll;
|
|
const require = arg1;
|
|
function BountiesScrollPromptFooterContent(zIndex) {
|
|
let children;
|
|
let onContentLayout;
|
|
let visibilityOpacityStyle;
|
|
zIndex = zIndex.zIndex;
|
|
const opacityStyle = zIndex.opacityStyle;
|
|
let importDefault;
|
|
({ children, onContentLayout, visibilityOpacityStyle } = zIndex);
|
|
const tmp = callback2();
|
|
const items = [zIndex];
|
|
const memo = React.useMemo(() => {
|
|
let tmp2;
|
|
if (null != zIndex) {
|
|
const obj = { zIndex: null };
|
|
obj[0] = tmp;
|
|
tmp2 = obj;
|
|
}
|
|
return tmp2;
|
|
}, items);
|
|
let obj = zIndex(589);
|
|
const items1 = [maybeApplyNoTextColorForLightCustomTheme];
|
|
const stateFromStores = obj.useStateFromStores(items1, () => useReducedMotion.useReducedMotion);
|
|
const tmp6 = importDefault(1581)();
|
|
importDefault = tmp6;
|
|
const items2 = [tmp6.bottom];
|
|
const memo1 = React.useMemo(() => ({ paddingBottom: Math.max(_undefined.bottom, _undefined(outer1_2[6]).space.PX_8) }), items2);
|
|
obj = { style: items3, pointerEvents: "none", children: null };
|
|
items3 = [tmp.root, visibilityOpacityStyle, memo];
|
|
obj = { style: items4, children: null };
|
|
items4 = [tmp.gradient, opacityStyle];
|
|
let str = "play";
|
|
if (stateFromStores) {
|
|
str = "halt";
|
|
}
|
|
obj[1] = closure_7(zIndex(3967).BountiesScrollGradientRive, { stateMachine: "State Machine 1", fit: "fill", alignment: "bottom-center", withReducedMotion: str });
|
|
const items5 = [closure_7(importDefault(4116).View, obj), ];
|
|
const items6 = [tmp.content, memo1, opacityStyle];
|
|
items5[1] = closure_7(importDefault(4116).View, { style: items6, onLayout: onContentLayout, children });
|
|
obj[2] = items5;
|
|
return closure_8(importDefault(4116).View, obj);
|
|
}
|
|
({ jsx: error, jsxs: metroImportAll } = jsxProd);
|
|
let closure_9 = createCacheKey.createStyles(() => {
|
|
let obj = { root: { position: "absolute", bottom: 0, left: 0, right: 0 }, content: null, gradient: null };
|
|
obj = { flex: 1, minHeight: 97, alignItems: "center", justifyContent: "center", paddingHorizontal: importDefault(712).space.PX_16 };
|
|
obj[1] = obj;
|
|
obj = {};
|
|
const merged = Object.assign(StyleSheet.absoluteFillObject);
|
|
obj[2] = obj;
|
|
return obj;
|
|
});
|
|
const fn = function t(value) {
|
|
const obj = { opacity: null };
|
|
obj[0] = require(4256) /* CONFIG_NEVER_ANIMATE_TIMING */.withTiming(value, require(4259) /* timingNone */.timingStandard, "respect-motion-settings");
|
|
return obj;
|
|
};
|
|
createCacheKey = { withTiming: require("CONFIG_NEVER_ANIMATE_TIMING").withTiming, timingStandard: require("timingNone").timingStandard };
|
|
fn.__closure = createCacheKey;
|
|
fn.__workletHash = 11416950434629;
|
|
fn.__initData = { code: "function BountiesScrollPromptFooterTsx1(visible){const{withTiming,timingStandard}=this.__closure;return{opacity:withTiming(visible,timingStandard,'respect-motion-settings')};}" };
|
|
const fn2 = function n(value, fn2) {
|
|
const obj = { opacity: null };
|
|
obj[0] = require(4256) /* CONFIG_NEVER_ANIMATE_TIMING */.withTiming(value, require(4259) /* timingNone */.timingStandard, "respect-motion-settings", fn2);
|
|
return obj;
|
|
};
|
|
createCacheKey = { withTiming: require("CONFIG_NEVER_ANIMATE_TIMING").withTiming, timingStandard: require("timingNone").timingStandard };
|
|
fn2.__closure = createCacheKey;
|
|
fn2.__workletHash = 9928471408966;
|
|
fn2.__initData = { code: "function BountiesScrollPromptFooterTsx2(visible,cleanUp){const{withTiming,timingStandard}=this.__closure;return{opacity:withTiming(visible,timingStandard,'respect-motion-settings',cleanUp)};}" };
|
|
const result = require("maybeApplyNoTextColorForLightCustomTheme").fileFinishedImporting("modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx");
|
|
|
|
export default function BountiesScrollPromptFooter(visible) {
|
|
visible = visible.visible;
|
|
let merged = Object.assign(visible, Object.create(null));
|
|
let obj = require(14130) /* apexExperiment */;
|
|
const isBountiesModalTransitionsRefactorEnabled = obj.useIsBountiesModalTransitionsRefactorEnabled(QuestsExperimentLocations.VIDEO_MODAL_MOBILE);
|
|
let obj1 = require(589) /* initialize */;
|
|
const items = [maybeApplyNoTextColorForLightCustomTheme];
|
|
const stateFromStores = obj1.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
|
|
const callback = React.useCallback((arg0, visibilityOpacityStyle) => {
|
|
const obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.visibilityOpacityStyle = visibilityOpacityStyle;
|
|
return callback(closure_12, obj);
|
|
}, []);
|
|
obj = { visible, entranceTiming: require(4259) /* timingNone */.timingStandard, exitTiming: require(4259) /* timingNone */.timingStandard };
|
|
const visibilityTransition = require(14131) /* useVisibilityTransition */.useVisibilityTransition(obj);
|
|
let shouldRender = visibilityTransition.shouldRender;
|
|
if (isBountiesModalTransitionsRefactorEnabled) {
|
|
obj = { useReducedMotion: null, item: null, entering: null, exiting: null, renderItem: null };
|
|
obj[0] = stateFromStores;
|
|
let tmp16;
|
|
if (visible) {
|
|
tmp16 = merged;
|
|
}
|
|
obj[1] = tmp16;
|
|
obj[2] = fn;
|
|
obj[3] = fn2;
|
|
obj[4] = callback;
|
|
shouldRender = callback(importDefault(8553), obj);
|
|
const tmp13 = callback;
|
|
const tmp15 = importDefault(8553);
|
|
} else if (shouldRender) {
|
|
obj1 = {};
|
|
const merged1 = Object.assign(merged);
|
|
obj1.visibilityOpacityStyle = tmp7;
|
|
shouldRender = callback(BountiesScrollPromptFooterContent, obj1);
|
|
}
|
|
return shouldRender;
|
|
};
|
|
export const BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = 97;
|