excel-cli 0.4.2

A lightweight terminal-based Excel viewer with Vim-like navigation for viewing, editing, and exporting Excel data to JSON format.
Documentation
use super::types::ActionCommand;
use super::{ActionType, Command};

impl ActionCommand {
    // Returns the action type of this command
    #[must_use]
    pub fn get_action_type(&self) -> ActionType {
        match self {
            ActionCommand::Cell(action) => match action.action_type {
                ActionType::Paste => ActionType::Paste,
                _ => ActionType::Edit, // Default case including Edit and Cut
            },
            ActionCommand::Row(_) => ActionType::DeleteRow,
            ActionCommand::MultiRow(_) => ActionType::DeleteMultiRows,
            ActionCommand::Column(_) => ActionType::DeleteColumn,
            ActionCommand::MultiColumn(_) => ActionType::DeleteMultiColumns,
            ActionCommand::Sheet(action) => action.action_type(),
        }
    }
}