             [lt.objs.files :as files]
             [lt.objs.deploy :as deploy]
             [lt.util.dom :as dom]
-            [crate.binding :refer [bound subatom]])
+            [lt.util.load :as load]
+            [crate.binding :refer [bound -value subatom]])
   (:require-macros [lt.macros :refer [behavior defui]]))
 
 (defn css-expr [k v]

                  :type :user
                  :params [{:label "name"} {:label "path"}]
                  :reaction (fn [this skins name path]
                              (assoc skins name path)
                              ))

(defn get-skins []

            (when (:font-size settings)
              (css-expr :font-size (str (:font-size settings) "pt")))))

(defn load-skin [skin]
  (let [skins (object/raise-reduce app/app :skins+ {})
        path (get skins skin (plugins/adjust-path "css/skins/new-dark.css"))]
    (load/css path)))

(object/object* ::styles
                :init (fn [this]
                        [:div
                         (bound (subatom this :skin)
                                load-skin)
                         [:style {:type "text/css"}
                          (bound this ->css)
                          ]]))
