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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
//! # Components Module
//!
//! Comprehensive UI component system for the Quetty terminal user interface.
//! This module provides a complete set of reusable, interactive components
//! built on the TUI-Realm framework for building rich terminal applications.
//!
//! ## Component Architecture
//!
//! The component system follows a hierarchical design with several categories:
//!
//! ### Core Components
//! - **[`common`]** - Shared message types and common functionality
//! - **[`state`]** - Component state management and synchronization
//!
//! ### Input Components
//! Interactive components for user input and selection:
//! - **[`namespace_picker`]** - Azure Service Bus namespace selection
//! - **[`queue_picker`]** - Queue selection and browsing
//! - **[`resource_group_picker`]** - Azure resource group selection
//! - **[`subscription_picker`]** - Azure subscription selection
//! - **[`theme_picker`]** - Theme and color scheme selection
//!
//! ### Configuration Components
//! Components for application configuration and setup:
//! - **[`config_screen`]** - Main configuration interface
//! - **[`password_popup`]** - Secure password input
//!
//! ### Popup Components
//! Modal dialogs and overlay components:
//! - **[`auth_popup`]** - Authentication flow interface
//! - **[`confirmation_popup`]** - User confirmation dialogs
//! - **[`error_popup`]** - Error message display
//! - **[`number_input_popup`]** - Numeric input dialog
//! - **[`page_size_popup`]** - Pagination configuration
//! - **[`success_popup`]** - Success message display
//!
//! ### Display Components
//! Components for information display and user guidance:
//! - **[`help`]** - Context-sensitive help system
//! - **[`help_bar`]** - Quick help and shortcut display
//! - **[`help_screen`]** - Comprehensive help interface
//! - **[`loading_indicator`]** - Progress and loading feedback
//! - **[`text_label`]** - Formatted text display
//!
//! ### Complex Components
//! Full-featured components for core application functionality:
//! - **[`message_details`]** - Message viewing and editing
//! - **[`messages`]** - Message list and management
//!
//! ### System Components
//! Infrastructure components for application behavior:
//! - **[`global_key_watcher`]** - Global keyboard event handling
//!
//! ### Utility Components
//! Shared patterns and reusable utilities:
//! - **[`base_popup`]** - Base popup implementation
//! - **[`validation_patterns`]** - Input validation utilities
//!
//! ## Component Lifecycle
//!
//! All components follow the TUI-Realm component lifecycle:
//!
//! ```ignore
//! use tuirealm::{Component, MockComponent, Event, EventListenerCfg};
//! use quetty::components::common::Msg;
//!
//! // Component initialization
//! let mut component = MyComponent::new();
//!
//! // Mount component to application
//! app.mount(ComponentId::MyComponent, Box::new(component))?;
//!
//! // Handle events
//! let result = app.tick(Event::Key(key_event))?;
//! match result {
//! Some(Msg::ComponentMessage(data)) => {
//! // Handle component message
//! }
//! None => {} // No message generated
//! }
//!
//! // Unmount when done
//! app.umount(&ComponentId::MyComponent)?;
//! ```
//!
//! ## Message Passing System
//!
//! Components communicate through a unified message system:
//!
//! ```ignore
//! use quetty::components::common::Msg;
//!
//! // User interaction messages
//! let msg = Msg::QueueSelected("my-queue".to_string());
//! let msg = Msg::MessageSelected(message_id);
//!
//! // Operation messages
//! let msg = Msg::BulkOperationStarted;
//! let msg = Msg::AuthenticationRequired;
//!
//! // System messages
//! let msg = Msg::ErrorOccurred(error_details);
//! let msg = Msg::OperationCompleted;
//! ```
//!
//! ## Styling and Theming
//!
//! All components support dynamic theming:
//!
//! ```ignore
//! use quetty::theme::ThemeManager;
//! use tuirealm::props::{PropPayload, PropValue};
//!
//! // Apply theme colors to component
//! component.attr(
//! tuirealm::Attribute::Foreground,
//! tuirealm::AttrValue::Color(ThemeManager::text_primary()),
//! );
//!
//! component.attr(
//! tuirealm::Attribute::Background,
//! tuirealm::AttrValue::Color(ThemeManager::surface()),
//! );
//! ```
//!
//! ## Validation and Input Handling
//!
//! Components include comprehensive input validation:
//!
//! ```ignore
//! use quetty::components::validation_patterns::{ValidationPattern, InputValidator};
//!
//! // Validate user input
//! let validator = InputValidator::new(ValidationPattern::QueueName);
//! let is_valid = validator.validate(&user_input);
//!
//! if !is_valid {
//! // Show validation error
//! component.show_error("Invalid queue name format");
//! }
//! ```
//!
//! ## Error Handling
//!
//! Components provide consistent error handling:
//!
//! - **Input Validation** - Real-time validation feedback
//! - **Operation Errors** - Clear error messages and recovery options
//! - **Network Errors** - Graceful handling of connectivity issues
//! - **Authentication Errors** - Guided re-authentication flows
//!
//! ## Accessibility Features
//!
//! - **Keyboard Navigation** - Full keyboard accessibility
//! - **Screen Reader Support** - Proper ARIA-like labeling
//! - **High Contrast** - Support for accessibility themes
//! - **Focus Management** - Clear focus indicators and navigation
//!
//! ## Performance Optimizations
//!
//! - **Lazy Rendering** - Components render only when visible
//! - **Efficient Updates** - Minimal redraws and state changes
//! - **Memory Management** - Proper cleanup of component resources
//! - **Event Debouncing** - Throttled input handling for responsiveness
// Core components
// Reusable patterns and utilities
// UI Components organized by category
// Input components
// Configuration components
// Popup components
// Display components
// Complex components
// System components