/**
 * ResignDone view
 *
 * Generated by coz on 11/5/2016,
 * from a template provided by apeman-asset-templates.
 *
 * @function ResignDoneView
 */
'use strict'

import React, { Component, PropTypes as types } from 'react'
import defineDebug from 'debug'
import {
  ApView, ApViewBody,
  ApDone
} from 'apeman-react-basic'
import {
  asConnected,
  asView,
  asLocaled,
  asServed,
  forSpin,
  combine
} from '../../wrappers'

const debug = defineDebug('project:view:resign-done')

/** @lends ResignDoneView */
class ResignDoneView extends Component {
  // --------------------
  // Specs
  // --------------------
  static get propTypes () {
    return {}
  }

  static get defaultProps () {
    return {}
  }

  render () {
    const s = this
    const {
      props,
      l
    } = s
    return (
      <ApView id='resign-done-view'
              className='view'
              spinning={ props.spinning }
              way={ props.way }
      >
        <ApViewBody>
          <ApDone message={ l('messages.RESIGN_DONE') }
                  linkHref='/'
                  linkText={ l('links.RETURN_TO_TOP') }
          />
        </ApViewBody>
      </ApView>
    )
  }

  // --------------------
  // Lifecycle
  // --------------------

  componentWillMount () {
    debug('willMount')
    const s = this
  }

  componentDidMount () {
    debug('didMount')
    const s = this
  }

  componentWillUnmount () {
    debug('willUnmount')
    const s = this
  }

  // --------------------
  // Handlers
  // --------------------

  // --------------------
  // For redux
  // --------------------
  static mapStateToProps (state, ownProps) {
    return {}
  }

}

export default combine(
  asLocaled(),
  asView(),
  asServed(),
  forSpin(),
  asConnected()
)(ResignDoneView)

