         attrs.$observe "macModal", (id) -> registerModal id
 ]).
 
-# mac-modal:         Modal ID to trigger
-# mac-modal-content: Extra content/data to pass along
+#
+# @chalk overview
+# @name mac-modal (attribute)
+# @description
+# Modal attribute directive to trigger modal dialog
+# @param {String} mac-modal Modal ID to trigger
+# @param {Object} mac-modal-content Extra content/data to pass along
+#
 directive "macModal", [
   "$parse"
   "modal"

      @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

###
@chalk overview
@name Modal Service

@description
There are multiple components used by modal.
- A modal service is used to keep state of modal opened in the applications.
- A modal element directive to define the modal dialog box
- A modal attribute directive as a modal trigger

@param {Function} show Show a modal based on the modal id
- {String} id The id of the modal to open
- {Object} triggerOptions Additional options to open modal

@param {Function} resize Update the position and also the size of the modal
- {Modal Object} modalObject The modal to reposition and resize (default opened modal)

@param {Function} hide Hide currently opened modal
- {Function} callback Callback after modal has been hidden

@param {Function} register Registering modal with the service
- {String} id ID of the modal
- {DOM element} element The modal element
- {Object} options Additional options for the modal

@param {Function} unregister Remove modal from modal service
- {String} id ID of the modal to unregister

@param {Function} clearWaiting Remove certain modal id from waiting list
- {String} id ID of the modal
###

angular.module("Mac").factory("modal", [
