 ###
 
 ClientViewModel = require 'stout-client/view/ClientViewModel'
+nextTick = require 'stout-client/util/nextTick'
 vars       = require '../vars'
 
 

###
makeTransitionFunc = (func, transitionClass, removeClass, event, test) ->
  (t = 0, cb) ->
    setTimeout =>
      if @rendered and test.call @
        @prefixedClasses.remove VISIBLE_CLS, HIDDEN_CLS, removeClass
        @prefixedClasses.add TRANS_CLS, transitionClass

  # @public
  ###
  hide: (cb) ->
    if @rendered
      @_stopTransition()
      @prefixedClasses.remove VISIBLE_CLS
      @prefixedClasses.add HIDDEN_CLS
      @fire 'hide'
      cb?.call null
    @


