 (defn hook-browser-navigation! []
   (doto (History.)
     (events/listen
-      EventType/NAVIGATE
-      (fn [event]
-        (secretary/dispatch! (.-token event))))
+     EventType/NAVIGATE
+     (fn [event]
+       (secretary/dispatch! (.-token event))))
     (.setEnabled true)))
 
 ;; -------------------------

  )

(defn check-yourself []
  [:div
   [:h2.ribbon "Your turn!"]
   [:h4 "Here you can check yourself: Which model follows your intution?"]
   [:p.well.bg-warning
    "Set the division with a dash '-': 'игорь' -> 'и-горь'. There will be 10 words to divide."
    [:strong "Important"]
    [:div.input-group.col-sm-4
     [:input.form-control {:value @current-word, :on-change #(reset! current-word (-> % .-target .-value))}]
     [:div.input-group-btn
      [:button.btn.btn-default
       {:on-click #(next-test)} (if (-> (count @user-history) (= how-many)) "Result" "Next")]]]
    [:ul.list-group
     {:style {:margin-top "10px"}}
     (for [[k v] @user-history]
       [:li.list-group-item {:key k} (str k " -> " v)])]]
   [:table.table
    [:tr
     (for [{:keys [short]} models] [:th {:key short}  short])] [:tr (for [v @result] [:td {:key (rand)} v])]]
   (progress-tab)
   ])


(defn home-page []
  [:div [:h1.header.navbar "Welcome to " [:strong "russyll"] ", the automatic syllable divider"]
   [:div#app-body
    (check-yourself)
    (textarea)
    (table-text)
    ]
   ]

(defn mount-root []
  (reagent/render [current-page] (.getElementById js/document "app")))

(defn init! []
  (hook-browser-navigation!)
  (re-frame/dispatch [:initiliaze])
  (re-frame/dispatch [:choose-word])
  (re-frame/dispatch [:change-text example-text])
  (re-frame/dispatch [:syllaby])
  (mount-root)
  )
