   constructor: (options) ->
     super(options)
 
-    verb = options.verb
-    verbGerund = "#{verb}ing"
-    verbPast = "#{verb}ed"
-    @valueAttr = "up-#{verb}"
-
-    @closeEventType = "up:layer:#{verb}"
-    @closeCallbackName = "on#{u.upperCaseFirst(verb)}"
-
-    @closingEventType = "up:layer:#{verbGerund}"
-    @closingCallbackName = "on#{u.upperCaseFirst(verbGerund)}"
-
-    @closedEventType = "up:layer:#{verbPast}"
-    @closedCallbackName = "on#{u.upperCaseFirst(verbPast)}"
-
+    @verb = options.verb
     @layer = up.layer.get(options)
     @origin = options.origin
     @value = options.value

    # event listeners can receive it. So we explicitely emit the event a second time
    # on the document.
    return @layer.emit(
      @buildEvent(@closedEventType),
      # Set up.layer.current to the parent of the closed layer, which is now likely
      # to be the front layer.
      currentLayer: formerParent,
      callback: @layer.callback(@closedCallbackName),
      ensureBubbles: true,
      log: "Closed #{@layer}"
    )

  buildEvent: (name) ->


  execute: ->
    if @origin && u.isUndefined(value)
      value = e.jsonAttr(@origin, "up-#{@verb}")

    unless @layer.isOpen()
      return Promise.resolve()
