pub mod input;
pub mod terminal;
#[cfg(test)]
mod tests;
mod theme;
pub use theme::Theme;
use std::error::Error;
use std::path::PathBuf;
pub trait UserInterface {
fn run(&mut self) -> Result<(), Box<dyn Error>>;
fn open_directory(&mut self, path: PathBuf) -> Result<(), Box<dyn Error>>;
}
pub enum UiAction {
Continue,
Exit,
ExecuteQueue,
ShowHelp,
AddToQueue,
Transform(TransformAction),
GroupFiles,
FlattenDirectory,
}
#[derive(Clone, Debug)]
pub enum TransformAction {
Snake,
Kebab,
Clean,
Title,
Camel,
Pascal,
Lower,
Upper,
}
impl TransformAction {
pub fn as_str(&self) -> &'static str {
match self {
TransformAction::Snake => "snake_case",
TransformAction::Kebab => "kebab-case",
TransformAction::Clean => "clean",
TransformAction::Title => "Title Case",
TransformAction::Camel => "camelCase",
TransformAction::Pascal => "PascalCase",
TransformAction::Lower => "lowercase",
TransformAction::Upper => "UPPERCASE",
}
}
}