 (def MAX_MAP_ELEMENTS 5)
 (def MAX_SET_ELEMENTS 7)
 
-(declare render-header-template)
-(declare render-inline-header-template)
-(declare render-embedded-header-value)
+(declare header-template)
+(declare container-value-template)
 
 ; dirty
 (defn cljs-value? [value]

(defn string-template [v]
  (build-template "span" "color: #C41A16" (str "\"" v "\"")))

(defn generic-template [v]
  (build-template "span" "" (build-placeholder v) "Object"))

(defn header-collection-template [v]
  (let [arr (build-template "span" "" "[")]
    (doseq [x (take MAX_COLLECTION_ELEMENTS v)]
      (.push arr (render-embedded-header-value x) (spacer-template x)))
    (.pop arr)
    (if (> (count v) MAX_COLLECTION_ELEMENTS)
      (.push arr "…"))

        v (seq m)]
    (doseq [[k v] (take MAX_MAP_ELEMENTS v)]
      (.push arr
             (container-value-template k) (spacer-template k)
             (container-value-template v) (spacer-template v)))
    (.pop arr)
    (if (> (count v) MAX_MAP_ELEMENTS)
      (.push arr "…"))
