   (:import
    goog.Uri
    goog.Uri.QueryData))
-
-(defonce +router+ nil)
 
 ;; --- API
 

               :params params
               :query-params qparams)))))

(defn route-for
  "Given a location handler and optional parameter map, return the URI
  for such handler and parameters."
  ([id] (route-for id {}))
  ([id params]
   (str (some-> +router+ (resolve-url id params)))))

;; --- Navigate (Event)

(deftype Navigate [id params qparams]
  ptk/EffectEvent
  (effect [_ state stream]
    (let [router (:router state)]
      ;; (prn "Navigate:" id params qparams "| Match:" (resolve-url router id params qparams))
      (navigate! router id params qparams))))

(defn nav

           (transient {})
           (.getKeys qdata))))

(defn resolve
  ([router id] (resolve router id {} {}))
  ([router id params] (resolve router id params {}))
  ([router id params qparams]
   (when-let [match (r/match-by-name router id params)]
     (if (empty? qparams)
