import React, { Component } from 'react' const inherits = require('util').inherits const PropTypes = require('prop-types') import Select from 'react-select' // Subviews const JsonImportView = require('./json.js') const PrivateKeyImportView = require('./private-key.js') AccountImportSubview.contextTypes = { t: PropTypes.func, } module.exports = AccountImportSubview inherits(AccountImportSubview, Component) function AccountImportSubview () { Component.call(this) } AccountImportSubview.prototype.getMenuItemTexts = function () { return [ this.context.t('privateKey'), this.context.t('jsonFile'), ] } AccountImportSubview.prototype.render = function () { const state = this.state || {} const menuItems = this.getMenuItemTexts() const { type } = state return (