import { MWMediaMeta } from "@/backend/metadata/types"; import { useCallback, useRef, useState } from "react"; import { CSSTransition } from "react-transition-group"; import { BackdropControl } from "./controls/BackdropControl"; import { FullscreenControl } from "./controls/FullscreenControl"; import { LoadingControl } from "./controls/LoadingControl"; import { MiddlePauseControl } from "./controls/MiddlePauseControl"; import { PauseControl } from "./controls/PauseControl"; import { ProgressControl } from "./controls/ProgressControl"; import { TimeControl } from "./controls/TimeControl"; import { VolumeControl } from "./controls/VolumeControl"; import { VideoPlayerError } from "./parts/VideoPlayerError"; import { VideoPlayerHeader } from "./parts/VideoPlayerHeader"; import { useVideoPlayerState } from "./VideoContext"; import { VideoPlayer, VideoPlayerProps } from "./VideoPlayer"; interface DecoratedVideoPlayerProps { media?: MWMediaMeta; onGoBack?: () => void; } function LeftSideControls() { const { videoState } = useVideoPlayerState(); const handleMouseEnter = useCallback(() => { videoState.setLeftControlsHover(true); }, [videoState]); const handleMouseLeave = useCallback(() => { videoState.setLeftControlsHover(false); }, [videoState]); return (