66 lines
3.0 KiB
TypeScript
66 lines
3.0 KiB
TypeScript
// Metro module 14208 (f14209).
|
|
import { memo, useContext } from "react";
|
|
import { StyleSheet } from "react-native";
|
|
import { QuestDockMode } from "../../QuestConstants";
|
|
import { QUEST_DOCK_MODE_CHANGE_PHYSICS } from "./QuestDockConstants";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import QuestDockContext from "./QuestDockContext";
|
|
import { QuestDockGestureContext } from "./QuestDockGestureContext";
|
|
import { useAnimatedStyle, useAnimatedProps } from "../../../reanimated/ReanimatedRexport";
|
|
import * as _spring from "../../../../design/animation/reanimated/spring/spring";
|
|
import ReanimatedNativeView from "../../../core/native/ReanimatedNativeView";
|
|
import QuestDockUnenrolledHeader from "./QuestDockUnenrolledHeader";
|
|
import QuestDockEnrolledHeader from "./QuestDockEnrolledHeader";
|
|
const useStyles = createStyles({
|
|
questDockContentCollapsed: {
|
|
...StyleSheet.absoluteFillObject,
|
|
bottom: void 0,
|
|
zIndex: 2
|
|
}
|
|
});
|
|
const __initData = {
|
|
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)};}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function QuestDockContentCollapsedTsx2(){const{activeQuestDockMode,QuestDockMode,hideOnExpand}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?'auto':'none'};}"
|
|
};
|
|
const r43 = memo(function QuestDockContentCollapsed(props) {
|
|
const hideOnExpand2 = props.hideOnExpand;
|
|
const hideOnExpand = hideOnExpand2 === void 0 || hideOnExpand2;
|
|
const quest = useContext(QuestDockContext).quest;
|
|
const styles = useStyles();
|
|
let r8 = quest.userStatus?.enrolledAt != null;
|
|
const activeQuestDockMode = useContext(QuestDockGestureContext).activeQuestDockMode;
|
|
const u = () => ({
|
|
opacity: _spring.withSpring(activeQuestDockMode.get() !== QuestDockMode.COLLAPSED ? hideOnExpand ? 0 : 1 : 1, QUEST_DOCK_MODE_CHANGE_PHYSICS)
|
|
});
|
|
u.__closure = {
|
|
withSpring: _spring.withSpring,
|
|
activeQuestDockMode,
|
|
QuestDockMode,
|
|
hideOnExpand,
|
|
QUEST_DOCK_MODE_CHANGE_PHYSICS
|
|
};
|
|
u.__workletHash = 13361221764426;
|
|
u.__initData = __initData;
|
|
const animatedStyle = useAnimatedStyle(u);
|
|
const r44 = () => ({
|
|
pointerEvents: activeQuestDockMode.get() !== QuestDockMode.COLLAPSED ? hideOnExpand ? "none" : "auto" : "auto"
|
|
});
|
|
r44.__closure = {
|
|
activeQuestDockMode,
|
|
QuestDockMode,
|
|
hideOnExpand
|
|
};
|
|
r44.__workletHash = 14339269503421;
|
|
r44.__initData = __initData2;
|
|
const animatedProps = useAnimatedProps(r44);
|
|
const r60 = [r8 ? !r8 : <QuestDockUnenrolledHeader />, ,];
|
|
if (r8) {
|
|
r8 = <QuestDockEnrolledHeader />;
|
|
}
|
|
r60[1] = r8;
|
|
return <ReanimatedNativeView style={[styles.questDockContentCollapsed, animatedStyle]} animatedProps={animatedProps}>{r60}</ReanimatedNativeView>;
|
|
});
|
|
export default r43;
|