import { IV3Wallet } from 'ethereumjs-wallet';
import React, { Component } from 'react';
import { generateKeystore } from 'libs/web-workers';
import { WalletType } from '../../GenerateWallet';
import Template from '../Template';
import DownloadWallet from './DownloadWallet';
import EnterPassword from './EnterPassword';
import PaperWallet from './PaperWallet';
import FinalSteps from '../FinalSteps';
export enum Steps {
Password = 'password',
Download = 'download',
Paper = 'paper',
Final = 'final'
}
interface State {
activeStep: Steps;
password: string;
keystore: IV3Wallet | null | undefined;
filename: string;
privateKey: string;
isGenerating: boolean;
}
export default class GenerateKeystore extends Component<{}, State> {
public state: State = {
activeStep: Steps.Password,
password: '',
keystore: null,
filename: '',
privateKey: '',
isGenerating: false
};
public render() {
const { activeStep, keystore, privateKey, filename, isGenerating } = this.state;
let content;
switch (activeStep) {
case Steps.Password:
content = (