81 lines
5.8 KiB
TypeScript
81 lines
5.8 KiB
TypeScript
/* Metro module 13654; source: modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */
|
|
function _fun104291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:6, offset: 0x0228ecdb, size: 321 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
|
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
|
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value2.jsx;
|
|
const env0_7 = value2.jsxs;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object3['bottom'] = undefined;
|
|
object3['zIndex'] = 2;
|
|
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{questDockContentCollapsed: object3}]);
|
|
object = {code: 'function QuestDockContentCollapsedTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,hideOnExpand,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
|
object = {code: "function QuestDockContentCollapsedTsx2(){const{activeQuestDockMode,QuestDockMode,hideOnExpand}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?'auto':'none'};}"};
|
|
value = value.memo(QuestDockContentCollapsed);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function QuestDockContentCollapsed({hideOnExpand}) { // fn#104292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:855, offset: 0x0228ee1c, size: 492 bytes, params: 2, frame: 25
|
|
const r10 = hideOnExpand === undefined || hideOnExpand;
|
|
let binding = env0_3;
|
|
let useContext = binding.useContext;
|
|
const quest = Reflect.apply(useContext, binding,
|
|
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
|
const styles = useStyles();
|
|
const userStatus = quest.userStatus;
|
|
const value4 = userStatus?.enrolledAt != null;
|
|
binding = env0_3;
|
|
useContext = binding.useContext;
|
|
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
|
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
let closure = QuestDockContentCollapsedP;
|
|
const object2 = {};
|
|
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object2.activeQuestDockMode = activeQuestDockMode;
|
|
object2.QuestDockMode = QuestDockMode;
|
|
object2.hideOnExpand = r10;
|
|
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
|
closure.__closure = object2;
|
|
closure.__workletHash = 13361221764426;
|
|
closure.__initData = env0_9;
|
|
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const moduleValue2 = reanimatedRexportModule;
|
|
const useAnimatedProps = moduleValue2.useAnimatedProps;
|
|
closure = QuestDockContentCollapsedS;
|
|
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, hideOnExpand: r10};
|
|
closure.__workletHash = 14339269503421;
|
|
closure.__initData = env0_10;
|
|
return ((Component) => <Component style={[styles.questDockContentCollapsed,
|
|
value5]} animatedProps={Reflect.apply(useAnimatedProps, moduleValue2,
|
|
[closure])}>{!value4 && ((Component) => <Component />)(importDefault(13655) /* metro dependency 13655: QuestDockUnenrolledHeader */)}{value4 && ((Component) => <Component />)(importDefault(13660) /* metro dependency 13660: QuestDockEnrolledHeader */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
|
|
}
|
|
|
|
function QuestDockContentCollapsedP() { // fn#104293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1124, owner: QuestDockContentCollapsed.p, offset: 0x0228f008, size: 96 bytes, params: 1, frame: 18
|
|
const springModule = require(4577) /* metro dependency 4577: spring */;
|
|
const withSpring = springModule.withSpring;
|
|
const value3 = activeQuestDockMode.get();
|
|
const COLLAPSED = QuestDockMode.COLLAPSED;
|
|
const value4 = 1;
|
|
return {opacity: Reflect.apply(withSpring, springModule, [value3 === COLLAPSED ? value4 : env0_0 ? 0 : value4,
|
|
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
|
|
}
|
|
|
|
function QuestDockContentCollapsedS() { // fn#104294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1400, owner: QuestDockContentCollapsed.S, offset: 0x0228f068, size: 63 bytes, params: 1, frame: 13
|
|
const value2 = activeQuestDockMode.get();
|
|
const COLLAPSED = QuestDockMode.COLLAPSED;
|
|
const value4 = 'auto';
|
|
return {pointerEvents: value2 === COLLAPSED ? value4 : env0_0 ? 'none' : value4};
|
|
}
|
|
|