context = window
rest = context.JK.Rest()
logger = context.JK.logger

UserStore = context.UserStore

@LessonSession = React.createClass({

  mixins: [
    Reflux.listenTo(AppStore, "onAppInit"),
    Reflux.listenTo(UserStore, "onUserChanged")
  ]

  onAppInit: (@app) ->
    @app.bindScreen('jamclass/lesson-session',
      {beforeShow: @beforeShow, afterShow: @afterShow, beforeHide: @beforeHide})

  onUserChanged: (userState) ->

    @setState({user: userState?.user})

  componentDidMount: () ->

    @root = $(@getDOMNode())

  getInitialState: () ->
    {
    user: null,
    lesson: null,
    updating: false,
    }

  beforeHide: (e) ->
    @resetErrors()

  beforeShow: (e) ->

  afterShow: (e) ->
    @setState({updating: true})


  render: () ->
    header = "header"

    `<div className="content-body-scroller">
      <div className="column left-column">
        {header}

      </div>
      <div className="column right-column">

      </div>

      <br className="clearall"/>

    </div>`

})