import { Box, Checkbox, Typography } from '@mui/material'; import { formatSize } from '@/utils/storageCleaner'; import { storageCleanerPageStyles } from '@/config/pageTheme'; import { useTranslation } from 'react-i18next'; interface OptionItemProps { labelKey: string; checked: boolean; size?: number; isCount?: boolean; onChange: () => void; } export default function OptionItem({ labelKey, checked, size, isCount = false, onChange, }: OptionItemProps) { const { t } = useTranslation(['storageCleaner']); return ( {t(labelKey)} {size !== undefined && size > 0 ? ( {isCount ? `${size} ${t('storageCleaner:countUnit')}` : formatSize(size)} ) : ( {t('storageCleaner:noData')} )} ); }