 
 {my} = require '../my'
 {make} = require '../render/make'
-# {processor} = require './processor'
 {programs} = require './programs'
 
-# 
 # TODO: Editing Issues
 # * add new programs
 # * rename events

# * reorder commmands within and between programs
# * drag commands from above into a program
# * drag programs into the commands view!
# 
# TODO: Behavior Issues
# * step through a program
# * send next command to sprite
# * detect and handle interruptions
#   * hitting boundaries
#   * collisions
#   * finishing levels
# 

exports.behavior = (sprite) ->
  rows = make.rows 'behavior', programs(sprite)

  my.assert default_program, "no default_program"

  initial_label = default_program._LABEL
  my.extend rows, {
    y: (world) -> world.index * my.row.spacing
    class: 'program'
  }
