"""
TUI Components for groknroll

Provides terminal user interface components including:
- Fuzzy file search with @filename syntax
- Shell command execution with !command syntax
- Keyboard shortcuts with leader key support
- Session management for conversation persistence
- Slash commands (/help, /new, /save, etc.)
- Interactive selection menus
- Command palette (Ctrl+P)
- Status bar with metrics
"""

from groknroll.tui.autocomplete import (
    AutocompleteProvider,
    AutocompleteSuggestion,
    AutocompleteType,
    FrecencyRecord,
    create_autocomplete_provider,
    expand_file_references,
    parse_file_reference,
)
from groknroll.tui.command_palette import (
    CommandCategory,
    CommandPalette,
    PaletteCommand,
    PaletteResult,
    create_palette,
)
from groknroll.tui.dialogs import (
    AgentInfo,
    AgentSelectorDialog,
    BaseDialog,
    CommandPaletteDialog,
    DialogResponse,
    DialogResult,
    DialogStack,
    HelpDialog,
    ModelInfo,
    ModelSelectorDialog,
    SessionInfo,
    SessionListDialog,
    StashDialog,
    ThemeSelectorDialog,
    show_agent_selector,
    show_command_palette,
    show_help,
    show_model_selector,
    show_session_list,
    show_stash,
    show_theme_selector,
)
from groknroll.tui.diff_renderer import (
    DiffFormat,
    DiffHunk,
    DiffRenderer,
    DiffStats,
    create_diff_renderer,
    get_diff_stats,
    render_diff,
)
from groknroll.tui.notifications import (
    Toast,
    ToastNotifier,
    ToastType,
    create_notifier,
)
from groknroll.tui.sidebar import (
    FileMetric,
    MCPServerMetric,
    Sidebar,
    SidebarSection,
    create_sidebar,
)
from groknroll.tui.fuzzy_search import (
    FileFinder,
    FuzzyFileSearch,
    FuzzyMatch,
    detect_at_references,
    expand_at_references,
    fuzzy_search_files,
)
from groknroll.tui.history import (
    Action,
    ActionGroup,
    ActionType,
    DirectoryAction,
    FileChangeAction,
    FileRenameAction,
    HistoryManager,
    HistoryState,
    create_file_change_action,
    create_file_rename_action,
)
from groknroll.tui.keybindings import (
    KeyAction,
    Keybinding,
    KeybindingManager,
    KeyHandleResult,
    KeySequence,
    create_keybinding_manager,
    parse_key_sequence,
)
from groknroll.tui.session import (
    CommandRun,
    FileChange,
    Message,
    Session,
    SessionInfo,
    SessionManager,
    list_sessions,
    load_session,
    save_session,
)
from groknroll.tui.shell_runner import (
    CommandExecution,
    CommandHistoryEntry,
    ShellRunner,
    ShellRunnerResult,
    is_shell_command,
    run_from_input,
    run_shell_command,
)
from groknroll.tui.slash_commands import (
    CommandDefinition,
    CommandResult,
    CommandType,
    SlashCommandHandler,
    get_slash_completions,
    process_slash_command,
)
from groknroll.tui.slash_commands import (
    is_slash_command as is_slash_cmd,
)
from groknroll.tui.status_bar import (
    ConnectionStatus,
    CostMetrics,
    StatusBar,
    TokenMetrics,
    create_status_bar,
)
from groknroll.tui.themes import (
    CATPPUCCIN_THEME,
    DRACULA_THEME,
    EVERFOREST_THEME,
    GITHUB_LIGHT_THEME,
    GRUVBOX_THEME,
    NORD_THEME,
    SOLARIZED_DARK_THEME,
    TOKYONIGHT_THEME,
    Theme,
    ThemeManager,
    ThemeType,
    create_theme_manager,
    get_default_theme,
    list_available_themes,
)

__all__ = [
    # Autocomplete
    "AutocompleteProvider",
    "AutocompleteSuggestion",
    "AutocompleteType",
    "FrecencyRecord",
    "create_autocomplete_provider",
    "parse_file_reference",
    "expand_file_references",
    # Command palette
    "CommandCategory",
    "CommandPalette",
    "PaletteCommand",
    "PaletteResult",
    "create_palette",
    # Dialogs
    "BaseDialog",
    "DialogResult",
    "DialogResponse",
    "ModelInfo",
    "AgentInfo",
    "SessionInfo",
    "ModelSelectorDialog",
    "AgentSelectorDialog",
    "SessionListDialog",
    "HelpDialog",
    "StashDialog",
    "ThemeSelectorDialog",
    "CommandPaletteDialog",
    "DialogStack",
    "show_model_selector",
    "show_agent_selector",
    "show_session_list",
    "show_help",
    "show_stash",
    "show_theme_selector",
    "show_command_palette",
    # Diff renderer
    "DiffRenderer",
    "DiffFormat",
    "DiffStats",
    "DiffHunk",
    "create_diff_renderer",
    "render_diff",
    "get_diff_stats",
    # Notifications
    "ToastNotifier",
    "Toast",
    "ToastType",
    "create_notifier",
    # Sidebar
    "Sidebar",
    "SidebarSection",
    "FileMetric",
    "MCPServerMetric",
    "create_sidebar",
    # Fuzzy search
    "FuzzyFileSearch",
    "FuzzyMatch",
    "FileFinder",
    "detect_at_references",
    "expand_at_references",
    "fuzzy_search_files",
    # Shell runner
    "ShellRunner",
    "ShellRunnerResult",
    "CommandExecution",
    "CommandHistoryEntry",
    "is_shell_command",
    "run_shell_command",
    "run_from_input",
    # Keybindings
    "KeybindingManager",
    "KeySequence",
    "Keybinding",
    "KeyHandleResult",
    "KeyAction",
    "create_keybinding_manager",
    "parse_key_sequence",
    # Session management
    "SessionManager",
    "Session",
    "SessionInfo",
    "Message",
    "FileChange",
    "CommandRun",
    "save_session",
    "load_session",
    "list_sessions",
    # Slash commands
    "SlashCommandHandler",
    "CommandResult",
    "CommandType",
    "CommandDefinition",
    "is_slash_cmd",
    "process_slash_command",
    "get_slash_completions",
    # History / Undo-Redo
    "HistoryManager",
    "HistoryState",
    "Action",
    "ActionType",
    "ActionGroup",
    "FileChangeAction",
    "FileRenameAction",
    "DirectoryAction",
    "create_file_change_action",
    "create_file_rename_action",
    # Status bar
    "StatusBar",
    "TokenMetrics",
    "CostMetrics",
    "ConnectionStatus",
    "create_status_bar",
    # Themes
    "Theme",
    "ThemeType",
    "ThemeManager",
    "TOKYONIGHT_THEME",
    "EVERFOREST_THEME",
    "CATPPUCCIN_THEME",
    "GRUVBOX_THEME",
    "NORD_THEME",
    "DRACULA_THEME",
    "SOLARIZED_DARK_THEME",
    "GITHUB_LIGHT_THEME",
    "create_theme_manager",
    "get_default_theme",
    "list_available_themes",
]
