<commit_before>import * as React from 'react'
import { ErrorBoundary } from '@framework/Components';
import "./Sidebar.css"
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { classes } from '../../Signum.React/Scripts/Globals';

export type SidebarMode = "Wide" | "Narrow" | "Hidden";   

interface SidebarContainerProps {
  mode: SidebarMode;
  isMobile: boolean;
  sidebarContent?: React.ReactElement<any>;
  children: React.ReactNode;
}

export function SidebarContainer(p: SidebarContainerProps){
  function renderSideBar() {
    //let width =
    //  p.mode == "Hidden" ? "0px" :
    //    p.mode == "Narrow" ? (p.isMobile ? "0px" : "59px") :
    //      p.mode == "Wide" ? (p.isMobile ? "100%" : "250px") :
    //        "0px";

    return (
      <nav
        className={classes("sidebar sidebar-nav", p.mode.firstLower(), p.isMobile && "mobile")}
        role="navigation">
        {p.sidebarContent}
      </nav>
    );
  }

  return (
    <div className="sidebar-container">
      {p.sidebarContent && renderSideBar()}
      <div className="container-fluid sf-page-container">
        <ErrorBoundary>
          {p.children}
        </ErrorBoundary>
      </div>
    </div><commit_msg>clean SidebarContainer<commit_after>import * as React from 'react'
import { ErrorBoundary } from '@framework/Components';
import "./Sidebar.css"
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { classes } from '../../Signum.React/Scripts/Globals';

export type SidebarMode = "Wide" | "Narrow" | "Hidden";   

interface SidebarContainerProps {
  mode: SidebarMode;
  isMobile: boolean;
  sidebarContent?: React.ReactElement<any>;
  children: React.ReactNode;
}

export function SidebarContainer(p: SidebarContainerProps){
  function renderSideBar() {
    return (
      <nav
        className={classes("sidebar sidebar-nav", p.mode.firstLower(), p.isMobile && "mobile")}
        role="navigation">
        {p.sidebarContent}
      </nav>
    );
  }

  return (
    <div className="sidebar-container">
      {p.sidebarContent && renderSideBar()}
      <div className="container-fluid sf-page-container">
        <ErrorBoundary>
          {p.children}
        </ErrorBoundary>
      </div>
    </div>
{'fraction_non_alphanumeric': 0.15102770330652368, 'fraction_numerical': 0.004915102770330653, 'mean_word_length': 3.070909090909091, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3626857', 'n_tokens_mistral': 706, 'n_tokens_neox': 698, 'n_words': 144}