1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Terminal User Interface module.
//!
//! This module provides the interactive TUI for reviewing and
//! managing duplicate files using ratatui with crossterm backend.
//!
//! # Overview
//!
//! The TUI module consists of:
//! - [`app`]: Application state management (modes, navigation, selection)
//! - [`events`]: Keyboard event handling
//! - [`ui`]: Ratatui rendering
//! - [`run_tui`]: Main loop that coordinates everything
//!
//! # Architecture
//!
//! The TUI follows a unidirectional data flow:
//! 1. Events are captured from the terminal (crossterm)
//! 2. Events are translated to Actions
//! 3. Actions modify the App state
//! 4. The UI renders based on the current App state
//!
//! # Example
//!
//! ```no_run
//! use rustdupe::tui::{run_tui, App};
//! use rustdupe::duplicates::DuplicateGroup;
//! use std::path::PathBuf;
//!
//! // Create app with duplicate groups
//! let groups = vec![
//! DuplicateGroup::new(
//! [0u8; 32],
//! 1000,
//! vec![
//! rustdupe::scanner::FileEntry::new(PathBuf::from("/a.txt"), 1000, std::time::SystemTime::now()),
//! rustdupe::scanner::FileEntry::new(PathBuf::from("/b.txt"), 1000, std::time::SystemTime::now()),
//! ],
//! vec![],
//! ),
//! ];
//! let mut app = App::with_groups(groups);
//!
//! // Run the TUI (this takes over the terminal)
//! // run_tui(&mut app, None).unwrap();
//! ```
// Re-export commonly used types
pub use ;
pub use ;
pub use ;
pub use ;