48 lines
1.9 KiB
TypeScript
48 lines
1.9 KiB
TypeScript
// Metro module 9403 (f9404).
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../../_bundle/Module712";
|
|
import useSafeAreaInsets_native from "../../../../safe_area/useSafeAreaInsets.native";
|
|
import useKeyboardIsOpen from "../../../../keyboard/native/useKeyboardIsOpen";
|
|
import { EXPRESSION_FOOTER_HEIGHT } from "../../../../../ConstantsIOS";
|
|
import { useDerivedValue } from "../../../../reanimated/ReanimatedRexport";
|
|
import PremiumFeatureUpsell from "./PremiumFeatureUpsell";
|
|
import { EntitlementFeatureNames } from "../../../../../_bundle/Module6201";
|
|
let __initData;
|
|
const useStyles = createStyles((a0) => ({
|
|
container: {
|
|
position: "absolute",
|
|
bottom: a0 + Module712.space.PX_12,
|
|
left: 0,
|
|
right: 0
|
|
}
|
|
}));
|
|
__initData = {
|
|
code: "function PremiumEmojiFeatureUpsellTsx1(){const{shouldShow,inPortalKeyboard,bottomSheetIndex}=this.__closure;if(!shouldShow.get()){return false;}return inPortalKeyboard?bottomSheetIndex.get()===1:bottomSheetIndex.get()===0;}"
|
|
};
|
|
export default function PremiumEmojiFeatureUpsell(props) {
|
|
const { bottomSheetIndex, inPortalKeyboard, shouldShow } = props;
|
|
const bottom = useSafeAreaInsets_native().bottom;
|
|
const keyboardIsOpen = useKeyboardIsOpen();
|
|
const styles = useStyles(EXPRESSION_FOOTER_HEIGHT + bottom);
|
|
const c = function c() {
|
|
let r8 = !!shouldShow.get();
|
|
if (r8) {
|
|
const r12 = bottomSheetIndex.get();
|
|
r8 = inPortalKeyboard ? r12 === 1 : r12 === 0;
|
|
}
|
|
return r8;
|
|
};
|
|
c.__closure = {
|
|
shouldShow,
|
|
inPortalKeyboard,
|
|
bottomSheetIndex
|
|
};
|
|
c.__workletHash = 10168295304319;
|
|
c.__initData = __initData;
|
|
const derivedValue = useDerivedValue(c);
|
|
return keyboardIsOpen ? null : <View style={styles.container}>
|
|
<PremiumFeatureUpsell shouldShow={derivedValue} featureName={EntitlementFeatureNames.EMOJIS_EVERYWHERE} />
|
|
</View>;
|
|
};
|