86 lines
6.6 KiB
TypeScript
86 lines
6.6 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] */
|
|
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
|
|
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
|
|
|
|
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 = ReactModule;
|
|
const StyleSheet = (ReactNativeModule).StyleSheet;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const object2 = {};
|
|
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
|
object2['bottom'] = undefined;
|
|
object2['zIndex'] = 2;
|
|
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{questDockContentCollapsed: object2}]);
|
|
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);
|
|
(FileImportTrackerModule).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,
|
|
[QuestDockContext]).quest;
|
|
const styles = useStyles();
|
|
const userStatus = quest.userStatus;
|
|
const value4 = userStatus?.enrolledAt != null;
|
|
binding = env0_3;
|
|
useContext = binding.useContext;
|
|
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
|
|
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
let closure = QuestDockContentCollapsedP;
|
|
const object = {};
|
|
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object.activeQuestDockMode = activeQuestDockMode;
|
|
object.QuestDockMode = QuestDockMode;
|
|
object.hideOnExpand = r10;
|
|
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 13361221764426;
|
|
closure.__initData = env0_9;
|
|
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
const useAnimatedProps = ReanimatedRexportModule.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, ReanimatedRexportModule,
|
|
[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 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};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun104291, 13654, [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660,
|
|
2]) /* metro module 13654, dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */;
|