                [:div.tab-content
                 ;; stops
                 [:div.tab-wrapper
-                 [:div {:className (join " "
-                                         ["tab-pane" "fade" "side"
-                                          (when (= tab :stops)
-                                            "active in")])}
+                 [:div {:className (tab-class tab :stops)}
                   [:form.form-horizontal
                    [:fieldset
                     [:div.form-group

                     [:th "Lat/Lng"]]]
                   [:tbody]]]
                 ;; routes
                 [:div {:className (join " "
                                         ["tab-pane" "fade" "side"
                                          (when (= tab :routes)
                                            "active in")])}
                  [:p "Routes panel"]]
                 ;; trips
                 [:div {:className (join " "
                                         ["tab-pane" "fade" "side"
                                          (when (= tab :trips)
                                            "active in")])}
                  [:p "Trips panel"]]]]])))))

                  :onClick (fn [e]
                             (raise! owner [:side-panel-changed key])
                             (.preventDefault e))} label]]))))

(defn ^:private tab-class [tab key]
  (join " "
        ["tab-pane" "fade" "side"
         (when (= tab key)
           "active in")]))

(defn side-panel [panel owner]
  (reify
