 
 (defn player-queue []
   (om/ref-cursor (:player-queue (om/root-cursor app-state))))
+
+(defn tab-on-view []
+  (om/ref-cursor (:tab-on-view (om/root-cursor app-state))))
 
 (defn enqueue-track [track]
   (om/transact! (player-queue) #(conj % track)))

                        (dom/span #js {:className "duration"} "Length")
                        (dom/button #js {:onClick #(dequeue-all)} "-"))
               (map #(om/build queue-track-view
                             %1
                             {:state {:index %2}})
                    queue (range 0 999))
               )))))


                (recur))))))
    om/IRender
    (render [this]
      (let [on-view (om/observe owner (tab-on-view))]
        (if (= (first on-view) :search)
          (dom/div nil
                   (dom/h2 nil "library")
                   (om/build search-entry-view (:term search)
                             {:init-state {:string ""}})
                   (om/build results-view (:results search))))))))

(defn show-tab [cursor tab-name]
  (om/update! cursor [:tab-on-view] [tab-name]))

(defn tab-selector-view [app owner]
  (reify
