83 lines
2.9 KiB
TypeScript
83 lines
2.9 KiB
TypeScript
// Metro module 11435 (f11436).
|
|
import { memo } from "react";
|
|
import { StyleSheet } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import * as _PlatformUtils from "../../../../utils/PlatformUtils";
|
|
import { useAnimatedStyle, useAnimatedProps } from "../../../reanimated/ReanimatedRexport";
|
|
import * as _spring from "../../../../design/animation/reanimated/spring/spring";
|
|
import useTheme from "../../../../hooks/useTheme";
|
|
import ReanimatedNativeView from "../../../core/native/ReanimatedNativeView";
|
|
import VisualEffectViewAnimated from "../../../visual_effect_view/native/VisualEffectViewAnimated";
|
|
import { isThemeDark } from "../../../../design/shared";
|
|
import NativeView from "../../../core/native/NativeView";
|
|
const useStyles = createStyles({
|
|
blur: {
|
|
position: "absolute",
|
|
top: 0,
|
|
left: 0,
|
|
right: 0
|
|
},
|
|
strokeContainer: {
|
|
position: "absolute",
|
|
left: 0,
|
|
right: 0,
|
|
bottom: -StyleSheet.hairlineWidth,
|
|
height: StyleSheet.hairlineWidth
|
|
},
|
|
stroke: {
|
|
height: StyleSheet.hairlineWidth,
|
|
opacity: 0.15,
|
|
backgroundColor: "white"
|
|
},
|
|
strokeAlt: {
|
|
height: StyleSheet.hairlineWidth,
|
|
opacity: 0.8,
|
|
backgroundColor: "black"
|
|
},
|
|
strokeAltLight: {
|
|
height: StyleSheet.hairlineWidth,
|
|
opacity: 0.2,
|
|
backgroundColor: "black"
|
|
}
|
|
});
|
|
const isAndroid = _PlatformUtils.isAndroid();
|
|
const __initData = {
|
|
code: "function VoicePanelHeaderGlassBlurTsx1(){const{shown,IS_ANDROID}=this.__closure;return{opacity:shown.get()?IS_ANDROID?0.7:1:0};}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function VoicePanelHeaderGlassBlurTsx2(){const{withSpring,shown}=this.__closure;return{blurAmount:withSpring(shown.get()?0.3:0)};}"
|
|
};
|
|
const r46 = memo(function HeaderGlassBlur(props) {
|
|
const { shown, blurStyle, style } = props;
|
|
const styles = useStyles();
|
|
const k = () => ({
|
|
opacity: shown.get() ? isAndroid ? 0.7 : 1 : 0
|
|
});
|
|
k.__closure = {
|
|
shown,
|
|
IS_ANDROID: isAndroid
|
|
};
|
|
k.__workletHash = 3451055086565;
|
|
k.__initData = __initData;
|
|
const animatedStyle = useAnimatedStyle(k);
|
|
const r25 = () => ({
|
|
blurAmount: _spring.withSpring(shown.get() ? 0.3 : 0)
|
|
});
|
|
r25.__closure = {
|
|
withSpring: _spring.withSpring,
|
|
shown
|
|
};
|
|
r25.__workletHash = 5642055202507;
|
|
r25.__initData = __initData2;
|
|
const animatedProps = useAnimatedProps(r25);
|
|
const theme = useTheme();
|
|
return <ReanimatedNativeView style={[styles.blur, style, animatedStyle]}>
|
|
<VisualEffectViewAnimated blurStyle="ultra-thin" blurTheme={isThemeDark(theme) ? "dark" : "light"} style={[StyleSheet.absoluteFillObject, blurStyle]} animatedProps={animatedProps} />
|
|
<NativeView style={styles.strokeContainer}>
|
|
<NativeView style={styles.stroke} />
|
|
<NativeView style={isThemeDark(theme) ? styles.strokeAlt : styles.strokeAltLight} />
|
|
</NativeView>
|
|
</ReanimatedNativeView>;
|
|
});
|
|
export default r46;
|