 _ = require 'underscore-plus'
 {Emitter} = require 'event-kit'
-Grim = require 'grim'
 
 idCounter = 0
 nextId = -> idCounter++

    @markerDestroyDisposable.dispose()
    @markerDestroyDisposable = null
    @destroyed = true
    @emit 'destroyed' if Grim.includeDeprecatedAPIs
    @emitter.emit 'did-destroy'
    @emitter.dispose()


    flashObject = {class: klass, duration}
    @flashQueue ?= []
    @flashQueue.push(flashObject)
    @emitter.emit 'did-flash'

  consumeNextFlash: ->
    return @flashQueue.shift() if @flashQueue?.length > 0
    null
