             [salava.badge.ui.verify :refer [check-badge]]
             [salava.core.ui.tag :as tag]))
 
-(declare show-settings-dialog)
-(declare badge-content)
 
 (defn init-badge-connection [state badge-id]
   (ajax/GET
    (path-for (str "/obpv1/social/connected/" badge-id))
    {:handler (fn [data]
-               (swap! state assoc :receive-notifications data)
-                )}))
+               (swap! state assoc :receive-notifications data))}))
 
 (defn init-data [state id tab-no]
   (ajax/GET

                                :content-language (init-content-language (:content data))
                                :tab-no tab-no
                                :permission "success"))
                 (init-badge-connection state (:badge_id data))
                 (cond
                   (== 2 (:tab-no @state))(show-settings-dialog id state init-data "settings")
                   (== 3 (:tab-no @state))(show-settings-dialog id state init-data "share")
                   )))}
    (fn [] (swap! state assoc :permission "error"))))

(defn show-settings-dialog [badge-id state init-data context]

(defn badge-endorsement-modal-link [badge-id endorsement-count]
  (when (pos? endorsement-count)
    [:div.endorsement-link
     [:span [:i {:class "fa fa-handshake-o"}]]
     [:a {:href "#"
          :on-click #(do (.preventDefault %)
                       (mo/open-modal [:badge :endorsement] badge-id))}
      (if (== endorsement-count 1)
        (str  endorsement-count " " (t :badge/endorsement))
        (str  endorsement-count " " (t :badge/endorsements)))]]))

(defn issuer-modal-link [issuer-id name]
  [:div {:class "issuer-data clearfix"}
