// @flow
import React, { Component, PropTypes } from 'react';
import { observer } from 'mobx-react';
import Dialog from 'react-toolbox/lib/dialog/Dialog';
import Input from 'react-toolbox/lib/input/Input';
import Dropdown from 'react-toolbox/lib/dropdown/Dropdown';
import MobxReactForm from 'mobx-react-form';
import { defineMessages, intlShape } from 'react-intl';
import styles from './WalletCreateForm.scss';

const messages = defineMessages({
  walletName: {
    id: 'wallet.create.form.name.label',
    defaultMessage: '!!!Wallet Name',
    description: 'Label for the "Wallet Name" text input in the wallet create form.'
  },
  currency: {
    id: 'wallet.create.form.currency.label',
    defaultMessage: '!!!Currency',
    description: 'Label for the "Currency" dropdown in the wallet create form.'
  },
});

const currencies = [
  { value: 'ada', label: 'ADA' },
];

@observer
export default class WalletCreateForm extends Component {

  static propTypes = {
    validator: PropTypes.instanceOf(MobxReactForm),
  };

  static contextTypes = {
    intl: intlShape.isRequired,
  };

  actions = [
    { label: 'Create personal wallet', onClick: this.props.validator.onSubmit }
  ]

  render() {
    const { intl } = this.context;
    const { validator } = this.props;
    const walletName = validator.$('walletName');
    const currency = validator.$('currency');
    return (
      <div className={styles.component}>

        <Dialog
          title="Create Wallet"
          actions={this.actions}
          active
        >

          <Input
            type="text"
            label={intl.formatMessage(messages.walletName)}
            hint="e.g: Shopping Wallet"
            value={walletName.value}
            error={walletName.error ? intl.formatMessage(walletName.error) : null}
            onChange={walletName.onChange}
            onFocus={walletName.onFocus}
            onBlur={walletName.onBlur}
          />

          <Dropdown
            label={intl.formatMessage(messages.currency)}
            value={currency.value}
            onChange={currency.onChange}
            onFocus={currency.onFocus}
            onBlur={currency.onBlur}
            error={currency.error ? intl.formatMessage(currency.error) : null}
            source={currencies}
          />

        </Dialog>
      </div>
    );
  }

}

// @flow
import React, { Component, PropTypes } from 'react';
import { observer } from 'mobx-react';
import Dialog from 'react-toolbox/lib/dialog/Dialog';
import Input from 'react-toolbox/lib/input/Input';
import Dropdown from 'react-toolbox/lib/dropdown/Dropdown';
import MobxReactForm from 'mobx-react-form';
import { defineMessages, intlShape } from 'react-intl';
import styles from './WalletCreateForm.scss';

const messages = defineMessages({
  walletName: {
    id: 'wallet.create.form.name.label',
    defaultMessage: '!!!Wallet Name',
    description: 'Label for the "Wallet Name" text input in the wallet create form.'
  },
  currency: {
    id: 'wallet.create.form.currency.label',
    defaultMessage: '!!!Currency',
    description: 'Label for the "Currency" dropdown in the wallet create form.'
  },
});

const currencies = [
  { value: 'ada', label: 'ADA' },
];

@observer
export default class WalletCreateForm extends Component {

  static propTypes = {
    validator: PropTypes.instanceOf(MobxReactForm),
  };

  static contextTypes = {
    intl: intlShape.isRequired,
  };

  actions = [
    { label: 'Create personal wallet', onClick: this.props.validator.onSubmit }
  ];

  render() {
    const { intl } = this.context;
    const { validator } = this.props;
    const walletName = validator.$('walletName');
    const currency = validator.$('currency');
    return (
      <div className={styles.component}>

        <Dialog
          title="Create Wallet"
          actions={this.actions}
          active
        >

          <Input
            type="text"
            label={intl.formatMessage(messages.walletName)}
            hint="e.g: Shopping Wallet"
            value={walletName.value}
            error={walletName.error ? intl.formatMessage(walletName.error) : null}
            onChange={walletName.onChange}
            onFocus={walletName.onFocus}
            onBlur={walletName.onBlur}
          />

          <Dropdown
            label={intl.formatMessage(messages.currency)}
            value={currency.value}
            onChange={currency.onChange}
            onFocus={currency.onFocus}
            onBlur={currency.onBlur}
            error={currency.error ? intl.formatMessage(currency.error) : null}
            source={currencies}
          />

        </Dialog>
      </div>
    );
  }

}

Add missing statement termination