<commit_before>(ns braid.client.mobile.views
  (:require [reagent.core :as r]
            [re-frame.core :refer [subscribe dispatch]]
            [braid.client.mobile.state]
            [braid.client.mobile.style :refer [styles]]
            [braid.client.helpers :refer [->color]]
            [braid.client.routes :as routes]
            [braid.client.ui.views.sidebar]
            [braid.client.ui.views.thread :refer [messages-view]]
            [braid.client.ui.views.new-message :refer [upload-button-view]]
            [braid.client.ui.views.header :refer [group-name-view group-header-buttons-view]]
            [retouch.core :refer [drawer-view swipe-view]]))

(defn new-message-view [thread-id]
  (let [message (r/atom "")
        group-id (subscribe [:open-group-id])]
    (fn [thread-id]
      [:div.new.message
       [upload-button-view {:thread-id "TODO"
                            :group-id "TODO"}]
       [:textarea {:value @message
                   :on-change (fn [e]
                                (reset! message (.. e -target -value)))
                   :on-something (fn [_]
                                   (dispatch [:new-message-text {:group-id @group-id
                                                                 :thread-id thread-id
                                                                 :content message}]))}]])))

(defn thread-view [thread]
  [:div.thread
   [:div.card
    [:div.head<commit_msg>Pass relevant data to upload-button-view<commit_after>(ns braid.client.mobile.views
  (:require [reagent.core :as r]
            [re-frame.core :refer [subscribe dispatch]]
            [braid.client.mobile.state]
            [braid.client.mobile.style :refer [styles]]
            [braid.client.helpers :refer [->color]]
            [braid.client.routes :as routes]
            [braid.client.ui.views.sidebar]
            [braid.client.ui.views.thread :refer [messages-view]]
            [braid.client.ui.views.new-message :refer [upload-button-view]]
            [braid.client.ui.views.header :refer [group-name-view group-header-buttons-view]]
            [retouch.core :refer [drawer-view swipe-view]]))

(defn new-message-view [thread-id]
  (let [message (r/atom "")
        group-id (subscribe [:open-group-id])]
    (fn [thread-id]
      [:div.new.message
       [upload-button-view {:thread-id thread-id
                            :group-id @group-id}]
       [:textarea {:value @message
                   :on-change (fn [e]
                                (reset! message (.. e -target -value)))
                   :on-something (fn [_]
                                   (dispatch [:new-message-text {:group-id @group-id
                                                                 :thread-id thread-id
                                                                 :content message}]))}]])))

(defn thread-view [thread]
  [:div.thread
   [:div.card
    [:div.head
{'fraction_non_alphanumeric': 0.1403209286445886, 'fraction_numerical': 0.0, 'mean_word_length': 1.4809483488569009, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '346260', 'n_tokens_mistral': 846, 'n_tokens_neox': 833, 'n_words': 161}