                     :padding "1rem"}}
       [:div {:style {:paddingBottom "0.5rem" :marginBottom "0.5rem"
                      :borderBottom (str "1px solid " (:exception-state style/colors))}}
-       "The following additional attributes are required to publish:" ]
+       "The following additional attributes are required to publish:"]
       [:div {:style {:fontSize 14}}
        (map (fn [attribute]
               [:div {:style {:paddingBottom "0.2rem"}} (get-in library-schema [:properties (keyword attribute) :title])])


(def ^:private ALL_USERS "All users")

(react/defc DiscoverabilityPage
  {:validate (constantly nil)
   :get-initial-state
   (fn [{:keys [props]}]
     (select-keys props [:library:discoverableByGroups :owner?]))
   :get-attributes
   (fn [{:keys [state]}]
     (if (nil? (:library:discoverableByGroups @state)) {} (select-keys @state [:library:discoverableByGroups])))
   :set-groups
   (fn [{:keys [state]} new-val]
     (swap! state assoc :library:discoverableByGroups (if (= new-val ALL_USERS) nil new-val)))
   :render
   (fn [{:keys [state props this]}]
     (let [{:keys [library:discoverableByGroups]} @state
           {:keys [:owner? :curator?]} props
           editable? (and curator? owner?)
           selected (if (empty? library:discoverableByGroups) ALL_USERS library:discoverableByGroups)]
       [:div {} "Dataset should be discoverable by:"
        (style/create-identity-select {:value selected
                                       :display "flex" :alignItems "center"

                         :fontWeight (when this "bold")
                         :color (when-not (or this (contains? pages-seen index)) (:text-lighter style/colors))}}
            title])) pages)]
     [:div {:style {:paddingBottom "0.5rem"
                    :color (when-not (contains? pages-seen (count pages)) (:text-lighter style/colors))
                    :fontWeight (when (= page-num (count pages)) "bold")}}
      "Discoverability"]
     [:div {:style {:color (when-not (contains? pages-seen (+ 1 (count pages))) (:text-lighter style/colors))
                    :fontWeight (when (> page-num (count pages)) "bold")}}
      "Summary"]]))

(defn- find-required-attributes [library-schema]
  (->> (map :required (:oneOf library-schema))
