//! Navigation command definitions.
//!
//! Commands for navigating between panes and views.

use super::super::command::{CommandCategory, CommandDef, CommandId};
use crate::app::Action;

pub fn navigation_commands() -> Vec<CommandDef> {
    vec![
        CommandDef {
            id: CommandId::ShowBranches,
            name: "Show branches pane",
            key: "b",
            category: CommandCategory::Navigation,
            description: "Show branches pane",
            action_factory: |_| Some(Action::FocusNext),
            is_enabled: |_| true,
            keywords: &["branches", "pane", "show"],
        },
        CommandDef {
            id: CommandId::ShowLog,
            name: "Show log pane",
            key: "l",
            category: CommandCategory::Navigation,
            description: "Show log pane",
            action_factory: |_| Some(Action::FocusNext),
            is_enabled: |_| true,
            keywords: &["log", "pane", "show"],
        },
        CommandDef {
            id: CommandId::ShowTags,
            name: "Show tags pane",
            key: "g",
            category: CommandCategory::Navigation,
            description: "Show tags pane",
            action_factory: |_| Some(Action::FocusNext),
            is_enabled: |_| true,
            keywords: &["tags", "pane", "show"],
        },
        CommandDef {
            id: CommandId::ShowStash,
            name: "Show stash pane",
            key: "z",
            category: CommandCategory::Navigation,
            description: "Show stash pane",
            action_factory: |_| Some(Action::FocusNext),
            is_enabled: |_| true,
            keywords: &["stash", "pane", "show"],
        },
        CommandDef {
            id: CommandId::ShowReflog,
            name: "Show reflog pane",
            key: "Ctrl+L",
            category: CommandCategory::Navigation,
            description: "Show reflog pane",
            action_factory: |_| Some(Action::FocusNext),
            is_enabled: |_| true,
            keywords: &["reflog", "pane", "show"],
        },
    ]
}

