$ = jQuery
context = window
logger = context.JK.logger

@UserActivityStore = Reflux.createStore(
  {
    active: true

    listenables: @UserActivityActions

    init: ->
      this.listenTo(context.AppStore, this.onAppInit)

    onAppInit: (@app) ->

    onSetActive: (active) ->
      if active != @active
        @active = active
        @changed()

    changed:() ->
      @trigger(@getState())

    getState:() ->
      {active: @active}
  }
)
