     # Current opened modal
     opened: null
 
+    #
+    # @name show
+    # @description
+    # Show a modal based on the modal id
+    # @param {String} id The id of the modal to open
+    # @param {Object} triggerOptions Additional options to open modal
+    #
     show: (id, triggerOptions = {}) ->
       if @registered[id]?
         {element, options} = @registered[id]

      @clearWaiting id
      delete @registered[id]

    clearWaiting: (id) ->
      # clear modal with the same id if id is provided
      return if id? and @waiting.id isnt id

      if @waiting? and @waiting.id is id
        @show id, @waiting.options

    #
    # @name unregister
    # @description
    # Remove modal from modal service
    # @param {String} id ID of the modal to unregister
    #
    unregister: (id) ->
      unless @registered[id]?
        throw new Error "Modal #{id} is not registered"
