use super::types::ActionCommand;
use super::{ActionType, Command};
impl ActionCommand {
#[must_use]
pub fn get_action_type(&self) -> ActionType {
match self {
ActionCommand::Cell(action) => match action.action_type {
ActionType::Paste => ActionType::Paste,
_ => ActionType::Edit, },
ActionCommand::Row(_) => ActionType::DeleteRow,
ActionCommand::MultiRow(_) => ActionType::DeleteMultiRows,
ActionCommand::Column(_) => ActionType::DeleteColumn,
ActionCommand::MultiColumn(_) => ActionType::DeleteMultiColumns,
ActionCommand::Sheet(action) => action.action_type(),
}
}
}