import { View } from 'react-native'; import * as React from 'react'; import { Row, Image, Text, useBreakpointValue, IconButton } from 'native-base'; import { Ionicons } from '@expo/vector-icons'; import { MetronomeControls } from '../Metronome'; import StarProgress from '../StarProgress'; import Song from '../../models/Song'; import { useTheme } from 'native-base'; import { PlayTimestampShow } from './PlayTimestampShow'; type PlayViewControlBarProps = { playType: 'practice' | 'normal' | null; song: Song; time: React.MutableRefObject; paused: boolean; score: number; disabled: boolean; onResume: () => void; onPause: () => void; onEnd: () => void; }; const PlayViewControlBar = ({ playType, song, time, paused, score, disabled, onResume, onPause, onEnd, }: PlayViewControlBarProps) => { const screenSize = useBreakpointValue({ base: 'small', md: 'big' }); const isPhone = screenSize === 'small'; const bpm = React.useRef(60); const { colors } = useTheme(); const textColor = colors.text; return ( cover {song.name} {song.artist && ( {song.artist?.name} )} {playType != 'practice' && ( )} {playType != 'practice' && } ); }; PlayViewControlBar.defaultProps = { onResume: () => {}, onPause: () => {}, onEnd: () => {}, disabled: false, }; export default PlayViewControlBar;