     cljsjs.moment
     [clojure.data :refer [diff]]
     [clojure.string :refer [blank? lower-case replace]]
+    [goog.functions :refer [once]]
     [tourneybot.data :refer [scheduled-status in-progress-status finished-status game-statuses
                              games->results
                              ensure-tournament-state


(def initial-page-state
  {;; login related
   :password ""
   :password-error? false
   :password-valid? false
   :logging-in? false

   ;; GameTabs across the top
   :tab-id "swiss-round-1"

                          :password-valid? false))

(defn- click-login-btn [js-evt]
  (when js-evt
    (prevent-default js-evt))
  (swap! page-state assoc :logging-in? true
                          :password-error? false
                          :password-valid? false)
