       {:name (str "Configuration " (inc i))
        :namespace (rand-nth ["Broad" "nci" "public"])
        :rootEntityType "Task"
-       :workspaceName {:namespace (str "ws_ns_" (inc i))
-                       :name (str "ws_n_" (inc i))}
-       :methodStoreMethod {:methodNamespace (str "ms_ns_" (inc i))
-                           :methodName (str "ms_n_" (inc i))
-                           :methodVersion (str "ms_v_" (inc i))}
-       :methodStoreConfig {:methodConfigNamespace (str "msc_ns_" (inc i))
-                           :methodConfigName (str "msc_n_" (inc i))
-                           :methodConfigVersion (str "msc_v_" (inc i))}
+       :workspaceName {:namespace (str "ws-ns-" (inc i))
+                       :name (str "ws-n-" (inc i))}
+       :methodStoreMethod {:methodNamespace (str "ms-ns-" (inc i))
+                           :methodName (str "ms-n-" (inc i))
+                           :methodVersion (str "ms-v-" (inc i))}
+       :methodStoreConfig {:methodConfigNamespace (str "msc-ns-" (inc i))
+                           :methodConfigName (str "msc-n-" (inc i))
+                           :methodConfigVersion (str "msc-v-" (inc i))}
        :inputs {"Input 1" "[some value]"
                 "Input 2" "[some value]"}
        :outputs {"Output 1" "[some value]"

    (range (rand-int 50))))


(react/defc ImportWorkspaceMethodsConfigurationsList
  {:render
   (fn [{:keys [state props]}]
     [:div {}
      [comps/ModalDialog
       {:width 600
        :content [:div {}
                  [:div {:style {:backgroundColor "#fff"
                                 :borderBottom (str "1px solid " (:line-gray style/colors))
                                 :padding "20px 48px 18px"
                                 :fontSize "137%" :fontWeight 400 :lineHeight 1}}
                   "Import a Method Configuration"]
                  [:div {:style {:padding "22px 48px 40px" :backgroundColor (:background-gray style/colors)}}
                   "Destination Name : "
                   (style/create-text-field {:id "dest_name_id" :style {:ref "destinationName"}})
                   [:br]
                   "Destination Namespace : "
                   (style/create-text-field {:id "dest_namespace_id" :style {:ref "destinationNamespace"}})
                   [:br]
                   [comps/Button
                    {:title-text "Import configuration"
                     :icon :plus
                     :onClick (fn []
                                (utils/rlog "this is where an AJAX call must be made!")
                                (swap! state assoc :show-import-mc-modal? false))}]
                   [comps/Button
                    {:title-text "cancel import"
                     :icon :x
                     :onClick (fn []
                                (swap! state assoc :show-import-mc-modal? false))}]]]
        :show-when (:show-import-mc-modal? @state)}]
      (cond
        (:loaded-import-confs? @state)
        (if (zero? (count (:method-confs @state)))

  (:require
    [dmohs.react :as react]
    clojure.string
    [org.broadinstitute.firecloud-ui.common :as common]
    [org.broadinstitute.firecloud-ui.common.icons :as icons]
    [org.broadinstitute.firecloud-ui.common.style :as style]
    [org.broadinstitute.firecloud-ui.common.table :as table]
    [org.broadinstitute.firecloud-ui.common.components :as comps]
    [org.broadinstitute.firecloud-ui.utils :as utils]))


(defn create-path [workspaceNamespace workspaceName]
  (str "/" workspaceNamespace "/"  workspaceName  "/methodconfigs/copyFromMethodRepo"))


(defn create-post-data
  [selected-conf
   selected-conf-dest-name
   selected-conf-dest-ns
   dest-workspace-name
   dest-workspace-namespace]
  (let [destination-map
        {"name" selected-conf-dest-name
        "namespace" selected-conf-dest-ns
        "workspaceName"
        {"name" dest-workspace-namespace
        "namespace" dest-workspace-name}}
        param-map {"methodRepoNamespace" (get-in selected-conf
                                           ["methodStoreMethod" "methodNamespace"])
                   "methodRepoName" (get-in selected-conf
                                      ["methodStoreMethod" "methodName"])
                   "methodRepoSnapshotId" (get-in selected-conf
                                            ["methodStoreMethod" "methodVersion"])
                   "destination" destination-map}]
    param-map))


(defn- create-mock-methodconfs-import []
