             [salava.core.time :refer [date-from-unix-time]]
             [salava.core.ui.tag :as tag]
             [salava.core.ui.rate-it :as r]
-            [salava.core.ui.helper :refer [private? navigate-to path-for]]
-            [salava.badge.ui.helper :as bh]))
+            [salava.core.ui.helper :refer [private? navigate-to path-for js-navigate-to]]
+            [salava.badge.ui.helper :as bh]
+            [salava.core.ui.share :as s]
+            [reagent.session :as session]
+            [clojure.string :refer [upper-case replace]]
+            [salava.core.ui.rate-it :as r]
+            [salava.badge.ui.my :as my]))
 
 (defn set-visibility [visibility state]
   (swap! state assoc-in [:badge-settings :visibility] visibility))

                 :rating       (if (pos? rating) rating nil)
                 :evidence-url evidence_url}
       :handler (fn []
                  (init-data state id))})))

(defn toggle-recipient-name [id show-recipient-name-atom]
  (let [new-value (not @show-recipient-name-atom)]

      (path-for (str "/obpv1/badge/export-to-pdf"))
      {:params {:badges (list (:id @state)) :lang-option lang-option }
       :handler (js-navigate-to badge-url)})))

(defn save-raiting [id state init-data raiting]
  (ajax/POST
    (path-for (str "/obpv1/badge/save_raiting/" id))
    {:params   {:rating  (if (pos? raiting) raiting nil)}
     :handler (fn []
                (init-data state id (:tab-no @state)))}))

(defn save-settings [state init-data]
  (let [{:keys [id visibility tags rating evidence_url]} (:badge-settings @state)]
