/**
 * Created by baoyinghai on 4/25/17.
 */
import React from 'react';
import { iconWrapper } from '../../framework/utils/IconHelper';
import { Modal } from '../mxa';

export default class Setting extends React.Component {

  _logout = () => {
    /* eslint-disable */
    if (__logoutHandler) {
      __logoutHandler(() => console.log('logout success!'), error => {
        Modal.error({
          title: '提示',
          content: error,
        });
      });
    } else {
      console.error('there is no func logoutHandler!');
    }
  };

  render() {
    return (
      <div className="setting-wrapper">
        <div className="h-arrow" />
        <div className="setting-content-wrapper">
          <div onClick={this._logout}>
            <span>{iconWrapper('icon-tuichu')}</span>
            <span>退出</span>
          </div>
        </div>
      </div>
    );
  }
}
