                  :href "config.html"}
              [:i {:class-name "material-icons"
                   :role       "presentation"} "reorder"] "Logs"]
+            [:button {:on-click   #(go (>! add-graph :click))
+                      :hidden     (>= (m/graph-count state) 4)
+                      :class-name "mdl-button mdl-js-button mdl-button--fab mdl-button--colored"}
+             [:i {:class-name "material-icons"} "add"]]
 
             [:div {:class-name "mdl-layout-spacer"}]
 

(ns plongeur.view
  (:require [cljs.core.async :as a :refer [>! chan pipe]]
            [quiescent.core :as q :include-macros true :refer-macros [defcomponent]]
            [sablono.core :refer-macros [html]]
            [plongeur.model :as m]
            [plongeur.sigma-driver :as s])
  (:require-macros [cljs.core.async.macros :refer [go]]))

(defn upgrade-mdl-components

            [:div {:class-name "mdl-grid mdl-cell mdl-cell--9-col-desktop mdl-cell--12-col-tablet mdl-cell--4-col-phone mdl-cell--top"}

             (for [graph-state (m/graphs state)]
               (Card graph-state cmd-chans))

             ]]]

          ]]))

(defn view
  "Returns a stream of view trees, represented as a core.async channel."
  [states-chan cmd-chans]
  (->> (fn [state] (Root state cmd-chans)) ; fn
       (map)                               ; xf
       (chan 10)                           ; ch
       (pipe states-chan)))


#_(def node-1 {:id "n1"
               :label "hello"
               :x 10
               :y 10
               :size 1
               :color "#FF0"})