<commit_before>(ns braid.core.client.ui.views.main
  (:require
   [braid.core.client.bots.views.bots-page :refer [bots-page-view]]
   [braid.core.client.gateway.views :refer [gateway-view]]
   [braid.core.client.gateway.forms.user-auth.views :refer [user-auth-view]]
   [braid.core.client.group-admin.views.group-settings-page :refer [group-settings-page-view]]
   [braid.core.client.invites.views.invite-page :refer [invite-page-view]]
   [braid.core.client.routes :as routes]
   [braid.core.client.ui.views.error-banner :refer [error-banner-view]]
   [braid.core.client.ui.views.header :refer [header-view readonly-header-view]]
   [braid.core.client.ui.views.pages.changelog :refer [changelog-view]]
   [braid.core.client.ui.views.pages.global-settings :refer [global-settings-page-view]]
   [braid.core.client.ui.views.pages.group-explore :refer [group-explore-page-view]]
   [braid.core.client.ui.views.pages.create-group :refer [create-group-page-view]]
   [braid.core.client.ui.views.pages.inbox :refer [inbox-page-view]]
   [braid.core.client.ui.views.pages.me :refer [me-page-view]]
   [braid.core.client.ui.views.pages.recent :refer [recent-page-view]]
   [braid.core.client.ui.views.pages.search :refer [search-page-view]]
   [braid.core.client.ui.views.pages.tags :refer [tags-page-view]]
   [braid.core.client.ui.views.pages.thread :refer [single-thread-view]]
   [braid.core.client.ui.views.reconnect-overlay :refer [reconnect-overlay-view]]
   [braid.core.client.ui.views.sidebar :refer [sidebar-view]]
   [braid.core.client.uploads.views.uploads-page :refer [uploads-page-view]]
   [braid.core.client.ui.views.pages.readonly :refer [readonly-inbox-page-view]]
   [re-frame.core :refer [subscribe]]))

(defn page-view []
  (case (@(subscribe [:page]) :type)
    :inbox [inbox-page-view]
    :readonly [readonly-inbox-page-view]
    :login [gateway-view]
    :recent [recent-page-view]
    :search [search-page-view]
    :tags [tags-page-view]
    :me [me-page-view]
    :invite [invite-page-view]
    :group-explore [group-explore-page-view]
    :create-group [create-group-page-view]
    :bots [bots-page-view]
    :uploads [uploads-page-view]
    :thread [single-thread-view]
    :settings [group-settings-page-view]
    :global-settings [global-settings-page-view]
    :changelog [changelog-view]
    nil))

(defn readonly-page-view
  []
  (case (:type @(subscribe [:page]))
    :readonly [readonly-inbox-page-view]
    :login [gateway-view]
    nil))

(defn main-view []
  (case @(subscribe [:login-state])
    :gateway
    [:div.main
     [sidebar-view]
     [:div.gateway
      [user-auth-view]]]<commit_msg>Show group explore page if connected anonymously<commit_after>(ns braid.core.client.ui.views.main
  (:require
   [braid.core.client.bots.views.bots-page :refer [bots-page-view]]
   [braid.core.client.gateway.views :refer [gateway-view]]
   [braid.core.client.gateway.forms.user-auth.views :refer [user-auth-view]]
   [braid.core.client.group-admin.views.group-settings-page :refer [group-settings-page-view]]
   [braid.core.client.invites.views.invite-page :refer [invite-page-view]]
   [braid.core.client.routes :as routes]
   [braid.core.client.ui.views.error-banner :refer [error-banner-view]]
   [braid.core.client.ui.views.header :refer [header-view readonly-header-view]]
   [braid.core.client.ui.views.pages.changelog :refer [changelog-view]]
   [braid.core.client.ui.views.pages.global-settings :refer [global-settings-page-view]]
   [braid.core.client.ui.views.pages.group-explore :refer [group-explore-page-view]]
   [braid.core.client.ui.views.pages.create-group :refer [create-group-page-view]]
   [braid.core.client.ui.views.pages.inbox :refer [inbox-page-view]]
   [braid.core.client.ui.views.pages.me :refer [me-page-view]]
   [braid.core.client.ui.views.pages.recent :refer [recent-page-view]]
   [braid.core.client.ui.views.pages.search :refer [search-page-view]]
   [braid.core.client.ui.views.pages.tags :refer [tags-page-view]]
   [braid.core.client.ui.views.pages.thread :refer [single-thread-view]]
   [braid.core.client.ui.views.reconnect-overlay :refer [reconnect-overlay-view]]
   [braid.core.client.ui.views.sidebar :refer [sidebar-view]]
   [braid.core.client.uploads.views.uploads-page :refer [uploads-page-view]]
   [braid.core.client.ui.views.pages.readonly :refer [readonly-inbox-page-view]]
   [re-frame.core :refer [subscribe]]))

(defn page-view []
  (case (@(subscribe [:page]) :type)
    :inbox [inbox-page-view]
    :readonly [readonly-inbox-page-view]
    :login [gateway-view]
    :recent [recent-page-view]
    :search [search-page-view]
    :tags [tags-page-view]
    :me [me-page-view]
    :invite [invite-page-view]
    :group-explore [group-explore-page-view]
    :create-group [create-group-page-view]
    :bots [bots-page-view]
    :uploads [uploads-page-view]
    :thread [single-thread-view]
    :settings [group-settings-page-view]
    :global-settings [global-settings-page-view]
    :changelog [changelog-view]
    nil))

(defn readonly-page-view
  []
  (case (:type @(subscribe [:page]))
    (:inbox :readonly) [readonly-inbox-page-view]
    :login [gateway-view]
    :group-explore [group-explore-page-view]
    nil))

(defn main-view []
  (case @(subscribe [:login-state])
    :gateway
    [:div.main
     [sidebar-view]
     [:div.gateway
      [user-auth-view]]]
{'fraction_non_alphanumeric': 0.17430334767159156, 'fraction_numerical': 0.0, 'mean_word_length': 3.7327433628318585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7646751', 'n_tokens_mistral': 2014, 'n_tokens_neox': 2019, 'n_words': 274}