import classNames from 'classnames'; import React from 'react'; import formatBytes from 'Utilities/Number/formatBytes'; import translate from 'Utilities/String/translate'; import EnhancedSelectInputOption, { EnhancedSelectInputOptionProps, } from './EnhancedSelectInputOption'; import styles from './RootFolderSelectInputOption.css'; interface RootFolderSelectInputOptionProps extends EnhancedSelectInputOptionProps { id: string; value: string; freeSpace?: number; isMissing?: boolean; movieFolder?: string; isMobile: boolean; isWindows?: boolean; } function RootFolderSelectInputOption({ id, value, freeSpace, isMissing, movieFolder, isMobile, isWindows, ...otherProps }: RootFolderSelectInputOptionProps) { const slashCharacter = isWindows ? '\\' : '/'; return (
{value} {movieFolder && id !== 'addNew' ? (
{slashCharacter} {movieFolder}
) : null}
{freeSpace == null ? null : (
{translate('RootFolderSelectFreeSpace', { freeSpace: formatBytes(freeSpace), })}
)} {isMissing ? (
{translate('Missing')}
) : null}
); } export default RootFolderSelectInputOption;