36 lines
1.5 KiB
TypeScript
36 lines
1.5 KiB
TypeScript
// Metro module 6137 (f6138).
|
|
import AccessibilityStore from "../../../a11y/AccessibilityStore";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import { useBurstReactionAnimationSource } from "./BurstReactionEffectUtils";
|
|
import { useStateFromStores } from "../../../../_bundle/Module589";
|
|
import FadeOutLottieAnimation from "./FadeOutLottieAnimation";
|
|
import LottieAnimationView from "../../../../components_native/common/LottieAnimationView";
|
|
const useStyles = createStyles({
|
|
content: {
|
|
width: "100%"
|
|
}
|
|
});
|
|
export default function BurstReactionAnimation(props) {
|
|
const { channelId, messageId, emoji, isFullscreen, onComplete, withFadeOut = true, ...props2 } = props;
|
|
const styles = useStyles();
|
|
const burstReactionAnimationSource = useBurstReactionAnimationSource({
|
|
emoji,
|
|
messageId,
|
|
channelId,
|
|
isFullscreen
|
|
});
|
|
const stateFromStores = useStateFromStores([AccessibilityStore], () => AccessibilityStore.useReducedMotion);
|
|
if (burstReactionAnimationSource == null) {
|
|
return null;
|
|
}
|
|
return withFadeOut ? <FadeOutLottieAnimation style={styles.content} loop={false} speed={stateFromStores ? 0.5 : 1.2} {...props2} {...withFadeOut ? {
|
|
onComplete
|
|
} : {
|
|
onAnimationFinish: onComplete
|
|
}} source={burstReactionAnimationSource} /> : <LottieAnimationView style={styles.content} loop={false} speed={stateFromStores ? 0.5 : 1.2} {...props2} {...withFadeOut ? {
|
|
onComplete
|
|
} : {
|
|
onAnimationFinish: onComplete
|
|
}} source={burstReactionAnimationSource} />;
|
|
};
|