                                :gap      "10px"
                                :width    "450px"
                                :children [[title2 "Notes"]
-                                          [status-text "Stable"]
+                                          [status-text "Experimental"]
                                           [p "Text entry components."]
                                           [p "The " [:code ":on-change"] " function will be called either after each character is entered or on blur."]
                                           [p "Input warnings and errors can be indicated visually by border colors and icons."]

  []
  [typeahead-demo])

(def ^:private states-data
  ["Alabama"
   "Alaska"
   "Arizona"
   "Arkansas"
   "California"
   "Colorado"
   "Connecticut"
   "Delaware"
   "Florida"
   "Georgia"
   "Hawaii"
   "Idaho"
   "Illinois"
   "Indiana"
   "Iowa"
   "Kansas"
   "Kentucky"
   "Louisiana"
   "Maine"
   "Maryland"
   "Massachusetts"
   "Michigan"
   "Minnesota"
   "Mississippi"
   "Missouri"
   "Montana"
   "Nebraska"
   "Nevada"
   "New Hampshire"
   "New Jersey"
   "New Mexico"
   "New York"
   "North Carolina"
   "North Dakota"
   "Ohio"
   "Oklahoma"
   "Oregon"
   "Pennsylvania"
   "Rhode Island"
   "South Carolina"
   "South Dakota"
   "Tennessee"
   "Texas"
   "Utah"
   "Vermont"
   "Virginia"
   "Washington"
   "West Virginia"
   "Wisconsin"
   "Wyoming"])

            [reagent.core  :as    reagent]
            [cljs.core.async  :refer    [timeout]]))

(declare md-icon-names)

(defn md-classes-for-icon [name] (str "zmdi zmdi-" name " zmdi-hc-2x"))

(defn typeahead-demo
  []
  (let [typeahead-on-change-value (reagent/atom nil)
        status                    (reagent/atom nil)
        status-icon?              (reagent/atom false)
        status-tooltip            (reagent/atom "")
        disabled?                 (reagent/atom false)
        change-on-blur?           (reagent/atom true)
        data-source-choice        (reagent/atom :immediate)
        md-icon-result #(-> {:name % :more :stuff})
        data-source-async
        (fn [s callback]
          (go
            ;; simulate an asynchronous data-source
            (<! (timeout 500))
            (callback
             s
             (take 16 (for [n md-icon-names
                            :when (re-find (re-pattern (str "(?i)" s)) n)]
                        [n (md-icon-result n)]))))
          ;; must return falsey for an async data-source
          nil)
        data-source-immediate
        (fn [s]
          [s
           (take 16 (for [n md-icon-names
                          :when (re-find (re-pattern (str "(?i)" s)) n)]
                      [n (md-icon-result n)]))])]
    (fn
      []
      [v-box
