#[cfg(feature = "tui")]
use crate::config::TuiConfig;
use crate::error::RuntimeError;
#[cfg(feature = "tui")]
pub struct TuiApp {
config: TuiConfig,
}
#[cfg(feature = "tui")]
impl TuiApp {
pub fn new(config: TuiConfig) -> Self {
Self { config }
}
pub async fn run(self) -> Result<(), RuntimeError> {
if !self.config.enabled {
return Ok(());
}
tracing::info!("TUI not yet implemented");
Ok(())
}
}
#[cfg(not(feature = "tui"))]
pub struct TuiApp;
#[cfg(not(feature = "tui"))]
impl TuiApp {
pub fn new(_config: ()) -> Self {
Self
}
pub async fn run(self) -> Result<(), RuntimeError> {
Ok(())
}
}