import React from 'react'; import { Blend, Moon, Pause, Play, Repeat, Repeat1, SkipBack, SkipForward, Square, Sunrise } from 'lucide-react'; import { invoke } from '@tauri-apps/api/core'; import type { TFunction } from 'i18next'; import type { PlayerState } from '@/features/playback/store/playerStoreTypes'; import { useAutodjTransitionUi } from '@/features/playback/store/autodjTransitionUi'; import { usePreviewStore } from '@/features/playback/store/previewStore'; import PlaybackScheduleBadge from '@/components/PlaybackScheduleBadge'; import { usePlaybackDelayPress } from '@/hooks/usePlaybackDelayPress'; import { usePlaybackScheduleRemaining } from '@/utils/format/playbackScheduleFormat'; type RepeatMode = PlayerState['repeatMode']; type PlayPauseBind = ReturnType['playPauseBind']; type ScheduleRemaining = ReturnType; interface Props { isPlaying: boolean; isRadio: boolean; isPreviewing: boolean; stop: () => void; previous: () => void; next: () => void; toggleRepeat: () => void; repeatMode: RepeatMode; playPauseBind: PlayPauseBind; scheduleRemaining: ScheduleRemaining; transportAnchorRef: React.RefObject; playSlotRef: React.RefObject; t: TFunction; } export function PlayerTransportControls({ isPlaying, isRadio, isPreviewing, stop, previous, next, toggleRepeat, repeatMode, playPauseBind, scheduleRemaining, transportAnchorRef, playSlotRef, t, }: Props) { const autodjPhase = useAutodjTransitionUi(s => s.phase); const showAutodjTransition = isPlaying && !isPreviewing && scheduleRemaining == null && autodjPhase === 'mixing'; return (
{isPreviewing && ( )}
); }