 (ns cljs-webrepl.core
   (:require
-   [clojure.string :as str :refer [blank? trim]]
+   [clojure.string :as str]
    [cljs.core.async :refer [chan close! timeout put!]]
    [cljsjs.clipboard :as clipboard]
    [reagent.core :as r :refer [atom]]

  (let [state              (:state props)
        {:keys [ns input]} @state
        is-init?           (some? ns)
        is-blank?          (blank? input)
        is-disabled?       (or (not is-init?) is-blank?)]
    [:div.padding-left
     ^{:key is-disabled?}

         :input ""))

(defn eval-input [state]
  (let [input (str/trim (:input @state))]
    (when-not (= "" input)
      (eval-str! input)
      (swap! state assoc :input ""))))
