 (ns app.core
   (:require [clojure.string :as str]
+            [cljs.pprint :as pp]
             [om.core :as om :include-macros true]
             [sablono.core :as html :refer-macros [html]]))
 

        1 (om/build rsvp-card-view (select-keys data [:results :card]))
        0 "Zero!"))))

(defn rsvp-view [{:keys [results] :as data} owner]
  (reify om/IRender
    (render [_]
      (if (nil? results)
        (om/build rsvp-search-view data)
        (om/build rsvp-search-results-view data)))))

(defn main-view [{:keys [selected rsvp-search] :as data} owner]
  (reify om/IRender

        [:h2 "RSVP"]
        [:form {:id "rsvpsubmit"
                :onSubmit #(do (.. % (preventDefault))
                               (om/update! card :sent true))}
         [:section {:class "guests"}
          (map-indexed
           (fn [n {:keys [name] :as guest}]
