 
 (ns mathom.toolbar)
 
-(def tool (atom {:selected nil}))
+(def tool (atom {}))
 
 (defn clean
   []

(defn render
  [statedb]
  (let [states (:states statedb)
        active (:active_state statedb)]
    (set-content (:bar @tool)
                 (h "div" {} [(h "h1" {} ["Mathom Toolbar"])
                              (h "button" {:id "mathom_toolbar_prev"} ["Previous state"])
                              (h "button" {:id "mathom_toolbar_next"} ["Next state"])
                              (h "span"
                                 {:id "mathom_toolbar_states"}
                                 ["Saved states: " (count states)

  [d]
  (clojure.string/join " "
                       (for [[k v] d]
                         (if v
                           (str (name k) "=\"" v "\"")))))


(defn h
