 ;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
 
 (ns uxbox.main.ui.dashboard.colors
-  (:require [sablono.core :refer-macros [html]]
-            [rum.core :as rum]
-            [cuerdas.core :as str]
+  (:require [cuerdas.core :as str]
             [lentes.core :as l]
+            [uxbox.main.data.colors :as dc]
+            [uxbox.main.data.dashboard :as dd]
+            [uxbox.main.data.lightbox :as udl]
+            [uxbox.main.library :as library]
+            [uxbox.main.state :as st]
+            [uxbox.main.ui.colorpicker :refer (colorpicker)]
+            [uxbox.main.ui.dashboard.header :refer (header)]
+            [uxbox.main.ui.forms :as form]
+            [uxbox.main.ui.icons :as i]
+            [uxbox.main.ui.keyboard :as k]
+            [uxbox.main.ui.lightbox :as lbx]
+            [uxbox.util.color :refer (hex->rgb)]
+            [uxbox.util.dom :as dom]
             [uxbox.util.i18n :as t :refer (tr)]
-            [uxbox.main.state :as st]
+            [uxbox.util.lens :as ul]
+            [uxbox.util.mixins :as mx]
             [uxbox.util.rstore :as rs]
-            [uxbox.util.schema :as sc]
-            [uxbox.main.library :as library]
-            [uxbox.main.data.dashboard :as dd]
-            [uxbox.main.data.colors :as dc]
-            [uxbox.main.data.lightbox :as udl]
-            [uxbox.main.ui.icons :as i]
-            [uxbox.main.ui.forms :as form]
-            [uxbox.main.ui.lightbox :as lbx]
-            [uxbox.main.ui.colorpicker :refer (colorpicker)]
-            [uxbox.util.mixins :as mx]
-            [uxbox.main.ui.dashboard.header :refer (header)]
-            [uxbox.main.ui.keyboard :as k]
-            [uxbox.util.dom :as dom]
-            [uxbox.util.lens :as ul]
-            [uxbox.util.color :refer (hex->rgb)]))
+            [uxbox.util.schema :as sc]))
 
 ;; --- Refs
 

  {:mixins [mx/static mx/reactive]}
  []
  (let [dashboard (mx/react dashboard-ref)
        collections (rum/react collections-ref)
        selected (:id dashboard)
        type (:type dashboard)
        own? (= type :own)

  [type selected]
  (let [own? (= type :own)
        builtin? (= type :builtin)
        collections (cond->> (mx/react collections-ref)
                      own? (filter #(= :own (:type %)))
                      builtin? (filter #(= :builtin (:type %)))
                      own? (sort-by :id))]
