pub mod framework;
pub mod filesystem;
pub mod actions;
pub mod core;
pub mod logic;
pub mod data;
pub mod variables;
pub mod component_access;
pub mod http;
pub mod database;
pub mod environment_variables;
pub mod json;

use crate::gui_builder::nodes::NodeType;
use self::framework::NodeDescription;

pub fn get_node_documentation(node_type: NodeType) -> &'static str {
    match node_type.as_str() {
        // Logic
        "Branch" => logic::branch::BranchNode.description(),
        "ForLoop" => logic::for_loop::ForLoopNode.description(),
        "ForEachRow" => logic::for_each_row::ForEachRowNode.description(),

        // Filesystem
        "FileRead" => filesystem::file_read::FileReadNode.description(),
        "FileWrite" => filesystem::file_write::FileWriteNode.description(),
        "FileAppend" => filesystem::file_append::FileAppendNode.description(),
        "FileExists" => filesystem::file_exists::FileExistsNode.description(),
        "FileDelete" => filesystem::file_delete::FileDeleteNode.description(),
        "CreateFile" => filesystem::create_file::CreateFileNode.description(),

        // Environment Variables
        "ExpandEnvVars" => environment_variables::expand_env_vars::ExpandEnvVarsNode.description(),

        // TODO: Add other mappings here as we implement NodeDescription for them
        // Migrated nodes use the registry documentation system
        _ => "Documentation not yet migrated to component module.",
    }
}
