   [{:keys [vcs_type username active owner]}]
   (om/build crumb-node {:name username
                         :track-event-type :breadcrumb-org-clicked
+                        :demo false
                         :path (routes/v1-dashboard-path {:vcs_type vcs_type
                                                          :org username})
                         :active active}))

  [{:keys [owner]}]
  (om/build crumb-node {:name "Builds"
                        :path (routes/v1-dashboard-path {})
                        :track-event-type :breadcrumb-dashboard-clicked}))

(defmethod crumb :project
  [{:keys [vcs_type username project active owner]}]
  (om/build crumb-node {:name project
                        :path (routes/v1-dashboard-path {:vcs_type vcs_type :org username :repo project})
                        :active active
                        :track-event-type :breadcrumb-project-clicked}))

(defmethod crumb :project-settings
  [{:keys [vcs_type username project active]}]

            [om.core :as om :include-macros true])
  (:require-macros [frontend.utils :refer [component html]]))

(defn crumb-node [{:keys [active name path track-event-type demo]} owner]
  ;; demo intended for OSS users, external viewers of builds page
  (reify
    om/IRender
    (render [_]
      (component
        (html
          (if-not demo
            [:li
             [:span name]]
            (if active
              [:li.active
               [:a {:disabled true :title name} name " "]]
              [:li
               [:a {:href path
                    :title name
                    :on-click (when track-event-type
                                #((om/get-shared owner :track-event) {:event-type track-event-type}))}
                   name " "]])))))))

(defmulti crumb
  (fn [{:keys [type]}] type))
