import { Box, Grid } from '@material-ui/core' import { ReactElement } from 'react' import Check from 'remixicon-react/CheckLineIcon' import X from 'remixicon-react/CloseLineIcon' import ArrowLeft from 'remixicon-react/ArrowLeftLineIcon' import PlusSquare from 'remixicon-react/AddBoxLineIcon' import Layers from 'remixicon-react/StackLineIcon' import { DocumentationText } from '../../components/DocumentationText' import ExpandableListItemActions from '../../components/ExpandableListItemActions' import { SwarmButton } from '../../components/SwarmButton' interface Props { step: number onUpload: () => void onCancel: () => void onGoBack: () => void onProceed: () => void isUploading: boolean hasStamp: boolean hasAnyStamps: boolean uploadLabel: string stampMode: 'BUY' | 'SELECT' setStampMode: (mode: 'BUY' | 'SELECT') => void } export function UploadActionBar({ step, onUpload, onCancel, onGoBack, onProceed, isUploading, hasStamp, hasAnyStamps, uploadLabel, stampMode, setStampMode, }: Props): ReactElement { if (step === 0) { return ( <> Add Postage Stamp Cancel You need a postage stamp to upload. Find out more in{' '} this guide . ) } if (step === 1) { return ( {stampMode === 'SELECT' && ( Proceed With Selected Stamp )} Back To Preview {hasAnyStamps && ( setStampMode(stampMode === 'BUY' ? 'SELECT' : 'BUY')} iconType={stampMode === 'BUY' ? Layers : PlusSquare} > {stampMode === 'BUY' ? 'Use Existing Stamp' : 'Buy New Stamp'} )} ) } if (step === 2) { return ( {uploadLabel} Change Postage Stamp ) } return <> }