use spinoff::Color as SpinnerColor;
pub struct RgbColor {
	pub r: u8,
	pub g: u8,
	pub b: u8,
}

/// The main color used for all of the CLI's UI that needs highlighted
pub const MAIN_COLOR: RgbColor = RgbColor { r: 105, g: 37, b: 192 };
pub const SPINNER_COLOR: SpinnerColor = SpinnerColor::TrueColor {
	r: MAIN_COLOR.r,
	g: MAIN_COLOR.g,
	b: MAIN_COLOR.b,
};

/// Clears the console when called
pub fn clean_console() {
	print!("{esc}c", esc = 27 as char);
}

/// Helper function for printing indentations to the console
pub fn indent(amount: u32) -> String {
	let mut new_amount = String::new();

	for _ in 0..amount {
		new_amount.push('\n');
	}
	new_amount
}
