use std::sync::LazyLock;
use supports_unicode::supports_unicode;
pub(crate) static IS_UNICODE: LazyLock<bool> = LazyLock::new(supports_unicode);
fn is_unicode(unicode: &'static str, non_unicode: &'static str) -> &'static str {
if *IS_UNICODE { unicode } else { non_unicode }
}
pub mod chars {
use super::is_unicode;
use std::sync::LazyLock;
pub static BAR: LazyLock<&str> = LazyLock::new(|| is_unicode("│", "|"));
pub static BAR_START: LazyLock<&str> = LazyLock::new(|| is_unicode("┌", "T"));
pub static BAR_END: LazyLock<&str> = LazyLock::new(|| is_unicode("└", "—"));
pub static STEP_ACTIVE: LazyLock<&str> = LazyLock::new(|| is_unicode("◆", "*"));
pub static STEP_CANCEL: LazyLock<&str> = LazyLock::new(|| is_unicode("■", "x"));
pub static STEP_ERROR: LazyLock<&str> = LazyLock::new(|| is_unicode("▲", "x"));
pub static STEP_SUBMIT: LazyLock<&str> = LazyLock::new(|| is_unicode("◇", "o"));
pub static RADIO_ACTIVE: LazyLock<&str> = LazyLock::new(|| is_unicode("●", ">"));
pub static RADIO_INACTIVE: LazyLock<&str> = LazyLock::new(|| is_unicode("○", " "));
pub static CHECKBOX_ACTIVE: LazyLock<&str> = LazyLock::new(|| is_unicode("◻", "[.]"));
pub static CHECKBOX_SELECTED: LazyLock<&str> = LazyLock::new(|| is_unicode("◼", "[+]"));
pub static CHECKBOX_INACTIVE: LazyLock<&str> = LazyLock::new(|| is_unicode("◻", "[ ]"));
}
pub mod ansi {
pub const CLEAR_LINE: &str = "\x1b[2K";
}