                       active-state     (.activeState sigma-plugins sigma-instance)
 
                       ;drag-listener    (.dragNodes   sigma-plugins sigma-instance sigma-renderer active-state)
-
-                      _ (.log js/console active-state)
 
                       web-response-tap (->> (chan 10)
                                             (tap web-response-mult))]

(ns plongeur.view
  (:require [cljs.core.async :as a :refer [<! >! timeout tap chan pipe close!]]
            [quiescent.core :as q :include-macros true :refer-macros [defcomponent]]
            [sablono.core :refer-macros [html]]


           id

           [:div {:on-click   #(go (>! drop-plot id))
                  :class-name "mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab"}
            [:i {:class-name "material-icons"} "delete"]]

           ]]]))

(defcomponent Menu
  [state {:keys [debug]}]
  (html [:ul {:class-name "mdl-menu mdl-list mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect mdl-shadow--2dp account-dropdown"
              :for "more-vert-btn"}

         [:li {:class-name "mdl-menu__item mdl-list__item"}
          [:span {:class-name "mdl-list__item-primary-content"}
           [:i {:class-name "material-icons mdl-list__item-icon"} "settings"] "Configuration"]]

         [:li {:class-name "list__item--border-top"}]

         [:li {:class-name "mdl-menu__item mdl-list__item"}
          [:span {:on-click #(go (>! debug :click))
                  :class-name "mdl-list__item-primary-content"}
           [:i {:class-name "material-icons mdl-list__item-icon"} "get_app"] "Write app state to console"]]

         [:li {:class-name "list__item--border-top"}]

         [:li {:class-name "mdl-menu__item mdl-list__item"}
          [:span {:class-name "mdl-list__item-primary-content"}
           [:i {:class-name "material-icons mdl-list__item-icon"} "attach_file"] "Publication"]]

         [:li {:class-name "mdl-menu__item mdl-list__item"}
          [:span {:class-name "mdl-list__item-primary-content"}
           [:i {:class-name "material-icons mdl-list__item-icon"} "link"] "Github"]]]))

(defcomponent Header
  [state {:keys [add-plot web-response-chan] :as cmd-chans}]
  (html [:header {:class-name "mdl-layout__header"}
         [:div {:class-name "mdl-layout__header-row"}

