                         :row-partial p/tag-search-row
                         :caption (format "Total: %s" (count (map :url things)))))))
 
+(defn render-tags-results [_ [_ _ _ new-value] _]
+  (dom/insert-after!
+    (dom/by-id "url_search_text")
+    (p/generate-datalist new-value)))
+
+(defn url-search [{:keys [transform messages]}]
+  (msg/fill transform messages {:query (.-value (dom/by-id "url_search_text"))
+                                :search-type (dom/value (css/sel "input[name=search_type]:checked"))}))
+
+(defn create-url [{:keys [transform messages]}]
+  (msg/fill transform messages {:value (dom/value (dom/by-id "add_url_text"))}))
+
+;;; Other pages
+;;;
 (defn render-types-results [_ [_ _ _ new-value] _]
   (dom/set-html!
     (dom/by-id "content")

                      :row-partial p/type-stats-row
                      :fields [:name :count :name-percent :url-percent])))

(defn render-tags-results [_ [_ _ _ new-value] _]
  (dom/insert-after!
    (dom/by-id "url_search_text")
    (p/generate-datalist new-value)))

(defn render-tag-stats-results [_ [_ _ _ new-value] _]
  (dom/set-html!

                      :caption (str "Total: " (count new-value))
                      :fields [:type :name :url :tags :created-at])))

(defn render-config []
  (reduce
    into
