#![allow(unexpected_cfgs)]
use std::io;
use std::io::Write;
use std::time::Duration;
use rand::rngs::ThreadRng;
pub mod decode;
pub mod input_buffer;
pub mod layout;
pub mod prompt;
pub mod select_option;
pub mod style;
pub mod components;
pub use layout::Size;
pub use select_option::SelectOption;
pub struct RenderContext {
pub terminal_size: Size,
pub elapsed: Duration,
}
pub trait Component {
fn render<W: Write>(
&self,
writer: &mut W,
ctx: &RenderContext,
rng: &mut ThreadRng,
) -> io::Result<()>;
}