use std::cmp::min;
use std::path::PathBuf;
use std::sync::{Arc, MutexGuard};
use anyhow::{Context, Result};
use tuikit::attr::{Attr, Color};
use tuikit::prelude::*;
use tuikit::term::Term;
use crate::app::Footer;
use crate::app::Status;
use crate::app::Tab;
use crate::app::{ClickableLine, ClickableString, FlaggedFooter, FlaggedHeader};
use crate::app::{Header, PreviewHeader};
use crate::common::path_to_string;
use crate::common::ENCRYPTED_DEVICE_BINDS;
use crate::config::MENU_COLORS;
use crate::io::read_last_log_line;
use crate::log_info;
use crate::modes::BinaryContent;
use crate::modes::ColoredText;
use crate::modes::Content;
use crate::modes::ContentWindow;
use crate::modes::Display as DisplayMode;
use crate::modes::Edit;
use crate::modes::FileInfo;
use crate::modes::HLContent;<