52 lines
2.4 KiB
TypeScript
52 lines
2.4 KiB
TypeScript
// Metro module 14210 (f14211).
|
|
import * as Module19 from "react";
|
|
import { useContext, useMemo } from "react";
|
|
import { View, StyleSheet } from "react-native";
|
|
import { QuestDockMode } from "../../QuestConstants";
|
|
import { QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED, QUEST_DOCK_EXPANDED_HEIGHT } from "./QuestDockConstants";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import { QuestDockGestureContext } from "./QuestDockGestureContext";
|
|
import { thumbHashToDataURL } from "../../../../_bundle/thumbHashToRGBA";
|
|
import ReanimatedRexport, { useAnimatedStyle } from "../../../reanimated/ReanimatedRexport";
|
|
const useStyles = createStyles({
|
|
image: {
|
|
...StyleSheet.absoluteFillObject,
|
|
height: QUEST_DOCK_EXPANDED_HEIGHT,
|
|
top: -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED
|
|
},
|
|
overlay: {
|
|
...StyleSheet.absoluteFillObject,
|
|
backgroundColor: "rgba(38, 39, 50, 0.3)",
|
|
height: QUEST_DOCK_EXPANDED_HEIGHT
|
|
}
|
|
});
|
|
const __initData = {
|
|
code: "function QuestDockBlurredHeaderPlaceholderTsx1(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,questDockWrapperSpecs}=this.__closure;return{left:activeQuestDockMode.get()===QuestDockMode.EXPANDED?-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,width:questDockWrapperSpecs.get().width+QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED};}"
|
|
};
|
|
const r50 = Module19.memo(function QuestDockBlurredContentBackground(props) {
|
|
const { animatedLayout, animatedStyle, placeholder } = props;
|
|
const context = useContext(QuestDockGestureContext);
|
|
const { questDockWrapperSpecs, activeQuestDockMode } = context;
|
|
const memo = useMemo(() => ({
|
|
uri: thumbHashToDataURL(Uint8Array.from(atob(placeholder), (a0) => a0.charCodeAt(0)))
|
|
}), [placeholder]);
|
|
const styles = useStyles();
|
|
const D = () => ({
|
|
left: activeQuestDockMode.get() === QuestDockMode.EXPANDED ? -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED : 0,
|
|
width: questDockWrapperSpecs.get().width + QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED
|
|
});
|
|
D.__closure = {
|
|
activeQuestDockMode,
|
|
QuestDockMode,
|
|
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
|
questDockWrapperSpecs
|
|
};
|
|
D.__workletHash = 11176778421725;
|
|
D.__initData = __initData;
|
|
return <>
|
|
<ReanimatedRexport.Image source={memo} style={[styles.image, animatedStyle, useAnimatedStyle(D)]} layout={animatedLayout} />
|
|
<View style={styles.overlay} />
|
|
</>;
|
|
});
|
|
export default r50;
|