Files
discord-decomp/modules/voice_messages/native/components/VoiceMessageOverlay.tsx
T
2026-11-01 12:12:55 +02:00

1112 lines
44 KiB
TypeScript

// Metro module 11738 (f11739).
import _slicedToArray from "../../../../_bundle/_slicedToArray";
import { useState, memo, useRef, useEffect } from "react";
import { StyleSheet, AppState, View } from "react-native";
import AccessibilityStore from "../../../a11y/AccessibilityStore";
import ChannelStore from "../../../../stores/ChannelStore";
import { useVoiceMessagesUIStore } from "../VoiceMessagesUIStore";
import * as _VoiceMessageConstants from "../../VoiceMessageConstants";
import { ComponentActionsKeyed } from "../../../../Constants";
import { ANDROID_FOREGROUND_RIPPLE } from "../../../../design/void/Form/native/FormConstants";
import * as _ChatInputConstants from "../../../chat_input/native/ChatInputConstants";
import { CHAT_INPUT_HORIZONTAL_PADDING } from "../../../chat_input/native/ChatInputConstants";
import { jsx } from "react/jsx-runtime";
import * as _ReanimatedRexport from "../../../reanimated/ReanimatedRexport";
import ReanimatedRexport, { useAnimatedReaction, useDerivedValue, useAnimatedStyle, useAnimatedProps, useSharedValue, withDelay } from "../../../reanimated/ReanimatedRexport";
import { Icon } from "../../../../design/void/native";
import { PressableOpacity } from "../../../../design/void/Pressables/native/Pressables";
import { Text } from "../../../../design/components/Text/native/Text";
import Module12 from "../../../../_bundle/Module12";
import { Ellipse, Svg } from "../../../../_bundle/Module8531";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { DARK_0_LIGHT_1 } from "../../../../design/migrations/native/LegacyTokens";
import { useStateFromStores } from "../../../../_bundle/Module589";
import { useToken } from "../../../../design/tokens/native/useToken";
import { useMobileVisualRefreshConfig } from "../../../themes/experiments/MobileVisualRefreshExperiment";
import useRefValue from "../../../../hooks/useRefValue";
import { intl, t } from "../../../../intl/index.native";
import * as _timing from "../../../../design/animation/reanimated/timing/timing";
import useTheme from "../../../../hooks/useTheme";
import { isThemeLight } from "../../../../design/shared";
import Module4685 from "../../../../_bundle/Module4685";
import Module10367 from "../../../../_bundle/Module10367";
import Module11739 from "../../../../_bundle/Module11739";
import useSafeAreaInsetsKeyboardAware_native from "../../../safe_area/useSafeAreaInsetsKeyboardAware.native";
import useSafeAreaInsets_native from "../../../safe_area/useSafeAreaInsets.native";
import { getIsScreenReaderEnabled } from "../../../a11y/native/useIsScreenReaderEnabled.native";
import { setAccessibilityFocus } from "../../../a11y/native/setAccessibilityFocus.android";
import { ComponentDispatch } from "../../../../utils/ComponentDispatchUtils";
import { VoiceMessageRecordingResult } from "../../VoiceMessageAnalytics";
import useWindowDimensions_native from "../../../screen/useWindowDimensions.native";
import { useWakeLock } from "../../../device/native/WakeLock";
import VoiceMessageChat from "./VoiceMessageChat";
import VoiceMessagePillButton from "./VoiceMessagePillButton";
import Module4149 from "../../../../_bundle/Module4149";
import { triggerHaptic } from "../VoiceMessageUtils";
import Module4136 from "../../../../_bundle/Module4136";
import Module10800 from "../../../../_bundle/Module10800";
function $mk87907($env) {
return function _() {
const r4 = $env[0].get()[1];
const r9 = $env.$parent;
const r6 = r9[0];
const r5 = r9[2];
return r6(r5[25]).withTiming(r4, {
easing: r6(r5[11]).Easing.linear,
duration: 150
});
};
}
function $mk87908($env) {
return function u() {
let r6;
const r3 = $env;
const r5 = r3[0].get();
const r8 = $env.$parent;
const r10 = (0, r8[3])(r5, 2);
if (r10[0] + r10[1] === 2) {
const r18 = r3[1];
r6 = [r18, r18, r3[3], r3[4]];
} else {
r6 = [r3[1], r3[2], r3[3], r3[4]];
}
return (0, r8[0])(r8[2][11]).interpolateColor(r3[5].get(), r8[25], r6);
};
}
let Component, Component5, Component2, c8039_22, useStyles, PLUM_13, c8039_25, c8039_26, c8039_27, c8039_28, c8039_29, Component3, c8039_31, c8039_32, Component4, c8039_34, c8039_35, c8039_36, c8039_37, c8039_38, c8039_39, c8039_40, c8039_41, c8039_42, c8039_43, c8039_44, c8039_46, c8039_47, c8039_48, c8039_49, c8039_50, c8039_51, c8039_52, c8039_53, c8039_54;
let env8039 = {};
const LockPill = function LockPill(props) {
let voiceMessageAnimationState2, derivedValue, derivedValue2, derivedValue3, derivedValue4;
const { safeAreaBottom, initialAnimation, voiceMessageAnimationState } = props;
const styles = useStyles(useToken(Module712.modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE));
const [state, setState] = useState(false);
const r42 = function _() {
return voiceMessageAnimationState.get()[1] === _VoiceMessageConstants.VoiceMessageAnimationState.LOCKED || voiceMessageAnimationState.get()[1] === _VoiceMessageConstants.VoiceMessageAnimationState.LOCKING;
};
r42.__closure = {
voiceMessageAnimationState,
VoiceMessageAnimationState: _VoiceMessageConstants.VoiceMessageAnimationState
};
r42.__workletHash = 16672558304670;
r42.__initData = c8039_42;
const r46 = function c(a0, a1) {
if (a0 !== a1) {
_ReanimatedRexport.runOnJS(setState)(a0);
}
};
r46.__closure = {
runOnJS: _ReanimatedRexport.runOnJS,
setLocked: setState
};
r46.__workletHash = 10857258354778;
r46.__initData = c8039_43;
useAnimatedReaction(r42, r46);
voiceMessageAnimationState2 = voiceMessageAnimationState;
derivedValue = void 0;
derivedValue2 = void 0;
derivedValue3 = void 0;
derivedValue4 = void 0;
const theme = useTheme();
const token = useToken(Module712.colors.BACKGROUND_BASE_LOWEST);
const WHITE = Module712.unsafe_rawColors.WHITE;
const sendingColor = isThemeLight(theme) ? WHITE : token;
const cancelingColor = isThemeLight(theme) ? WHITE : token;
let env19107;
const r76 = env19107 = {
$parent: env8039
};
env19107[0] = voiceMessageAnimationState;
env19107[1] = sendingColor;
env19107[2] = cancelingColor;
env19107[3] = WHITE;
env19107[4] = WHITE;
const r80 = $mk87907(r76);
r80.__closure = {
voiceMessageAnimationState,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r80.__workletHash = 7432526131204;
const __initData = c8039_34;
r80.__initData = __initData;
const derivedValue12 = useDerivedValue(r80);
env19107[5] = derivedValue12;
const r92 = $mk87908(r76);
r92.__closure = {
voiceMessageAnimationState,
sendingColor,
lockingColor: WHITE,
lockedColor: WHITE,
cancelingColor,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue12,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r92.__workletHash = 8474040050475;
const __initData2 = c8039_35;
r92.__initData = __initData2;
derivedValue = useDerivedValue(r92);
const r111 = isThemeLight(theme) ? Module712.colors.INTERACTIVE_TEXT_DEFAULT : Module712.colors.INTERACTIVE_TEXT_ACTIVE;
let env19108;
const token2 = useToken(r111);
const token3 = useToken(Module712.colors.STATUS_POSITIVE);
const r121 = env19108 = {
$parent: env8039
};
env19108[0] = voiceMessageAnimationState;
env19108[1] = token2;
env19108[2] = token2;
env19108[3] = token3;
env19108[4] = token3;
env19108[5] = void 0;
const r125 = $mk87907(r121);
r125.__closure = {
voiceMessageAnimationState,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r125.__workletHash = 7432526131204;
r125.__initData = __initData;
const derivedValue13 = useDerivedValue(r125);
env19108[5] = derivedValue13;
const r135 = $mk87908(r121);
r135.__closure = {
voiceMessageAnimationState,
sendingColor: token2,
lockingColor: token3,
lockedColor: token3,
cancelingColor: token2,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue13,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r135.__workletHash = 8474040050475;
r135.__initData = __initData2;
derivedValue2 = useDerivedValue(r135);
const n = function n() {
return _timing.withTiming(voiceMessageAnimationState2.get()[1], {
easing: _ReanimatedRexport.Easing.linear,
duration: 150
});
};
n.__closure = {
voiceMessageAnimationState,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
n.__workletHash = 11385805572554;
n.__initData = c8039_36;
derivedValue3 = useDerivedValue(n);
const r158 = function() {
const r10 = _slicedToArray(voiceMessageAnimationState2.get(), 2);
const r6 = r10[0] + r10[1] === 2 ? [1, 1, 1, 0] : [1, 0, 1, 0];
return _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, r6);
};
r158.__closure = {
voiceMessageAnimationState,
interpolate: _ReanimatedRexport.interpolate,
timing: derivedValue3,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r158.__workletHash = 13564673991122;
r158.__initData = c8039_37;
derivedValue4 = useDerivedValue(r158);
const l = function l() {
return {
height: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [68, 68, 104, 104])
};
};
l.__closure = {
interpolate: _ReanimatedRexport.interpolate,
timing: derivedValue3,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
l.__workletHash = 16239675884614;
l.__initData = c8039_38;
const animatedStyle = useAnimatedStyle(l);
const r180 = function c() {
const r8 = derivedValue3.get();
return {
width: _ReanimatedRexport.interpolate(r8, c8039_25, [40, 40, 56, 56]),
height: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [68, 68, 56, 56]),
opacity: derivedValue4.get(),
backgroundColor: derivedValue.get(),
marginHorizontal: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [0, 0, -8, -8]),
marginBottom: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [0, 0, 36, 36])
};
};
r180.__closure = {
interpolate: _ReanimatedRexport.interpolate,
timing: derivedValue3,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25,
lockContainerOpacity: derivedValue4,
lockedBackgroundColor: derivedValue
};
r180.__workletHash = 16191961901595;
r180.__initData = c8039_39;
const animatedStyle2 = useAnimatedStyle(r180);
const r191 = function _() {
const r8 = derivedValue3.get();
return {
width: _ReanimatedRexport.interpolate(r8, c8039_25, [24, 24, 32, 32]),
height: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [24, 24, 32, 32]),
marginTop: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [12, 12, 10, 10]),
tintColor: derivedValue2.get()
};
};
r191.__closure = {
interpolate: _ReanimatedRexport.interpolate,
timing: derivedValue3,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25,
lockIconColor: derivedValue2
};
r191.__workletHash = 10256653077678;
r191.__initData = c8039_40;
const animatedStyle3 = useAnimatedStyle(r191);
const r202 = function u() {
return {
opacity: _ReanimatedRexport.interpolate(derivedValue3.get(), c8039_25, [1, 1, 0, 0])
};
};
r202.__closure = {
interpolate: _ReanimatedRexport.interpolate,
timing: derivedValue3,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r202.__workletHash = 13143453012261;
r202.__initData = c8039_41;
const animatedStyle4 = useAnimatedStyle(r202);
const source = state ? Module4685 : Module10367;
const f = function f() {
return {
opacity: initialAnimation.get(),
bottom: safeAreaBottom + _ChatInputConstants.CHAT_INPUT_HEIGHT + 24 + 8 * initialAnimation.get()
};
};
f.__closure = {
initialAnimation,
safeAreaBottom,
CHAT_INPUT_HEIGHT: _ChatInputConstants.CHAT_INPUT_HEIGHT,
LOCK_PILL_BOTTOM_OFFSET: 32,
INITIAL_SHIFT: 8
};
f.__workletHash = 601776335657;
f.__initData = c8039_44;
const animatedStyle5 = useAnimatedStyle(f);
return <ReanimatedRexport.View style={[styles.lockParentContainer, animatedStyle, animatedStyle5]}>
<ReanimatedRexport.View style={[styles.lockContainer, animatedStyle2]}>
<Component style={animatedStyle3} source={source} />
<Component style={[styles.chevon, animatedStyle4]} source={Module11739} />
</ReanimatedRexport.View>
</ReanimatedRexport.View>;
};
Component = ReanimatedRexport.createAnimatedComponent(Icon);
Component5 = ReanimatedRexport.createAnimatedComponent(PressableOpacity);
Component2 = ReanimatedRexport.createAnimatedComponent(Text);
c8039_22 = Module12.memoize(() => ReanimatedRexport.createAnimatedComponent(Ellipse));
useStyles = createStyles((a0) => ({
container: {
alignItems: "center",
...StyleSheet.absoluteFillObject,
overflow: "hidden"
},
innerContainer: {
flexDirection: "row",
alignItems: "flex-end",
paddingTop: 8,
paddingHorizontal: Module712.modules.mobile.VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_HORIZONTAL,
paddingBottom: Module712.modules.mobile.VOICE_MESSAGE_RECORDING_CONTAINER_PADDING_BOTTOM
},
contentContainer: {
position: "absolute",
bottom: 0,
width: "100%",
alignItems: "center",
overflow: "hidden"
},
trashContainer: {
width: a0,
height: a0,
borderRadius: Module712.modules.button.BORDER_RADIUS,
alignItems: "center",
justifyContent: "center"
},
sendContainer: {
width: a0,
height: a0,
borderRadius: Module712.modules.button.BORDER_RADIUS,
alignItems: "center",
justifyContent: "center"
},
voiceChatContainer: {
flex: 1,
height: Module712.modules.mobile.VOICE_MESSAGE_RECORDING_CHAT_CONTAINER_HEIGHT,
marginRight: Module712.modules.mobile.VOICE_MESSAGE_RECORDING_CHAT_CONTAINER_MARGIN_RIGHT,
alignItems: "flex-end"
},
lockContainer: {
height: 68,
width: a0,
borderRadius: Module712.modules.button.BORDER_RADIUS,
display: "flex",
alignItems: "center",
flexDirection: "column",
elevation: 12,
shadowColor: Module712.colors.BLACK,
shadowOffset: {
width: 0,
height: 12
},
shadowOpacity: 0.12,
shadowRadius: 36,
borderWidth: DARK_0_LIGHT_1,
borderStyle: "solid",
borderColor: "rgba(0, 0, 0, 0.08)"
},
lockParentContainer: {
position: "absolute",
right: CHAT_INPUT_HORIZONTAL_PADDING,
width: a0
},
chevon: {
height: 16,
width: 16,
marginTop: 8,
tintColor: Module712.colors.ICON_SUBTLE
}
}));
PLUM_13 = Module712.unsafe_rawColors.PLUM_13;
c8039_25 = [_VoiceMessageConstants.VoiceMessageAnimationState.SENDING, _VoiceMessageConstants.VoiceMessageAnimationState.CANCELLING, _VoiceMessageConstants.VoiceMessageAnimationState.LOCKING, _VoiceMessageConstants.VoiceMessageAnimationState.LOCKED];
c8039_26 = {
code: "function VoiceMessageOverlayTsx1(){const{useReducedMotion,currWaveHeight}=this.__closure;var _currWaveHeight$get,_currWaveHeight;return useReducedMotion?0.5:(_currWaveHeight$get=(_currWaveHeight=currWaveHeight)===null||_currWaveHeight===void 0?void 0:_currWaveHeight.get())!==null&&_currWaveHeight$get!==void 0?_currWaveHeight$get:0;}"
};
c8039_27 = {
code: "function VoiceMessageOverlayTsx2(){const{derivedCurrWaveHeight,offsetThreshold}=this.__closure;return derivedCurrWaveHeight.get()*offsetThreshold;}"
};
c8039_28 = {
code: "function VoiceMessageOverlayTsx3(){const{voiceMessageEllipseBgColor,radius,offset}=this.__closure;return{fill:voiceMessageEllipseBgColor.get(),ry:radius+offset.get(),rx:radius,cy:radius+offset.get(),cx:radius};}"
};
c8039_29 = {
code: "function VoiceMessageOverlayTsx4(){const{radius,height,offset}=this.__closure;return{position:'absolute',width:radius*2,height:height.get()+offset.get(),bottom:0};}"
};
Component3 = memo(function({ radius, opacity, height, offsetThreshold, voiceMessageAnimationState: voiceMessageAnimationState3 }) {
let c19109_4, derivedValue5, derivedValue6, derivedValue7;
let env19110;
c19109_4 = void 0;
derivedValue5 = void 0;
derivedValue6 = void 0;
derivedValue7 = void 0;
const stateFromStores = useStateFromStores([AccessibilityStore], () => AccessibilityStore.useReducedMotion, []);
const currWaveHeight = (0, useVoiceMessagesUIStore)((a0) => a0.currWaveHeight);
c19109_4 = currWaveHeight;
const r30 = () => {
let r3 = 0.5;
if (!stateFromStores) {
let r7 = c19109_4 == null ? void 0 : c19109_4.get();
if (r7 == null) {
r7 = 0;
}
r3 = r7;
}
return r3;
};
r30.__closure = {
useReducedMotion: stateFromStores,
currWaveHeight
};
r30.__workletHash = 2925868096827;
r30.__initData = c8039_26;
derivedValue5 = useDerivedValue(r30);
const token = useToken(Module712.colors.BACKGROUND_BRAND);
const RED_400 = Module712.unsafe_rawColors.RED_400;
const r44 = env19110 = {
$parent: env8039
};
env19110[0] = voiceMessageAnimationState3;
env19110[1] = token;
env19110[2] = RED_400;
env19110[3] = token;
env19110[4] = token;
env19110[5] = void 0;
const r48 = $mk87907(r44);
r48.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r48.__workletHash = 7432526131204;
r48.__initData = c8039_34;
const derivedValue12 = useDerivedValue(r48);
env19110[5] = derivedValue12;
const r61 = $mk87908(r44);
r61.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: token,
lockingColor: token,
lockedColor: token,
cancelingColor: RED_400,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue12,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r61.__workletHash = 8474040050475;
r61.__initData = c8039_35;
derivedValue6 = useDerivedValue(r61);
const r73 = () => derivedValue5.get() * offsetThreshold;
r73.__closure = {
derivedCurrWaveHeight: derivedValue5,
offsetThreshold
};
r73.__workletHash = 7278593580538;
r73.__initData = c8039_27;
derivedValue7 = useDerivedValue(r73);
const T = () => ({
fill: derivedValue6.get(),
ry: radius + derivedValue7.get(),
rx: radius,
cy: radius + derivedValue7.get(),
cx: radius
});
T.__closure = {
voiceMessageEllipseBgColor: derivedValue6,
radius,
offset: derivedValue7
};
T.__workletHash = 12489173275515;
T.__initData = c8039_28;
const animatedProps = useAnimatedProps(T);
const I = function I() {
return {
position: "absolute",
width: 2 * radius,
height: height.get() + derivedValue7.get(),
bottom: 0
};
};
I.__closure = {
radius,
height,
offset: derivedValue7
};
I.__workletHash = 16593476434034;
I.__initData = c8039_29;
return <ReanimatedRexport.View style={useAnimatedStyle(I)}>
<Svg>
{jsx(c8039_22(), {
animatedProps,
opacity
})}
</Svg>
</ReanimatedRexport.View>;
});
c8039_31 = {
code: "function VoiceMessageOverlayTsx5(){const{voiceMessageAnimationState,runOnJS,setVoiceMessageState}=this.__closure;if(voiceMessageAnimationState.get()==null)return;runOnJS(setVoiceMessageState)(voiceMessageAnimationState.get()[1]);return voiceMessageAnimationState.get();}"
};
c8039_32 = {
code: "function VoiceMessageOverlayTsx6(){const{initialAnimation,recordingAnimation,INITIAL_SHIFT}=this.__closure;const animationValue=Math.min(initialAnimation.get(),recordingAnimation.get());return{opacity:animationValue,marginBottom:-INITIAL_SHIFT*(1-animationValue)};}"
};
Component4 = memo(function(a0) {
let children, enabled;
let initialAnimation2, recordingAnimation, c19111_2, setState2, current, ref;
L21: {
initialAnimation2 = a0.initialAnimation;
recordingAnimation = a0.recordingAnimation;
const exiting3 = a0.exiting;
c19111_2 = void 0;
setState2 = void 0;
current = void 0;
ref = void 0;
const voiceMessagesUIStore2 = useVoiceMessagesUIStore((a0) => a0.voiceMessageAnimationState);
c19111_2 = voiceMessagesUIStore2;
const voiceMessagesUIStore = useVoiceMessagesUIStore((a0) => a0.isUsingHoldGesture);
let state;
[state, setState2] = useState(_VoiceMessageConstants.VoiceMessageAnimationState.SENDING);
let r12 = useVoiceMessagesUIStore((a0) => a0.savedVoiceMessageUploadData != null);
enabled = useMobileVisualRefreshConfig({
location: "VoiceMessagePrompt"
}).enabled;
const r39 = function c() {
if (c19111_2.get() != null) {
_ReanimatedRexport.runOnJS(setState2)(c19111_2.get()[1]);
return c19111_2.get();
}
};
r39.__closure = {
voiceMessageAnimationState: voiceMessagesUIStore2,
runOnJS: _ReanimatedRexport.runOnJS,
setVoiceMessageState: setState2
};
r39.__workletHash = 8577984959763;
r39.__initData = c8039_31;
useDerivedValue(r39);
ref = useRef(void 0);
const refValue = useRefValue(ref);
if (exiting3) {
current = refValue;
children = refValue;
} else {
if (r12 && !voiceMessagesUIStore) {
children = intl.string(t["m+sRVL"]);
current = children;
break L21;
}
if (r12 && state === _VoiceMessageConstants.VoiceMessageAnimationState.SENDING) {
current = intl.string(t["zPxm/X"]);
children = current;
break L21;
}
if (r12 && state === _VoiceMessageConstants.VoiceMessageAnimationState.CANCELLING) {
current = intl.string(t.sB81Bo);
children = current;
break L21;
}
if (!r12 && state === _VoiceMessageConstants.VoiceMessageAnimationState.SENDING) {
current = intl.string(t.cyL7DJ);
children = current;
break L21;
}
if (!r12 && state === _VoiceMessageConstants.VoiceMessageAnimationState.CANCELLING) {
current = intl.string(t["a+A3+f"]);
children = current;
break L21;
}
if (!r12) {
r12 = state !== _VoiceMessageConstants.VoiceMessageAnimationState.LOCKING;
}
children = void 0;
if (!r12) {
current = intl.string(t["3qvtks"]);
children = current;
}
}
}
useEffect(() => {
ref.current = current;
}, [children]);
const y = function y() {
const opacity = Math.min(initialAnimation2.get(), recordingAnimation.get());
return {
opacity,
marginBottom: -8 * (1 - opacity)
};
};
y.__closure = {
initialAnimation: initialAnimation2,
recordingAnimation,
INITIAL_SHIFT: 8
};
y.__workletHash = 60645179998;
y.__initData = c8039_32;
const animatedStyle = useAnimatedStyle(y);
return children != null ? <Component2 style={animatedStyle} variant="text-sm/medium" color="text-overlay-light" {...enabled ? {
maxFontSizeMultiplier: 2
} : {}}>{children}</Component2> : null;
});
c8039_34 = {
code: "function VoiceMessageOverlayTsx7(){const{voiceMessageAnimationState,withTiming,Easing}=this.__closure;const currValue=voiceMessageAnimationState.get()[1];return withTiming(currValue,{easing:Easing.linear,duration:150});}"
};
c8039_35 = {
code: "function VoiceMessageOverlayTsx8(){const{voiceMessageAnimationState,sendingColor,lockingColor,lockedColor,cancelingColor,interpolateColor,timing,VOICE_MESSAGE_ANIMATION_STATES}=this.__closure;const[prevValue,currValue]=voiceMessageAnimationState.get();const distance=prevValue+currValue;const colors=distance===2?[sendingColor,sendingColor,lockingColor,lockedColor]:[sendingColor,cancelingColor,lockingColor,lockedColor];return interpolateColor(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,colors);}"
};
c8039_36 = {
code: "function VoiceMessageOverlayTsx9(){const{voiceMessageAnimationState,withTiming,Easing}=this.__closure;const currValue=voiceMessageAnimationState.get()[1];return withTiming(currValue,{easing:Easing.linear,duration:150});}"
};
c8039_37 = {
code: "function VoiceMessageOverlayTsx10(){const{voiceMessageAnimationState,interpolate,timing,VOICE_MESSAGE_ANIMATION_STATES}=this.__closure;const[prevValue,currValue]=voiceMessageAnimationState.get();const distance=prevValue+currValue;const opacity=distance===2?[1,1,1,0]:[1,0,1,0];return interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,opacity);}"
};
c8039_38 = {
code: "function VoiceMessageOverlayTsx11(){const{interpolate,timing,VOICE_MESSAGE_ANIMATION_STATES}=this.__closure;return{height:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[68,68,104,104])};}"
};
c8039_39 = {
code: "function VoiceMessageOverlayTsx12(){const{interpolate,timing,VOICE_MESSAGE_ANIMATION_STATES,lockContainerOpacity,lockedBackgroundColor}=this.__closure;return{width:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[40,40,56,56]),height:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[68,68,56,56]),opacity:lockContainerOpacity.get(),backgroundColor:lockedBackgroundColor.get(),marginHorizontal:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[0,0,-8,-8]),marginBottom:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[0,0,36,36])};}"
};
c8039_40 = {
code: "function VoiceMessageOverlayTsx13(){const{interpolate,timing,VOICE_MESSAGE_ANIMATION_STATES,lockIconColor}=this.__closure;return{width:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[24,24,32,32]),height:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[24,24,32,32]),marginTop:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[12,12,10,10]),tintColor:lockIconColor.get()};}"
};
c8039_41 = {
code: "function VoiceMessageOverlayTsx14(){const{interpolate,timing,VOICE_MESSAGE_ANIMATION_STATES}=this.__closure;return{opacity:interpolate(timing.get(),VOICE_MESSAGE_ANIMATION_STATES,[1,1,0,0])};}"
};
c8039_42 = {
code: "function VoiceMessageOverlayTsx15(){const{voiceMessageAnimationState,VoiceMessageAnimationState}=this.__closure;return voiceMessageAnimationState.get()[1]===VoiceMessageAnimationState.LOCKED||voiceMessageAnimationState.get()[1]===VoiceMessageAnimationState.LOCKING;}"
};
c8039_43 = {
code: "function VoiceMessageOverlayTsx16(result,previous){const{runOnJS,setLocked}=this.__closure;if(result!==previous){runOnJS(setLocked)(result);}}"
};
c8039_44 = {
code: "function VoiceMessageOverlayTsx17(){const{initialAnimation,safeAreaBottom,CHAT_INPUT_HEIGHT,LOCK_PILL_BOTTOM_OFFSET,INITIAL_SHIFT}=this.__closure;return{opacity:initialAnimation.get(),bottom:safeAreaBottom+CHAT_INPUT_HEIGHT+(LOCK_PILL_BOTTOM_OFFSET-INITIAL_SHIFT)+INITIAL_SHIFT*initialAnimation.get()};}"
};
c8039_46 = {
code: "function VoiceMessageOverlayTsx18(){const{INITIAL_SHIFT,initialAnimation,trashContainerBgColor}=this.__closure;return{marginLeft:INITIAL_SHIFT*2*(1-initialAnimation.get()),marginRight:8-INITIAL_SHIFT*2*(1-initialAnimation.get()),backgroundColor:trashContainerBgColor.get()};}"
};
c8039_47 = {
code: "function VoiceMessageOverlayTsx19(){const{trashIconColor}=this.__closure;return{tintColor:trashIconColor.get()};}"
};
c8039_48 = {
code: "function VoiceMessageOverlayTsx20(){const{recordingAnimation,sendContainerBgColor}=this.__closure;return{opacity:0.5+0.5*recordingAnimation.get(),backgroundColor:sendContainerBgColor.get()};}"
};
c8039_49 = {
code: "function VoiceMessageOverlayTsx21(){const{sendIconColor}=this.__closure;return{tintColor:sendIconColor.get()};}"
};
c8039_50 = {
code: "function VoiceMessageOverlayTsx22(){const{initialAnimation}=this.__closure;return{opacity:initialAnimation.get()};}"
};
c8039_51 = {
code: "function VoiceMessageOverlayTsx23(){const{exiting,INITIAL_SHIFT,initialAnimation,keyboardHeight}=this.__closure;const shift=exiting?INITIAL_SHIFT*3:INITIAL_SHIFT*1.5;return{opacity:initialAnimation.get(),bottom:keyboardHeight-shift*(1-initialAnimation.get())};}"
};
c8039_52 = {
code: "function VoiceMessageOverlayTsx24(){const{insetsNoKeyboard,CHAT_INPUT_HEIGHT,recordingAnimation}=this.__closure;return insetsNoKeyboard.bottom+CHAT_INPUT_HEIGHT*(1.6+0.3*recordingAnimation.get());}"
};
c8039_53 = {
code: "function VoiceMessageOverlayTsx25(){const{insetsNoKeyboard,CHAT_INPUT_HEIGHT}=this.__closure;return insetsNoKeyboard.bottom+CHAT_INPUT_HEIGHT*1.6;}"
};
c8039_54 = memo(function({ channelId, voiceMessageAnimationState: voiceMessageAnimationState3, exiting }) {
let r491;
let sharedValue, sharedValue2, ref2, derivedValue8, derivedValue9, derivedValue10, derivedValue11;
let c19113_0, exiting2, sharedValue3, ref3, sharedValue4;
let env19114;
let env19115;
let env19116;
let env19117;
let env19118;
sharedValue = void 0;
sharedValue2 = void 0;
ref2 = void 0;
derivedValue8 = void 0;
derivedValue9 = void 0;
derivedValue10 = void 0;
derivedValue11 = void 0;
const token6 = useToken(Module712.modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE);
const styles = useStyles(token6);
const insets = useSafeAreaInsetsKeyboardAware_native({
includeCustomKeyboardHeight: true,
includeKeyboardHeight: true
}).insets;
const safeAreaInsets_native = useSafeAreaInsets_native();
let c19112_2 = safeAreaInsets_native;
const keyboardHeight = insets.bottom - safeAreaInsets_native.bottom;
let c19112_3 = keyboardHeight;
const bottom = insets.bottom;
const isRecording = (0, useVoiceMessagesUIStore)((a0) => a0.startTimeMillis != null);
c19113_0 = isRecording;
exiting2 = exiting;
sharedValue3 = void 0;
ref3 = void 0;
sharedValue4 = void 0;
sharedValue3 = useSharedValue(0);
ref3 = useRef(performance.now());
useEffect(() => {
sharedValue3.set(withDelay(500, _timing.withTiming(1, {
easing: _ReanimatedRexport.Easing.quad,
duration: 250
})));
}, [sharedValue3]);
useEffect(() => {
if (exiting2) {
sharedValue3.set(_timing.withTiming(0, {
easing: _ReanimatedRexport.Easing.quad,
duration: 100
}));
}
}, [sharedValue3, exiting]);
sharedValue4 = useSharedValue(0);
useEffect(() => {
if (c19113_0) {
sharedValue4.set(_timing.withTiming(1, {
easing: _ReanimatedRexport.Easing.quad,
duration: 200
}));
if (!(performance.now() - ref3.current >= 500)) {
sharedValue3.set(_timing.withTiming(1, {
easing: _ReanimatedRexport.Easing.quad,
duration: 250
}));
}
}
}, [sharedValue3, sharedValue4, isRecording]);
sharedValue = sharedValue3;
sharedValue2 = sharedValue4;
ref2 = useRef(null);
useEffect(() => {
if (getIsScreenReaderEnabled()) {
setAccessibilityFocus({
ref: ref2
});
}
}, []);
useEffect(() => {
let c27138_0 = AppState.addEventListener("change", function(a0) {
if (!(a0 !== "inactive" && a0 !== "background")) {
ComponentDispatch.dispatchKeyed(ComponentActionsKeyed.VOICE_MESSAGE_SEND, channelId, {
isCancelling: true,
cancelReason: VoiceMessageRecordingResult.CANCELLED_ON_BACKGROUND
});
}
});
return () => {
c27138_0.remove();
};
}, [channelId]);
const chatInputFloating = useMobileVisualRefreshConfig({
location: "VoiceMessageOverlay"
}).chatInputFloating;
const radius2 = 5 * useWindowDimensions_native().width / 2;
const token7 = useToken(Module712.colors.ICON_DEFAULT);
const token2 = useToken(Module712.modules.mobile.CHAT_INPUT_SEND_BUTTON_HEIGHT);
const token = useToken(Module712.modules.mobile.CHAT_INPUT_ACTION_ICON_PIXEL_SIZE);
const token4 = useToken(Module712.colors.CHAT_INPUT_SEND_BUTTON_ACTIVE_BACKGROUND);
const token3 = useToken(Module712.colors.CONTROL_PRIMARY_BORDER_DEFAULT);
const token5 = useToken(Module712.colors.CHAT_INPUT_SEND_BUTTON_ICON_ACTIVE_TINT);
const BRAND_6003 = Module712.unsafe_rawColors.BRAND_600;
const RED_500 = Module712.unsafe_rawColors.RED_500;
const BRAND_6002 = Module712.unsafe_rawColors.BRAND_600;
const BRAND_600 = Module712.unsafe_rawColors.BRAND_600;
const r165 = env19114 = {
$parent: env8039
};
env19114[0] = voiceMessageAnimationState3;
env19114[1] = BRAND_6003;
env19114[2] = RED_500;
env19114[3] = BRAND_6002;
env19114[4] = BRAND_600;
env19114[5] = void 0;
const r169 = $mk87907(r165);
r169.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r169.__workletHash = 7432526131204;
const __initData = c8039_34;
r169.__initData = __initData;
const derivedValue13 = useDerivedValue(r169);
env19114[5] = derivedValue13;
const r181 = $mk87908(r165);
r181.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: BRAND_6003,
lockingColor: BRAND_6002,
lockedColor: BRAND_600,
cancelingColor: RED_500,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue13,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r181.__workletHash = 8474040050475;
const __initData2 = c8039_35;
r181.__initData = __initData2;
const derivedValue12 = useDerivedValue(r181);
const BRAND_6005 = Module712.unsafe_rawColors.BRAND_600;
const WHITE = Module712.unsafe_rawColors.WHITE;
const BRAND_6004 = Module712.unsafe_rawColors.BRAND_600;
const BRAND_6006 = Module712.unsafe_rawColors.BRAND_600;
const r203 = env19115 = {
$parent: env8039
};
env19115[0] = voiceMessageAnimationState3;
env19115[1] = BRAND_6005;
env19115[2] = WHITE;
env19115[3] = BRAND_6004;
env19115[4] = BRAND_6006;
env19115[5] = void 0;
const r207 = $mk87907(r203);
r207.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r207.__workletHash = 7432526131204;
r207.__initData = __initData;
const derivedValue14 = useDerivedValue(r207);
env19115[5] = derivedValue14;
const r218 = $mk87908(r203);
r218.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: BRAND_6005,
lockingColor: BRAND_6004,
lockedColor: BRAND_6006,
cancelingColor: WHITE,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue14,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r218.__workletHash = 8474040050475;
r218.__initData = __initData2;
derivedValue8 = useDerivedValue(r218);
const R = function R() {
return {
marginLeft: 16 * (1 - sharedValue.get()),
marginRight: 8 - 16 * (1 - sharedValue.get()),
backgroundColor: derivedValue8.get()
};
};
R.__closure = {
INITIAL_SHIFT: 8,
initialAnimation: sharedValue3,
trashContainerBgColor: derivedValue8
};
R.__workletHash = 16442762939311;
R.__initData = c8039_46;
const animatedStyle = useAnimatedStyle(R);
const WHITE2 = Module712.unsafe_rawColors.WHITE;
const RED_5002 = Module712.unsafe_rawColors.RED_500;
const WHITE3 = Module712.unsafe_rawColors.WHITE;
const WHITE4 = Module712.unsafe_rawColors.WHITE;
const r247 = env19116 = {
$parent: env8039
};
env19116[0] = voiceMessageAnimationState3;
env19116[1] = WHITE2;
env19116[2] = RED_5002;
env19116[3] = WHITE3;
env19116[4] = WHITE4;
env19116[5] = void 0;
const r251 = $mk87907(r247);
r251.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r251.__workletHash = 7432526131204;
r251.__initData = __initData;
const derivedValue15 = useDerivedValue(r251);
env19116[5] = derivedValue15;
const r262 = $mk87908(r247);
r262.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: WHITE2,
lockingColor: WHITE3,
lockedColor: WHITE4,
cancelingColor: RED_5002,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue15,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r262.__workletHash = 8474040050475;
r262.__initData = __initData2;
derivedValue9 = useDerivedValue(r262);
const G = function G() {
return {
tintColor: derivedValue9.get()
};
};
G.__closure = {
trashIconColor: derivedValue9
};
G.__workletHash = 4758994609248;
G.__initData = c8039_47;
const animatedStyle2 = useAnimatedStyle(G);
const WHITE5 = Module712.unsafe_rawColors.WHITE;
const RED_5003 = Module712.unsafe_rawColors.RED_500;
const BRAND_6007 = Module712.unsafe_rawColors.BRAND_600;
const WHITE6 = Module712.unsafe_rawColors.WHITE;
const r292 = env19117 = {
$parent: env8039
};
env19117[0] = voiceMessageAnimationState3;
env19117[1] = WHITE5;
env19117[2] = RED_5003;
env19117[3] = BRAND_6007;
env19117[4] = WHITE6;
env19117[5] = void 0;
const r296 = $mk87907(r292);
r296.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r296.__workletHash = 7432526131204;
r296.__initData = __initData;
const derivedValue16 = useDerivedValue(r296);
env19117[5] = derivedValue16;
const r307 = $mk87908(r292);
r307.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: WHITE5,
lockingColor: BRAND_6007,
lockedColor: WHITE6,
cancelingColor: RED_5003,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue16,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r307.__workletHash = 8474040050475;
r307.__initData = __initData2;
derivedValue10 = useDerivedValue(r307);
const x = function x() {
return {
opacity: 0.5 + 0.5 * sharedValue2.get(),
backgroundColor: derivedValue10.get()
};
};
x.__closure = {
recordingAnimation: sharedValue4,
sendContainerBgColor: derivedValue10
};
x.__workletHash = 2463646995928;
x.__initData = c8039_48;
const animatedStyle3 = useAnimatedStyle(x);
const WHITE7 = Module712.unsafe_rawColors.WHITE;
const WHITE8 = Module712.unsafe_rawColors.WHITE;
const r330 = env19118 = {
$parent: env8039
};
env19118[0] = voiceMessageAnimationState3;
env19118[1] = PLUM_13;
env19118[2] = WHITE7;
env19118[3] = WHITE8;
env19118[4] = PLUM_13;
env19118[5] = void 0;
const r334 = $mk87907(r330);
r334.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
withTiming: _timing.withTiming,
Easing: _ReanimatedRexport.Easing
};
r334.__workletHash = 7432526131204;
r334.__initData = __initData;
const derivedValue17 = useDerivedValue(r334);
env19118[5] = derivedValue17;
const r346 = $mk87908(r330);
r346.__closure = {
voiceMessageAnimationState: voiceMessageAnimationState3,
sendingColor: PLUM_13,
lockingColor: WHITE8,
lockedColor: PLUM_13,
cancelingColor: WHITE7,
interpolateColor: _ReanimatedRexport.interpolateColor,
timing: derivedValue17,
VOICE_MESSAGE_ANIMATION_STATES: c8039_25
};
r346.__workletHash = 8474040050475;
r346.__initData = __initData2;
derivedValue11 = useDerivedValue(r346);
const B = function B() {
return {
tintColor: derivedValue11.get()
};
};
B.__closure = {
sendIconColor: derivedValue11
};
B.__workletHash = 13732877930795;
B.__initData = c8039_49;
const animatedStyle4 = useAnimatedStyle(B);
const U = function U() {
return {
opacity: sharedValue.get()
};
};
U.__closure = {
initialAnimation: sharedValue3
};
U.__workletHash = 11009128299499;
U.__initData = c8039_50;
const animatedStyle5 = useAnimatedStyle(U);
const F = function F() {
const r0 = exiting ? 24 : 12;
return {
opacity: sharedValue.get(),
bottom: c19112_3 - r0 * (1 - sharedValue.get())
};
};
F.__closure = {
exiting,
INITIAL_SHIFT: 8,
initialAnimation: sharedValue3,
keyboardHeight
};
F.__workletHash = 4588671012938;
F.__initData = c8039_51;
const animatedStyle6 = useAnimatedStyle(F);
useWakeLock("VoiceMessageOverlay");
const Ie = () => c19112_2.bottom + _ChatInputConstants.CHAT_INPUT_HEIGHT * (1.6 + 0.3 * sharedValue2.get());
Ie.__closure = {
insetsNoKeyboard: safeAreaInsets_native,
CHAT_INPUT_HEIGHT: _ChatInputConstants.CHAT_INPUT_HEIGHT,
recordingAnimation: sharedValue4
};
Ie.__workletHash = 14315468936108;
Ie.__initData = c8039_52;
const derivedValue18 = useDerivedValue(Ie);
const me = () => c19112_2.bottom + 1.6 * _ChatInputConstants.CHAT_INPUT_HEIGHT;
me.__closure = {
insetsNoKeyboard: safeAreaInsets_native,
CHAT_INPUT_HEIGHT: _ChatInputConstants.CHAT_INPUT_HEIGHT
};
me.__workletHash = 5416150236821;
me.__initData = c8039_53;
const derivedValue19 = useDerivedValue(me);
const r414 = [<ReanimatedRexport.View style={[styles.container, animatedStyle6]} pointerEvents="none">
<Component3 height={derivedValue18} offsetThreshold={60} opacity={0.24} radius={radius2} voiceMessageAnimationState={voiceMessageAnimationState3} />
<Component3 height={derivedValue19} offsetThreshold={30} radius={radius2} voiceMessageAnimationState={voiceMessageAnimationState3} />
</ReanimatedRexport.View>, , ,];
const r425 = [<Component4 initialAnimation={sharedValue3} recordingAnimation={sharedValue4} exiting={exiting} />, ,];
if (chatInputFloating) {
r491 = <ReanimatedRexport.View style={styles.voiceChatContainer}>
<VoiceMessageChat isRecording={isRecording} initialAnimation={sharedValue3} leftAccessory={<VoiceMessagePillButton icon={Module4149} tintColor={token7} boxSize={token6} iconSize={token} accessibilityLabel={intl.string(t.RdK9sV)} onPressIn={() => triggerHaptic()} onPress={() => {
ComponentDispatch.dispatchKeyed(ComponentActionsKeyed.VOICE_MESSAGE_SEND, channelId, {
isCancelling: true
});
}} />} rightAccessory={<VoiceMessagePillButton ref={ref2} icon={isRecording ? Module4136 : Module10800} tintColor={token5} backgroundColor={token4} borderColor={token3} boxSize={token2} iconSize={token} accessibilityLabel={intl.string(t["+8GStU"])} onPress={() => {
ComponentDispatch.dispatchKeyed(ComponentActionsKeyed.VOICE_MESSAGE_SEND, channelId, {
isCancelling: false
});
}} />} />
</ReanimatedRexport.View>;
} else {
const style = [styles.trashContainer, animatedStyle];
r491 = <>
{[<Component5 style={style} androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} accessibilityRole="button" accessibilityLabel={intl.string(t.RdK9sV)} onPressIn={() => triggerHaptic()} onPress={() => {
ComponentDispatch.dispatchKeyed(ComponentActionsKeyed.VOICE_MESSAGE_SEND, channelId, {
isCancelling: true
});
}}>
<Component style={animatedStyle2} source={Module4149} size={Icon.Sizes.MEDIUM} />
</Component5>, <ReanimatedRexport.View style={styles.voiceChatContainer}>
<VoiceMessageChat isRecording={isRecording} initialAnimation={sharedValue3} backgroundColor={derivedValue12} />
</ReanimatedRexport.View>, <Component5 ref={ref2} style={[styles.sendContainer, animatedStyle3]} androidRippleConfig={ANDROID_FOREGROUND_RIPPLE} accessibilityRole="button" accessibilityLabel={intl.string(t["+8GStU"])} onPress={() => {
ComponentDispatch.dispatchKeyed(ComponentActionsKeyed.VOICE_MESSAGE_SEND, channelId, {
isCancelling: false
});
}}>
<Component style={animatedStyle4} source={isRecording ? Module4136 : Module10800} size={Icon.Sizes.MEDIUM} />
</Component5>]}
</>;
}
r425[1] = <View style={styles.innerContainer}>{r491}</View>;
r414[1] = <ReanimatedRexport.View style={[styles.contentContainer, {
bottom
}, animatedStyle5]}>{r425}</ReanimatedRexport.View>;
r414[2] = <LockPill safeAreaBottom={bottom} initialAnimation={sharedValue3} voiceMessageAnimationState={voiceMessageAnimationState3} />;
return <>{r414}</>;
});
const r124 = memo(function({ channelId: channelId2 }) {
let c19119_1, setState3;
c19119_1 = void 0;
setState3 = void 0;
const voiceMessagesUIStore = useVoiceMessagesUIStore((a0) => a0.showRecordingOverlay);
c19119_1 = voiceMessagesUIStore;
const stateFromStores2 = useStateFromStores([ChannelStore], () => ChannelStore.getChannel(channelId2));
const voiceMessagesUIStore2 = useVoiceMessagesUIStore((a0) => a0.voiceMessageAnimationState);
let state;
[state, setState3] = useState(voiceMessagesUIStore);
useEffect(() => {
if (c19119_1) {
setState3(true);
return void 0;
}
let c27139_0 = setTimeout(() => setState3(false), 100);
return () => {
clearTimeout(c27139_0);
};
}, [voiceMessagesUIStore]);
return (stateFromStores2 == null ? void 0 : stateFromStores2.isForumLikeChannel()) ? null : voiceMessagesUIStore2 != null ? state ? (0, jsx)(c8039_54, {
channelId: channelId2,
voiceMessageAnimationState: voiceMessagesUIStore2,
exiting: !voiceMessagesUIStore
}) : null : null;
});
export default r124;
export { Component3 as VoiceMessageEllipse };