     (when date
       (.format formatter date))))
 
+(ui/defcomponentmethod meta-title :document-date [_ _ _]
+  (render [_]
+    [:span.title {:key "title"} "Date"]))
+
 (ui/defcomponentmethod meta-value :document-date [[_ date] owner _]
   (init-state [_]
     {:editing? false

  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
  (:import [goog.i18n DateTimeFormat DateTimeParse]))

(defmulti meta-value (fn [[kw val] owner opts] kw))

(ui/defcomponentmethod meta-value :default [[key value] _ _]
  (render [_]


(ui/defcomponent multi-meta-item [prop owner _]
  (render [_]
    (let [name (name prop)]
      [:li {:class name, :key name}
       (om/build meta-title [prop "Multiple"])
       (om/build meta-value [:default "Multiple"])])))

(ui/defcomponent meta-item [[prop value] owner _]
  (render-state [_ state]
    (let [name (name prop)]
      [:li {:class name, :key name}
       (om/build meta-title [prop value])
       (om/build meta-value [prop value]
                 {:state state})])))

;;; TODO: Support mass-edit here
(defn ^:private property-changed! [document property value]
  (assert (contains? #{:title :document-date} property))
  (println "Updating property" property "on document" (:id @document) (str "[" (pr-str value) "]"))
  (api/update-document! (assoc @document property value)))

(ui/defcomponent meta-table [documents]
