 (ns re-demo.popover-form-demo
   (:require [reagent.core    :as    reagent]
-            [re-com.util     :as    util]
             [re-com.box      :refer [h-box v-box box gap]]
-            [re-com.core    :refer  [button label spinner progress-bar checkbox radio-button]]
-            [re-com.dropdown :refer [single-dropdown find-choice filter-choices-by-keyword]]
+            [re-com.core    :refer  [button checkbox radio-button]]
+            [re-com.dropdown :refer [single-dropdown]]
             [re-com.popover  :refer [popover make-button make-link]]))
 
 
 (def show-this-popover? (reagent/atom false))
-
-
-;; ----- PRIMARY FORM
-
 (def initial-form-data (reagent/atom {}))
 (def form-data (reagent/atom {:checkbox1      false
                               :checkbox2      true

    [popover
     :position :below-center
     :showing? show-this-popover?
     :anchor   [red-button]
     :popover  popover-content
     :options  popover-options]))

(defn form-initialise
  []
  (reset! initial-form-data @form-data)
  (reset! show-this-popover? true))


(defn form-submit
  []
  (let [selected-file ""] ;; (aget (.-target event) "file")
    (swap! form-data assoc :file (.-value selected-file))
    (reset! show-this-popover? false)
    false)) ;; Prevent default "GET" form submission to server


