import React from 'react';
import {observer, inject} from 'mobx-react';
import NumberFormat from 'react-number-format';

@inject('appstate')
@observer
export default class DepositReviewComponent extends React.Component {
  constructor(props) {
    super(props);
    this.props = props;
    this.state = {};
    this.defaultState = Object.assign({}, this.state);
    this.withdrawStore = props.appstate.withdraw;
  }

  componentDidMount() {
    console.log('DepositReviewComponent loaded!')
  }

  render() {
    return (
      <div>
        <div>
          <div className="center-align"><p style={{ lineHeight: "1.6rem" }}>You will made withdraw confirmation via bank transfer</p></div>
          {/*<div className="center-align"><p  style={{lineHeight:"1.6rem", marginTop:"0px", marginBottom:"0px"}}>Number: <span className="black-text">#3AB3Db</span></p></div>*/}
          <div className="center-align"><p style={{ lineHeight: "1.6rem", marginTop: "0px" }}>Date: <span className="black-text">{moment().format('DD MMMM YYYY, HH:mm:ss')}</span></p></div>
          <div className="center-align"><p style={{ lineHeight: "1.6rem", marginTop: "0px", marginBottom: "0px" }}>Total Amount</p></div>
          <div className="center-align"><h4 className="black-text" style={{ lineHeight: "1.6rem", marginTop: "0px", fontSize: "26px", marginBottom: "0px" }}><NumberFormat value={this.withdrawStore.data.amount} displayType={'text'} thousandSeparator={true} prefix={'IDR '} /></h4></div>


          <div className="row" style={{marginTop: 20}}>
            <div className="col s12">
              <h4 className="center-align" style={{ fontSize: '14px', marginBottom: "8px" }}>To</h4>
              <div style={{
                boxShadow: "none",
                border: "1px solid #d4d4d4",
                backgroundColor: "#f9f9f9",
                padding: "10px 10px 10px 20px",
                marginTop: 0,
                marginBottom: 0,
                textAlign: 'center'
              }} className="card-panel">
                <p className="black-text" style={{ lineHeight: '1.0rem', fontSize: 11 }}>
                  Bank: {this.withdrawStore.bank.name}
                </p>
                <p className="black-text" style={{ lineHeight: '1.0rem', fontSize: 11 }}>
                  Behalf Of: {this.withdrawStore.bank.on_behalf}
                </p>
                <p className="black-text" style={{ lineHeight: '1.0rem', fontSize: 11 }}>
                  Account Number: {this.withdrawStore.bank.account_number}
                </p>
                <p className="black-text" style={{ lineHeight: '1.0rem', fontSize: 11 }}>
                  Currency: IDR
                </p>
                <p className="black-text" style={{ lineHeight: '1.0rem', fontSize: 11 }}>
                  Swift Code:
                </p>

              </div>
            </div>

          </div>




        </div>
      </div>
    )
  }
}
