 (defn set-search-title [renderer [_ path _ new-value] _]
   (dom/set-html! (dom/by-id "search_title") new-value))
 
-(defn render-search-results [_ [_ _ _ new-value] _]
+(defn render-search-results [_ [_ _ _ new-value] input-queue]
   (let [{:keys [things tags]} new-value]
     (dom/swap-content!
       (dom/by-id "table_stats")


  (enable-clickable-links-on "#tag_stats_table" input-queue))

(defn render-all-results [_ [_ _ _ new-value] _]
  (dom/set-html!
    (dom/by-id "content")
    (p/generate-table "all_table" new-value
                      :row-partial p/all-row
                      :caption (str "Total: " (count new-value))
                      :fields [:type :name :url :tags :created-at])))

(defn render-thing-results [_ [_ path _ new-value] _]
  (let [thing-id (nth path (- (count path) 2))]
    (dom/set-html!
      (dom/by-id "content")

                        ;; TODO - fix id when it renders
                        :caption (if (re-find #"\d+$" thing-id) "" (p/link-tagged thing-id))
                        :row-partial p/thing-row
                        :fields [:attribute :value])))
  (enable-clickable-links-on "#thing_show_table" input-queue))

(defn href-sets-focus [{:keys [transform messages event]}]
  (if-let [screen (route/url->screen (->> event .-currentTarget .-href (re-find #"#.*?$")))]
