                 (not (#{"Special" "Alternates"} (:setname %)))
                 (= (:type %) "Identity")) (:cards @cb/app-state)))
 
+(defn deck->str [cards]
+  (reduce #(str %1 (:qty %2) " " (get-in %2 [:card :title]) "\n") "" cards))
+
 (defn edit-deck [owner]
   (om/set-state! owner :edit true)
+  (om/set-state! owner :deck-edit (deck->str (om/get-state owner [:deck :cards])))
   (-> owner (om/get-node "viewport") js/$ (.css "left" -500)))
 
 (defn new-deck [side owner]

      {:edit false
       :card-search ""
       :quantity 1
       :deck {}})

    om/IRenderState

    (go (let [response (<! (POST "/data/decks/" data :json))]))))

(defn handle-edit [event owner]
  (let [text (-> owner (om/get-node "deck-edit") .-value)]
    (om/set-state! owner :deck-edit text)
    (om/set-state! owner [:deck :cards] (parse-deck text))))

(defn decklist-view [{:keys [name identity cards]} owner]
  (om/component
