             [clojure.java.io :as io]
             [clojure.data.json :as json]
             [salava.core.helper :refer [dump]]
-            [hiccup.page :refer [html5 include-css include-js]]))
+            [hiccup.page :refer [html5 include-css include-js]]
+            salava.core.restructure))
 
 (def asset-css
   ["/assets/bootstrap/css/bootstrap.min.css"

  (GET path []
         :no-doc true
         :summary "Main HTML layout"
         (-> (main-view ctx)
             (ok)
             (content-type "text/html; charset=\"UTF-8\""))))



(defn context-js [ctx]
  (let [ctx-out {:plugins {:all (get-in ctx [:config :core :plugins])} :user (:user ctx)}]
    (str "function salavaCoreCtx() { return " (json/write-str ctx-out) "; }")))


