use crossterm::event::{Event as CrosstermEvent, KeyEvent};

/// Unified input event type that normalizes all input sources
#[derive(Debug, Clone)]
pub enum InputEvent {
    Key(KeyEvent),
    Tick,
}

impl From<CrosstermEvent> for InputEvent {
    fn from(event: CrosstermEvent) -> Self {
        match event {
            CrosstermEvent::Key(key) => InputEvent::Key(key),
            _ => InputEvent::Tick, // Other events treated as tick
        }
    }
}