// Metro module 15293 (f15294). import { useCallback } from "react"; import { View } from "react-native"; import ChannelStore from "../../../stores/ChannelStore"; import UserStore from "../../../stores/UserStore"; import { EMPTY_STRING_SNOWFLAKE_ID, MessageTypes, AnalyticEvents } from "../../../Constants"; import { jsx } from "react/jsx-runtime"; import { createStyles } from "../../../design/components/Styles/native/createStyles"; import * as _ReanimatedRexport from "../../reanimated/ReanimatedRexport"; import ReanimatedRexport, { useSharedValue, useAnimatedStyle, useAnimatedProps } from "../../reanimated/ReanimatedRexport"; import * as _timing from "../../../design/animation/reanimated/timing/timing"; import { Stack } from "../../../design/components/Stack/native/Stack.native"; import { Button } from "../../../design/components/Button/native/Button.native"; import { intl, t } from "../../../intl/index.native"; import { Text } from "../../../design/components/Text/native/Text"; import { useStateFromStores } from "../../../_bundle/defaultAreStatesEqual"; import { useCanReplyToMessage } from "../../replies/canReplyToMessage"; import { sendWave } from "../../main_tabs_v2/native/friends/components/AddFriendsScreenUtils"; import parseURL from "../../../utils/native/parseURL"; import handleSupportedURL from "../../links/native/handleSupportedURL"; import PeopleUtils from "../../people/PeopleUtils"; import { NotificationCenterLocalItems, NotificationCenterItems, ItemEnum, NotificationCenterActionTypes } from "../NotificationCenterItemsTypes"; import ChannelActionCreators from "../../../actions/ChannelActionCreators"; import RelationshipActionCreators from "../../../actions/RelationshipActionCreators"; import ToastActionCreators from "../../toast/native/ToastActionCreators"; import { createShallowPendingReply } from "../../replies/PendingReplyActionCreators"; import AnalyticsUtils from "../../../utils/AnalyticsUtils"; function $mk96007($env) { return () => { const r1 = $env.$parent; return (0, r1[0])(r1[2][8]).ComponentDispatch.dispatch(r1[9].TEXTAREA_FOCUS, $env[0]); }; } let IncomingFriendRequestActions, useStyles, c10868_15, c10868_17, c10868_18, c10868_19, c10868_20, c10868_21; let env10868 = {}; const focusChatInput = function focusChatInput(a0) { const r4 = a0 != null ? { channelId: a0 } : void 0; let env21852; const r7 = env21852 = { $parent: env10868 }; env21852[0] = r4; setTimeout($mk96007(r7), 0); }; IncomingFriendRequestActions = function IncomingFriendRequestActions(props) { const { onAccept, onIgnore, onWavePress, pressed, compactMode } = props; const styles = useStyles(); const sharedValue = useSharedValue(0); const sharedValue2 = useSharedValue(-1); const sharedValue3 = useSharedValue(-1); const sharedValue4 = useSharedValue(-1); const u = function u() { return { opacity: _timing.withTiming(pressed.get() ? 0 : 1, { duration: 150 }), pointerEvents: pressed.get() ? "none" : "auto" }; }; u.__closure = { withTiming: _timing.withTiming, pressed }; u.__workletHash = 100815030677; u.__initData = c10868_17; const animatedStyle = useAnimatedStyle(u); const _ = function _() { const r12 = pressed.get() ? 1 : sharedValue.get() / sharedValue2.get(); const r24 = sharedValue2.get() - sharedValue2.get() * r12; const r1 = pressed.get() ? 0 : -r24 / 2; return { transform: [{ scaleX: _timing.withTiming(r12) }, { translateX: _timing.withTiming(r1) }], opacity: _timing.withTiming(pressed.get() ? 1 : 0), pointerEvents: pressed.get() ? "auto" : "none" }; }; _.__closure = { pressed, acceptButtonWidth: sharedValue, buttonWidth: sharedValue2, withTiming: _timing.withTiming }; _.__workletHash = 12358515723480; _.__initData = c10868_18; const animatedStyle2 = useAnimatedStyle(_); const E = () => ({ transform: [{ translateX: sharedValue3.get() / 2 }, { translateY: sharedValue4.get() / 2 }] }); E.__closure = { waveWidth: sharedValue3, waveHeight: sharedValue4 }; E.__workletHash = 667441788226; E.__initData = c10868_19; const animatedStyle3 = useAnimatedStyle(E); const I = function I() { return { transform: [{ rotateZ: _ReanimatedRexport.withDelay(450, _ReanimatedRexport.withRepeat(_timing.withTiming(pressed.get() ? "8deg" : "-2deg", { duration: 150, easing: _ReanimatedRexport.Easing.inOut(_ReanimatedRexport.Easing.quad) }), 4, true)) }, { translateX: -sharedValue3.get() / 2 }, { translateY: -sharedValue4.get() / 2 }] }; }; I.__closure = { withDelay: _ReanimatedRexport.withDelay, withRepeat: _ReanimatedRexport.withRepeat, withTiming: _timing.withTiming, pressed, Easing: _ReanimatedRexport.Easing, waveWidth: sharedValue3, waveHeight: sharedValue4 }; I.__workletHash = 498167545082; I.__initData = c10868_20; const animatedStyle4 = useAnimatedStyle(I); const r91 = function() { pressed.get(); return { pointerEvents: "none" }; }; r91.__closure = { pressed }; r91.__workletHash = 3473531476662; r91.__initData = c10868_21; const animatedProps = useAnimatedProps(r91); const props2 = { text: intl.string(t.zf5jU5), variant: "primary", size: null, onPress: null }; let size = "md"; props2.size = compactMode ? "sm" : "md"; props2.onPress = onAccept; const r145 = [