use std::{borrow::Cow, cell::RefCell, collections::HashMap};
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers, MouseButton, MouseEvent, MouseEventKind};
use float_ord::FloatOrd;
use itertools::{Either, Itertools};
use once_cell::unsync::Lazy;
use rustc_hash::{FxHashMap, FxHashSet};
use tui::{
backend::Backend,
layout::{Constraint, Direction, Layout, Rect},
style::Style,
text::{Span, Spans},
widgets::{Borders, Paragraph},
Frame,
};
use crate::{
app::{
data_harvester::processes::ProcessHarvest,
event::{ComponentEventResult, MultiKey, MultiKeyResult, ReturnSignal, SelectionAction},
query::*,
text_table::{DesiredColumnWidth, TextTableRow},
widgets::tui_stuff::BlockBuilder,
AppConfigFields, DataCollection, ProcessData,
},
canvas::Painter,
data_conversion::{get_string_with_bytes, get_string_with_bytes_per_second},
options::{layout_options::LayoutRule, ProcessDefaults},
u