import React, {FC, memo} from 'react'; import {Text, TouchableOpacity, View} from 'react-native'; import styles from '../styles.tsx'; import {srcList} from '../constants'; import {AdditionalSourceInfo} from '../types'; type Props = { srcListId: number; showRNVControls: boolean; toggleControls: () => void; }; const _TopControl: FC = ({ toggleControls, showRNVControls, srcListId, }) => { return ( {(srcList[srcListId] as AdditionalSourceInfo)?.description || 'local file'} { toggleControls(); }}> {showRNVControls ? 'Hide controls' : 'Show controls'} ); }; export const TopControl = memo(_TopControl);