 {extend, isEqual, omit, pick, size} = require 'underscore-plus'
-EmitterMixin = require('emissary').Emitter
 {Emitter} = require 'event-kit'
 Grim = require 'grim'
 Delegator = require 'delegato'

  getInvalidationStrategy: ->
    @invalidate

  # Deprecated: Use ::getProperties instead
  getAttributes: ->
    Grim.deprecate("Use Marker::getProperties instead.")
    @getProperties()

  # Deprecated: Use ::setProperties instead
  setAttributes: (args...) ->
    Grim.deprecate("Use Marker::setProperties instead.")
    @setProperties(args...)

  # Public: Returns an {Object} containing any custom properties associated with
  # the marker.
  getProperties: ->

# deleted. See {TextBuffer::markRange} for invalidation strategies.
module.exports =
class Marker
  Delegator.includeInto(this)
  Serializable.includeInto(this)

  @extractParams: (inputParams) ->
    outputParams = {}
    if inputParams?
      @handleDeprecatedParams(inputParams) if Grim.includeDeprecatedAPIs
      extend(outputParams, pick(inputParams, OptionKeys))
      properties = omit(inputParams, OptionKeys)
      outputParams.properties = properties if size(properties) > 0
