 
 (def category-group (om/factory CategoryGroup))
 
+(declare Root)
+
 (om/defui ^:once MainViewLink
   static css/CSS
   (local-rules [_] [[:.item {:background     "antiquewhite"

                      :outline         "none"
                      :text-decoration "none"}]

                    [:.video-chooser {:display "flex"}]])
  (include-children [_] [MainViewLink
                         QueuedVideo
                         CategoryGroup])

                    [:.active {:background "#ffce8c"}]])
  (include-children [_] [])

  static om/IQuery
  (query [_] [:ui/main-view])

  Object
  (render [this]
    (let [{:ui/keys [main-view label component]} (om/props this)
          {:keys [menu-item menu-item-active]} (css/get-classnames Root)]
      (dom/a #js {:className (cond-> menu-item
                               (= (-> (om/props component) :ui/main-view) main-view)
                               (str " " menu-item-active))
                  :onClick   (pd #(om/transact! component `[(ui/set-main-view {:view ~main-view}) :ui/main-view]))}
        label))))

(defn main-view-link [{:ui/keys [main-view label component]}]
  (let [{:keys [menu-item menu-item-active]} (css/get-classnames Root)]
    (dom/a #js {:className (cond-> menu-item
                             (= (-> (om/props component) :ui/main-view) main-view)
                             (str " " menu-item-active))
                :onClick   (pd #(do
                                  (om/transact! component `[(ui/set-main-view {:view ~main-view}) :ui/main-view])))}
      label)))

(om/defui ^:once Root
  static uc/InitialAppState
