// Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { CSSProperties, ForwardedRef } from 'react'; import React, { forwardRef, useEffect, useRef, useState } from 'react'; import { useReducedMotion } from '@react-spring/web'; import { SpinnerV2 } from '../SpinnerV2'; import { strictAssert } from '../../util/assert'; import type { Loadable } from '../../util/loadable'; import { LoadingState } from '../../util/loadable'; import { useIntent } from './base/FunImage'; import * as log from '../../logging/log'; import * as Errors from '../../types/errors'; import { isAbortError } from '../../util/isAbortError'; export type FunGifProps = Readonly<{ src: string; width: number; height: number; 'aria-label'?: string; 'aria-describedby': string; ignoreReducedMotion?: boolean; }>; export function FunGif(props: FunGifProps): JSX.Element { if (props.ignoreReducedMotion) { return ; } return ; } /** @internal */ const FunGifBase = forwardRef(function FunGifBase( props: FunGifProps & { autoPlay: boolean }, ref: ForwardedRef ) { return (