#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TreeShellCommandAction {
    Create,
    Rename,
    Move,
    Archive,
    Restore,
    Purge,
    Embed,
    Copy,
}

impl TreeShellCommandAction {
    pub fn preferred_command_name(self) -> &'static str {
        match self {
            Self::Create => "tree.node.create",
            Self::Rename => "tree.node.rename",
            Self::Move => "tree.subtree.move",
            Self::Archive => "tree.node.archive",
            Self::Restore => "tree.node.restore",
            Self::Purge => "tree.node.purge",
            Self::Embed => "tree.node.embed",
            Self::Copy => "tree.subtree.copy",
        }
    }

    pub fn compat_command_name(self) -> &'static str {
        match self {
            Self::Create => "documents.create",
            Self::Rename => "documents.title.update",
            Self::Move => "documents.move",
            Self::Archive => "documents.delete",
            Self::Restore => "documents.restore",
            Self::Purge => "documents.purge",
            Self::Embed => "documents.embed",
            Self::Copy => "documents.copy_tree",
        }
    }
}
