     [om-tools.dom :as dom :include-macros true]
     [om-tools.core :refer-macros [defcomponent]]
     [sablono.core :as html :refer-macros [html]]
+    [clojure.set :refer [difference]]
     [cljs.core.async :refer [put! chan <!]]))
 
 ; TODO: instead of storing stuff as IDs, store the whole data structure (e.g. under conditions)

(defcomponent master-field-picker [selections owner]
  (render-state [_ _]
    (html
      [:ul.available
       (for [{:keys [name id] :as ticket-field} dummy-ticket-fields]
         (let [is-selected (= ticket-field (:master-field selections))]
           [:li {:class (if is-selected
                          "active")}
            [:a.field
             {:value    id
              :on-click (fn [e]
                          (let [{:keys [pick-channel]} (om/get-shared owner)]
                            (put! pick-channel
                                  {:selection-to-update :master-field
                                   :new-value           ticket-field})))}
             name]]))])))




           [:table.table
            [:tbody
             [:tr
              (om/build master-field-picker
                        (:selections app-state))

              [:td.key
               [:div.values
