     check @panel, ui.Panel
 
 
+class ui.ComponentStack
+  constructor: ({@type, @container, @stack, @count}) ->
+
+
 class ui.ComponentType
   constructor: ({@name, @width, @height, @isCounter, @stackProperty, @stackAfter,
-                 @displayNameSingular, @displayNamePlural, @template} = {}) ->
+                 @displayNameSingular, @displayNamePlural,
+                 @draggable, @template} = {}) ->
     check @name, String
     check @width, Match.Optional Number
     check @height, Match.Optional Number

          cursor = container.find selector
          count = cursor.count()
          if cursor.count() > @stackAfter
            Blaze.With (=> type: @, stack: value, count: count), =>
              @getCounterTemplate count, container.rules.name
          else
            for i in [1..count]
              Blaze.With (=> type: @, stack: value, i: i), =>
                @getCounterTemplate count, container.rules.name
    else
      new Blaze.Template =>

        cursor = container.find type: @name
        count = cursor.count()
        if cursor.count() > @stackAfter
          Blaze.With (new ui.ComponentStack type: @, count: count), =>
            @getCounterTemplate count, container.rules.name
        else
          Blaze.With (=> type: @, container: container), =>
            Blaze.Each (-> cursor), =>
              @getCounterTemplate count, container.rules.name

class ui.Controller extends EventEmitter
