 (ns clj-money.entities
-  (:require [clj-money.data :as data]
-            [clj-money.notifications :refer [notify]]))
+  (:require [reagent.core :as r]
+            [clj-money.data :as data]
+            [clj-money.notifications :as notify]))
+
+(def editing-entity (r/atom nil))
 
 (defn- edit
-  [entity entities]
-  (notify "Edit coming soon!" :info))
+  [entity]
+  (reset! editing-entity entity))
+
+(defn- finish-edit
+  []
+  (notify/warning "Not implemented.")
+  (reset! editing-entity nil))
+
+(defn- cancel-edit
+  []
+  (reset! editing-entity nil))
 
 (defn- delete
   [entity entities]

  [:tr
   [:td (:name entity)]
   [:td
    [:div.btn-group
     [:button.btn.btn-xs.btn-info {:on-click #(edit entity entities)
                                   :title "Click here to edit this entity."}
      [:span.glyphicon.glyphicon-pencil {:arial-hidden true}]]
     [:button.btn.btn-xs.btn-danger {:on-click #(delete entity entities)
                                     :title "Click here to remove this entity."}
      [:span.glyphicon.glyphicon-remove {:arial-hidden true}]]]]])

(defn- entity-table
  [entities]

                                            #(= (:id %)
                                                (:id entity))
                                            old-list))))
                      notify/danger))


(defn- entity-row
